In [ ]:
. ./nbs_header.ps1
. ./core.ps1
In [ ]:
{ . "$ScriptDir/../apps/builder/build.ps1" } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # DibParser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── pwsh ────────────────────────────────────────────────────────────────────────
ls ~/.nuget/packages/argu
╭─[ 589.11ms - stdout ]────────────────────────────────────────────────────────╮
│ │
│ Directory: C:\Users\i574n\.nuget\packages\argu │
│ │
│ Mode LastWriteTime Length[ │
│ 32;1m Name │
│ ---- ------------- ------ [ │
│ 32;1m---- │
│ d---- 2023-05-17 3:38 PM 6.1.1 │
│ d---- 2024-03-12 8:22 PM 6.1.4 │
│ d---- 2024-01-29 5:12 PM 6.1.5 │
│ d---- 2024-03-12 8:20 PM 6.2.0 │
│ d---- 2024-02-23 6:50 PM 6.2.1 │
│ d---- 2024-03-12 8:15 PM 6.2.2 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsec.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsecCS.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FParsec
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## escapeCell (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline escapeCell input =
input
|> String.split [[| '\n' |]]
|> Array.map (function
| line when line |> String.startsWith "\\#!" || line |>
String.startsWith "\\#r" ->
System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#")
| line -> line
)
|> String.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
$"a{nl}\\#!magic{nl}b{nl}"
|> escapeCell
|> _assert_eq (
$"a{nl}#!magic{nl}b{nl}"
)
╭─[ 69.15ms - stdout ]─────────────────────────────────────────────────────────╮
│ a │
│ #!magic │
│ b │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicMarker │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicMarker : Parser<string, unit> = pstring "#!"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic"
|> run magicMarker
|> _assert_eq (
Success ("#!", (), Position ("", 2, 1, 3))
)
╭─[ 50.56ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: #! │
│ Item2: <null> │
│ Item3: Position │
│ Index: 2 │
│ Line: 1 │
│ Column: 3 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"##!magic"
|> run magicMarker
|> _assert_eq (
Failure (
$"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 62.16ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: Error in Ln: 1 Col: 1 │
│ ##!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ Item2: ParserError │
│ Position: Position │
│ Index: 0 │
│ Line: 1 │
│ Column: 1 │
│ StreamName: │
│ UserState: <null> │
│ Messages: ErrorMessageList │
│ Head: ExpectedString │
│ String: #! │
│ Type: ExpectedString │
│ Tail: <null> │
│ Item3: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicCommand │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicCommand =
magicMarker
>>. manyTill anyChar newline
|>> (System.String.Concat >> String.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a"
|> run magicCommand
|> _assert_eq (
Success ("magic", (), Position ("", 8, 2, 1))
)
╭─[ 36.65ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: magic │
│ Item2: <null> │
│ Item3: Position │
│ Index: 8 │
│ Line: 2 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
" #!magic
a"
|> run magicCommand
|> _assert_eq (
Failure (
$"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 42.92ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: Error in Ln: 1 Col: 1 │
│ #!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ Item2: ParserError │
│ Position: Position │
│ Index: 0 │
│ Line: 1 │
│ Column: 1 │
│ StreamName: │
│ UserState: <null> │
│ Messages: ErrorMessageList │
│ Head: ExpectedString │
│ String: #! │
│ Type: ExpectedString │
│ Tail: <null> │
│ Item3: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## content │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let content =
(newline >>. magicMarker) <|> (eof >>. preturn "")
|> attempt
|> lookAhead
|> manyTill anyChar
|>> (System.String.Concat >> String.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run content
|> _assert_eq (
Success ("#!magic
a", (), Position ("", 14, 7, 1))
)
╭─[ 63.76ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: #!magic │
│ │
│ │
│ a │
│ Item2: <null> │
│ Item3: Position │
│ Index: 14 │
│ Line: 7 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Block =
{
magic : string
content : string
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let block =
pipe2
magicCommand
content
(fun magic content ->
{
magic = magic
content = content
})
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run block
|> _assert_eq (
Success (
{ magic = "magic"; content = "a" },
(),
Position ("", 14, 7, 1)
)
)
╭─[ 44.35ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: Block │
│ magic: magic │
│ content: a │
│ Item2: <null> │
│ Item3: Position │
│ Index: 14 │
│ Line: 7 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## blocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let blocks =
skipMany newline
>>. sepEndBy block (skipMany1 newline)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic1
a
\#!magic2
b
"
|> escapeCell
|> run blocks
|> _assert_eq (
Success (
[[
{ magic = "magic1"; content = "a" }
{ magic = "magic2"; content = "b" }
]],
(),
Position ("", 26, 9, 1)
)
)
╭─[ 53.18ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: FSharpList<Block> │
│ - magic: magic1 │
│ content: a │
│ - magic: magic2 │
│ content: b │
│ Item2: <null> │
│ Item3: Position │
│ Index: 26 │
│ Line: 9 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Output │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Output =
| Fs
| Md
| Spi
| Spir
let inline kernelOutputs magic =
match magic with
| "fsharp" -> [[ Fs ]]
| "markdown" -> [[ Md ]]
| "spiral" -> [[ Spi; Spir ]]
| _ -> [[]]
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlock │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlock output (block : Block) =
match output, block with
| output, { magic = "markdown"; content = content } ->
let markdownComment =
match output with
| Spi | Spir -> "// // "
| Fs -> "/// "
| _ -> ""
content
|> String.split [[| '\n' |]]
|> Array.map (String.trimEnd [[||]])
|> Array.filter (String.endsWith " (test)" >> not)
|> Array.map (function
| "" -> markdownComment |> String.trim
| line -> System.Text.RegularExpressions.Regex.Replace (line,
"^\\s*", $"$&{markdownComment}")
)
|> String.concat "\n"
| Fs, { magic = "fsharp"; content = content } ->
let trimmedContent = content |> String.trim
if trimmedContent |> String.startsWith "//// test" || trimmedContent |>
String.startsWith "//// ignore"
then ""
else
content
|> String.split [[| '\n' |]]
|> Array.filter (String.trimStart [[||]] >> String.startsWith "#r"
>> not)
|> String.concat "\n"
| (Spi | Spir), { magic = "spiral"; content = content } ->
let trimmedContent = content |> String.trim
if trimmedContent |> String.startsWith "// // test" || trimmedContent |>
String.startsWith "// // ignore"
then ""
else content
| _ -> ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
c
\#!markdown
c
\#!fsharp
let a = 1"
|> escapeCell
|> run block
|> function
| Success (block, _, _) -> formatBlock Fs block
| Failure (msg, _, _) -> failwith msg
|> _assert_eq "/// a
///
/// b
///
/// c"
╭─[ 61.01ms - stdout ]─────────────────────────────────────────────────────────╮
│ /// a │
│ /// │
│ /// b │
│ /// │
│ /// c │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlocks output blocks =
blocks
|> List.map (formatBlock output)
|> List.filter ((<>) "")
|> String.concat "\n\n"
|> fun s -> s + "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
\#!markdown
c
\#!fsharp
let a = 1
\#!markdown
d (test)
\#!fsharp
//// test
let a = 2
\#!markdown
e
\#!fsharp
let a = 3"
|> escapeCell
|> run blocks
|> function
| Success (blocks, _, _) -> formatBlocks Fs blocks
| Failure (msg, _, _) -> failwith msg
|> _assert_eq "/// a
///
/// b
/// c
let a = 1
/// e
let a = 3
"
╭─[ 68.86ms - stdout ]─────────────────────────────────────────────────────────╮
│ /// a │
│ /// │
│ /// b │
│ │
│ /// c │
│ │
│ let a = 1 │
│ │
│ /// e │
│ │
│ let a = 3 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parse │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parse output input =
match run blocks input with
| Success (blocks, _, _) ->
let blocks =
blocks
|> List.filter (fun block ->
block.magic |> kernelOutputs |> List.contains output ||
block.magic = "markdown"
)
match blocks with
| { magic = "markdown"; content = content } :: _
when output = Fs
&& content |> String.startsWith "# "
&& content |> String.endsWith ")"
->
let inline indentBlock (block : Block) =
{ block with
content =
block.content
|> String.split [[| '\n' |]]
|> Array.fold
(fun (lines, isMultiline) line ->
let trimmedLine = line |> String.trim
if trimmedLine = ""
then "" :: lines, isMultiline
else
let inline singleQuoteLine () =
trimmedLine |> Seq.sumBy ((=) '"' >>
System.Convert.ToInt32) = 1
&& trimmedLine |> String.contains
@"'""'" |> not
&& trimmedLine |> String.endsWith "{" |>
not
&& trimmedLine |> String.endsWith "{|"
|> not
&& trimmedLine |> String.startsWith "}"
|> not
&& trimmedLine |> String.startsWith "|}"
|> not
match isMultiline, trimmedLine |>
String.splitString [[| $"{q}{q}{q}" |]] with
| false, [[| _; _ |]] ->
$" {line}" :: lines, true
| true, [[| _; _ |]] ->
line :: lines, false
| false, _ when singleQuoteLine () ->
$" {line}" :: lines, true
| false, _ when line |> String.startsWith
"#" && block.magic = "fsharp" ->
line :: lines, false
| false, _ ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () && line |>
String.startsWith " " ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () ->
line :: lines, false
| true, _ ->
line :: lines, true
)
([[]], false)
|> fst
|> List.rev
|> String.concat "\n"
}
let moduleName, namespaceName =
System.Text.RegularExpressions.Regex.Match (content, @"# (.*)
\((.*)\)$")
|> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value
let moduleBlock =
{
magic = "fsharp"
content =
$"#if !INTERACTIVE
namespace {namespaceName}
#endif
module {moduleName} ="
}
blocks
|> List.indexed
|> List.fold
(fun blocks (index, block) ->
match index with
| 0 -> blocks
| 1 -> indentBlock block :: moduleBlock :: blocks
| _ -> indentBlock block :: blocks
)
[[]]
|> List.rev
| _ -> blocks
|> Result.Ok
| Failure (errorMsg, _, _) -> Result.Error errorMsg
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example1 =
$"""#!meta
{{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name":
"fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}}
\#!markdown
# TestModule (TestNamespace)
\#!fsharp
\#!import file.dib
\#!fsharp
\#r "nuget:Expecto"
\#!markdown
## ParserLibrary
\#!fsharp
open System
\#!markdown
## x (test)
\#!fsharp
//// ignore
let x = 1
\#!spiral
// // test
inl x = 0i32
\#!spiral
inl x = 0i32
\#!markdown
### TextInput
\#!fsharp
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
\#!fsharp
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}"""
|> escapeCell
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Fs
|> Result.toOption
|> Option.get
|> (formatBlocks Fs)
|> _assert_eq $"""#if !INTERACTIVE
namespace TestNamespace
#endif
module TestModule =
/// ## ParserLibrary
open System
/// ### TextInput
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}
"""
╭─[ 246.13ms - stdout ]────────────────────────────────────────────────────────╮
│ #if !INTERACTIVE │
│ namespace TestNamespace │
│ #endif │
│ │
│ module TestModule = │
│ │
│ /// ## ParserLibrary │
│ │
│ open System │
│ │
│ /// ### TextInput │
│ │
│ let str1 = "abc │
│ def" │
│ │
│ let str2 = │
│ "abc\ │
│ def" │
│ │
│ let str3 = │
│ $"1{ │
│ 1 │
│ }1" │
│ │
│ let str4 = │
│ $"1{({| │
│ a = 1 │
│ |}).a}1" │
│ │
│ let str5 = │
│ "abc \ │
│ def" │
│ │
│ let x = │
│ match '"' with │
│ | '"' -> true │
│ | _ -> false │
│ │
│ let long1 = """a""" │
│ │
│ let long2 = │
│ """ │
│ a │
│ """ │
│ │
│ type Position = │
│ { │
│ #if INTERACTIVE │
│ line : string │
│ #else │
│ line : int │
│ #endif │
│ column : int │
│ } │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Md
|> Result.toOption
|> Option.get
|> (formatBlocks Md)
|> _assert_eq "# TestModule (TestNamespace)
## ParserLibrary
### TextInput
"
╭─[ 174.19ms - stdout ]────────────────────────────────────────────────────────╮
│ # TestModule (TestNamespace) │
│ │
│ ## ParserLibrary │
│ │
│ ### TextInput │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Spi
|> Result.toOption
|> Option.get
|> (formatBlocks Spi)
|> _assert_eq "// // # TestModule (TestNamespace)
// // ## ParserLibrary
inl x = 0i32
// // ### TextInput
"
╭─[ 148.89ms - stdout ]────────────────────────────────────────────────────────╮
│ // // # TestModule (TestNamespace) │
│ │
│ // // ## ParserLibrary │
│ │
│ inl x = 0i32 │
│ │
│ // // ### TextInput │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parseDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseDibCode output file = async {
let getLocals () = $"output: {output} / file: {file} / {getLocals ()}"
trace Debug (fun () -> "parseDibCode") getLocals
let! input = file |> FileSystem.readAllTextAsync
match parse output input with
| Result.Ok blocks -> return blocks |> formatBlocks output
| Result.Error msg -> return failwith msg
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeDibCode output path = async {
let getLocals () = $"output: {output} / path: {path} / {getLocals ()}"
trace Debug (fun () -> "writeDibCode") getLocals
let! result = parseDibCode output path
let outputPath = path |> String.replace ".dib" $".{output |> string |>
String.toLower}"
do! result |> FileSystem.writeAllTextAsync outputPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]]
File of file : string * Output
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| File _ -> nameof File
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 96.56ms - return value ]───────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │
│ │
│ FILE: │
│ │
│ <file> <fs|md|spi|spir> │
│ File │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let files =
argsMap.[[nameof Arguments.File]]
|> List.map (function
| Arguments.File (path, output) -> path, output
)
files
|> List.map (fun (path, output) -> path |> writeDibCode output)
|> Async.Parallel
|> Async.Ignore
|> Async.runWithTimeout 30000
|> function
| Some () -> 0
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> Runtime.splitArgs
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 152.60ms - return value ]──────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 168.49ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Builder.dib │
│ 00:00:00 #2 [Debug] parseDibCode / output: Fs / file: Builder.dib │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Builder (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Networking.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Networking =
open Common
/// ## testPortOpen
let inline testPortOpen port = async {
let! ct = Async.CancellationToken
use client = new System.Net.Sockets.TcpClient ()
try
do! client.ConnectAsync ("127.0.0.1", port, ct) |>
Async.awaitValueTaskUnit
return true
with ex ->
trace Verbose (fun () -> $"testPortOpen / ex: {ex |>
printException}") getLocals
return false
}
let inline testPortOpenTimeout timeout port = async {
let! result =
testPortOpen port
|> Async.runWithTimeoutAsync timeout
return
match result with
| None -> false
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FileSystem.Operators
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildProject │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildProject runtime outputDir path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let fileDir = fullPath |> System.IO.Path.GetDirectoryName
let extension = fullPath |> System.IO.Path.GetExtension
let getLocals () = $"fullPath: {fullPath} / {getLocals ()}"
trace Debug (fun () -> "buildProject") getLocals
match extension with
| ".fsproj" -> ()
| _ -> failwith "Invalid project file"
let runtimes =
runtime
|> Option.map List.singleton
|> Option.defaultValue [[ "linux-x64"; "win-x64" ]]
let outputDir = outputDir |> Option.defaultValue "dist"
return!
runtimes
|> List.map (fun runtime -> async {
let! exitCode, _result =
Runtime.executeWithOptionsAsync
{
Command = $@"dotnet publish ""{path}"" --configuration
Release --output ""{outputDir}"" --runtime {runtime}"
CancellationToken = None
OnLine = None
WorkingDirectory = Some fileDir
}
return exitCode
})
|> Async.Sequential
|> Async.map Array.sum
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## persistCodeProject │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline persistCodeProject packages modules name code = async {
let getLocals () = $"packages: {packages} / modules: {modules} / name:
{name} / code.Length: {code |> String.length} / {getLocals ()}"
trace Debug (fun () -> "persistCodeProject") getLocals
let repositoryRoot = FileSystem.getSourceDirectory () |>
FileSystem.findParent ".paket" false
let targetDir = repositoryRoot </> "target/polyglot/builder" </> name
System.IO.Directory.CreateDirectory targetDir |> ignore
let filePath = targetDir </> $"{name}.fs" |> System.IO.Path.GetFullPath
do! code |> FileSystem.writeAllTextExists filePath
let modulesCode =
modules
|> List.map (fun path -> $"""<Compile Include="{repositoryRoot </>
path}" />""")
|> String.concat "\n "
let fsprojPath = targetDir </> $"{name}.fsproj"
let fsprojCode = $"""<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<RollForward>Major</RollForward>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<PublishAot>false</PublishAot>
<PublishTrimmed>false</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<Version>0.0.1-alpha.1</Version>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
{modulesCode}
<Compile Include="{filePath}" />
</ItemGroup>
<Import Project="{repositoryRoot}/.paket/Paket.Restore.targets" />
</Project>
"""
do! fsprojCode |> FileSystem.writeAllTextExists fsprojPath
let paketReferencesPath = targetDir </> "paket.references"
let paketReferencesCode =
"FSharp.Core" :: packages
|> String.concat "\n"
do! paketReferencesCode |> FileSystem.writeAllTextExists paketReferencesPath
return fsprojPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildCode runtime packages modules outputDir name code = async {
let! fsprojPath = code |> persistCodeProject packages modules name
return! fsprojPath |> buildProject runtime outputDir
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"1 + 1 |> ignore"
|> buildCode None [[]] [[]] None "test1"
|> Async.runWithTimeout 180000
|> _assert_eq (Some 0)
╭─[ 17.47s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] persistCodeProject / packages: [] / modules: [] / name: │
│ test1 / code.Length: 15 │
│ 00:00:00 #2 [Debug] buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj │
│ 00:00:00 #3 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
│ --configuration Release --output "dist" --runtime linux-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\test1" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:00 #4 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:01 #5 [Verbose] > Determining projects to restore... │
│ 00:00:02 #6 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 1.09 │
│ sec). │
│ 00:00:02 #7 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:04 #8 [Verbose] > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\linux- │
│ x64\test1.dll │
│ 00:00:05 #9 [Verbose] > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
│ 00:00:05 #10 [Debug] executeAsync / exitCode: 0 / output.Length: 695 │
│ 00:00:05 #11 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
│ --configuration Release --output "dist" --runtime win-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\test1" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:05 #12 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:06 #13 [Verbose] > Determining projects to restore... │
│ 00:00:07 #14 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 325 ms). │
│ 00:00:07 #15 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:08 #16 [Verbose] > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\win-x6 │
│ 4\test1.dll │
│ 00:00:16 #17 [Verbose] > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
│ 00:00:16 #18 [Debug] executeAsync / exitCode: 0 / output.Length: 691 │
│ FSharpOption<Int32> │
│ Value: 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"1 + a |> ignore"
|> buildCode None [[]] [[]] None "test2"
|> Async.runWithTimeout 180000
|> _assert_eq (Some 2)
╭─[ 11.47s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:17 #19 [Debug] persistCodeProject / packages: [] / modules: [] / name: │
│ test2 / code.Length: 15 │
│ 00:00:17 #20 [Debug] buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj │
│ 00:00:17 #21 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
│ --configuration Release --output "dist" --runtime linux-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\test2" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:17 #22 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:18 #23 [Verbose] > Determining projects to restore... │
│ 00:00:19 #24 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 355 ms). │
│ 00:00:19 #25 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:21 #26 [Verbose] > │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
│ FS0039: The value or constructor 'a' is not defined. [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:21 #27 [Debug] executeAsync / exitCode: 1 / output.Length: 715 │
│ 00:00:21 #28 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
│ --configuration Release --output "dist" --runtime win-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\test2" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:22 #29 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:22 #30 [Verbose] > Determining projects to restore... │
│ 00:00:23 #31 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 567 ms). │
│ 00:00:24 #32 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:27 #33 [Verbose] > │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
│ FS0039: The value or constructor 'a' is not defined. [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:28 #34 [Debug] executeAsync / exitCode: 1 / output.Length: 715 │
│ FSharpOption<Int32> │
│ Value: 2 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## readFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline readFile path = async {
let! code = path |> FileSystem.readAllTextAsync
let code = System.Text.RegularExpressions.Regex.Replace (
code,
@"( *)(let\s+main\s+.*?\s*=)",
fun m -> m.Groups.[[1]].Value + "[[<EntryPoint>]]\n" +
m.Groups.[[1]].Value + m.Groups.[[2]].Value
)
let codeTrim = code |> String.trimEnd [[||]]
return
if codeTrim |> String.endsWith "\n()"
then codeTrim |> String.substring 0 ((codeTrim |> String.length) - 2)
else code
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildFile runtime packages modules path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let dir = fullPath |> System.IO.Path.GetDirectoryName
let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
let! code = fullPath |> readFile
return! code |> buildCode runtime packages modules (dir </> "dist" |> Some)
name
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## persistFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline persistFile packages modules path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
let! code = fullPath |> readFile
return! code |> persistCodeProject packages modules name
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce>]]
Path of path : string
| [[<Argu.ArguAttributes.Unique>]] Packages of packages : string list
| [[<Argu.ArguAttributes.Unique>]] Modules of modules : string list
| [[<Argu.ArguAttributes.Unique>]] Runtime of runtime : string
| [[<Argu.ArguAttributes.Unique>]] Persist_Only
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Path _ -> nameof Path
| Packages _ -> nameof Packages
| Modules _ -> nameof Modules
| Runtime _ -> nameof Runtime
| Persist_Only -> nameof Persist_Only
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 155.09ms - return value ]──────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] [--packages [<packages>...]] │
│ [--modules [<modules>...]] [--runtime <runtime>] │
│ [--persist-only] <path> │
│ │
│ PATH: │
│ │
│ <path> Path │
│ │
│ OPTIONS: │
│ │
│ --packages [<packages>...] │
│ Packages │
│ --modules [<modules>...] │
│ Modules │
│ --runtime <runtime> Runtime │
│ --persist-only Persist_Only │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let path =
match argsMap.[[nameof Arguments.Path]] with
| [[ Arguments.Path path ]] -> Some path
| _ -> None
|> Option.get
let packages =
match argsMap |> Map.tryFind (nameof Arguments.Packages) with
| Some [[ Arguments.Packages packages ]] -> packages
| _ -> [[]]
let modules =
match argsMap |> Map.tryFind (nameof Arguments.Modules) with
| Some [[ Arguments.Modules modules ]] -> modules
| _ -> [[]]
let runtime =
match argsMap |> Map.tryFind (nameof Arguments.Runtime) with
| Some [[ Arguments.Runtime runtime ]] -> Some runtime
| _ -> None
let persistOnly = argsMap |> Map.containsKey (nameof Arguments.Persist_Only)
if persistOnly
then path |> persistFile packages modules |> Async.map (fun _ -> 0)
else path |> buildFile runtime packages modules
|> Async.runWithTimeout (60000 * 60)
|> function
| Some exitCode -> exitCode
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> Runtime.splitArgs
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 32.54s - return value ]────────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 32.55s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:32 #35 [Debug] persistCodeProject / packages: [Argu; │
│ FSharp.Control.AsyncSeq; System.CommandLine; ... ] / modules: [ │
│ lib/fsharp/Common.fs; lib/fsharp/CommonFSharp.fs; lib/fsharp/Async.fs; ... ] │
│ / name: Builder / code.Length: 7086 │
│ 00:00:32 #36 [Debug] buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj │
│ 00:00:32 #37 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
│ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
│ --runtime linux-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\Builder" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:33 #38 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:34 #39 [Verbose] > Determining projects to restore... │
│ 00:00:35 #40 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 815 │
│ ms). │
│ 00:00:36 #41 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
│ 00:00:43 #42 [Verbose] > Builder -> │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\linu │
│ x-x64\Builder.dll │
│ 00:00:45 #43 [Verbose] > Builder -> │
│ C:\home\git\polyglot\apps\builder\dist\ │
│ 00:00:45 #44 [Debug] executeAsync / exitCode: 0 / output.Length: 692 │
│ 00:00:45 #45 [Debug] executeAsync / options: { Command = │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
│ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
│ --runtime win-x64" │
│ WorkingDirectory = Some │
│ "C:\home\git\polyglot\target\polyglot\builder\Builder" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:45 #46 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:46 #47 [Verbose] > Determining projects to restore... │
│ 00:00:47 #48 [Verbose] > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 693 │
│ ms). │
│ 00:00:47 #49 [Verbose] > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
│ 00:00:57 #50 [Verbose] > Builder -> │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\win- │
│ x64\Builder.dll │
│ 00:01:04 #51 [Verbose] > Builder -> │
│ C:\home\git\polyglot\apps\builder\dist\ │
│ 00:01:04 #52 [Debug] executeAsync / exitCode: 0 / output.Length: 690 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Builder.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 327121 bytes to Builder.dib.html
In [ ]:
{ . "$ScriptDir/../apps/parser/build.ps1" } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # DibParser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── pwsh ────────────────────────────────────────────────────────────────────────
ls ~/.nuget/packages/argu
╭─[ 634.55ms - stdout ]────────────────────────────────────────────────────────╮
│ │
│ Directory: C:\Users\i574n\.nuget\packages\argu │
│ │
│ Mode LastWriteTime Length[ │
│ 32;1m Name │
│ ---- ------------- ------ [ │
│ 32;1m---- │
│ d---- 2023-05-17 3:38 PM 6.1.1 │
│ d---- 2024-03-12 8:22 PM 6.1.4 │
│ d---- 2024-01-29 5:12 PM 6.1.5 │
│ d---- 2024-03-12 8:20 PM 6.2.0 │
│ d---- 2024-02-23 6:50 PM 6.2.1 │
│ d---- 2024-03-12 8:15 PM 6.2.2 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsec.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsecCS.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FParsec
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## escapeCell (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline escapeCell input =
input
|> String.split [[| '\n' |]]
|> Array.map (function
| line when line |> String.startsWith "\\#!" || line |>
String.startsWith "\\#r" ->
System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#")
| line -> line
)
|> String.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
$"a{nl}\\#!magic{nl}b{nl}"
|> escapeCell
|> _assert_eq (
$"a{nl}#!magic{nl}b{nl}"
)
╭─[ 65.14ms - stdout ]─────────────────────────────────────────────────────────╮
│ a │
│ #!magic │
│ b │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicMarker │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicMarker : Parser<string, unit> = pstring "#!"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic"
|> run magicMarker
|> _assert_eq (
Success ("#!", (), Position ("", 2, 1, 3))
)
╭─[ 47.35ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: #! │
│ Item2: <null> │
│ Item3: Position │
│ Index: 2 │
│ Line: 1 │
│ Column: 3 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"##!magic"
|> run magicMarker
|> _assert_eq (
Failure (
$"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 58.40ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: Error in Ln: 1 Col: 1 │
│ ##!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ Item2: ParserError │
│ Position: Position │
│ Index: 0 │
│ Line: 1 │
│ Column: 1 │
│ StreamName: │
│ UserState: <null> │
│ Messages: ErrorMessageList │
│ Head: ExpectedString │
│ String: #! │
│ Type: ExpectedString │
│ Tail: <null> │
│ Item3: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicCommand │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicCommand =
magicMarker
>>. manyTill anyChar newline
|>> (System.String.Concat >> String.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a"
|> run magicCommand
|> _assert_eq (
Success ("magic", (), Position ("", 8, 2, 1))
)
╭─[ 35.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: magic │
│ Item2: <null> │
│ Item3: Position │
│ Index: 8 │
│ Line: 2 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
" #!magic
a"
|> run magicCommand
|> _assert_eq (
Failure (
$"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 41.64ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: Error in Ln: 1 Col: 1 │
│ #!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ Item2: ParserError │
│ Position: Position │
│ Index: 0 │
│ Line: 1 │
│ Column: 1 │
│ StreamName: │
│ UserState: <null> │
│ Messages: ErrorMessageList │
│ Head: ExpectedString │
│ String: #! │
│ Type: ExpectedString │
│ Tail: <null> │
│ Item3: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## content │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let content =
(newline >>. magicMarker) <|> (eof >>. preturn "")
|> attempt
|> lookAhead
|> manyTill anyChar
|>> (System.String.Concat >> String.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run content
|> _assert_eq (
Success ("#!magic
a", (), Position ("", 14, 7, 1))
)
╭─[ 38.82ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: #!magic │
│ │
│ │
│ a │
│ Item2: <null> │
│ Item3: Position │
│ Index: 14 │
│ Line: 7 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Block =
{
magic : string
content : string
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let block =
pipe2
magicCommand
content
(fun magic content ->
{
magic = magic
content = content
})
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run block
|> _assert_eq (
Success (
{ magic = "magic"; content = "a" },
(),
Position ("", 14, 7, 1)
)
)
╭─[ 46.52ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: Block │
│ magic: magic │
│ content: a │
│ Item2: <null> │
│ Item3: Position │
│ Index: 14 │
│ Line: 7 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## blocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let blocks =
skipMany newline
>>. sepEndBy block (skipMany1 newline)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic1
a
\#!magic2
b
"
|> escapeCell
|> run blocks
|> _assert_eq (
Success (
[[
{ magic = "magic1"; content = "a" }
{ magic = "magic2"; content = "b" }
]],
(),
Position ("", 26, 9, 1)
)
)
╭─[ 49.47ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item1: FSharpList<Block> │
│ - magic: magic1 │
│ content: a │
│ - magic: magic2 │
│ content: b │
│ Item2: <null> │
│ Item3: Position │
│ Index: 26 │
│ Line: 9 │
│ Column: 1 │
│ StreamName: │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Output │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Output =
| Fs
| Md
| Spi
| Spir
let inline kernelOutputs magic =
match magic with
| "fsharp" -> [[ Fs ]]
| "markdown" -> [[ Md ]]
| "spiral" -> [[ Spi; Spir ]]
| _ -> [[]]
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlock │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlock output (block : Block) =
match output, block with
| output, { magic = "markdown"; content = content } ->
let markdownComment =
match output with
| Spi | Spir -> "// // "
| Fs -> "/// "
| _ -> ""
content
|> String.split [[| '\n' |]]
|> Array.map (String.trimEnd [[||]])
|> Array.filter (String.endsWith " (test)" >> not)
|> Array.map (function
| "" -> markdownComment |> String.trim
| line -> System.Text.RegularExpressions.Regex.Replace (line,
"^\\s*", $"$&{markdownComment}")
)
|> String.concat "\n"
| Fs, { magic = "fsharp"; content = content } ->
let trimmedContent = content |> String.trim
if trimmedContent |> String.startsWith "//// test" || trimmedContent |>
String.startsWith "//// ignore"
then ""
else
content
|> String.split [[| '\n' |]]
|> Array.filter (String.trimStart [[||]] >> String.startsWith "#r"
>> not)
|> String.concat "\n"
| (Spi | Spir), { magic = "spiral"; content = content } ->
let trimmedContent = content |> String.trim
if trimmedContent |> String.startsWith "// // test" || trimmedContent |>
String.startsWith "// // ignore"
then ""
else content
| _ -> ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
c
\#!markdown
c
\#!fsharp
let a = 1"
|> escapeCell
|> run block
|> function
| Success (block, _, _) -> formatBlock Fs block
| Failure (msg, _, _) -> failwith msg
|> _assert_eq "/// a
///
/// b
///
/// c"
╭─[ 60.14ms - stdout ]─────────────────────────────────────────────────────────╮
│ /// a │
│ /// │
│ /// b │
│ /// │
│ /// c │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlocks output blocks =
blocks
|> List.map (formatBlock output)
|> List.filter ((<>) "")
|> String.concat "\n\n"
|> fun s -> s + "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
\#!markdown
c
\#!fsharp
let a = 1
\#!markdown
d (test)
\#!fsharp
//// test
let a = 2
\#!markdown
e
\#!fsharp
let a = 3"
|> escapeCell
|> run blocks
|> function
| Success (blocks, _, _) -> formatBlocks Fs blocks
| Failure (msg, _, _) -> failwith msg
|> _assert_eq "/// a
///
/// b
/// c
let a = 1
/// e
let a = 3
"
╭─[ 65.24ms - stdout ]─────────────────────────────────────────────────────────╮
│ /// a │
│ /// │
│ /// b │
│ │
│ /// c │
│ │
│ let a = 1 │
│ │
│ /// e │
│ │
│ let a = 3 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parse │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parse output input =
match run blocks input with
| Success (blocks, _, _) ->
let blocks =
blocks
|> List.filter (fun block ->
block.magic |> kernelOutputs |> List.contains output ||
block.magic = "markdown"
)
match blocks with
| { magic = "markdown"; content = content } :: _
when output = Fs
&& content |> String.startsWith "# "
&& content |> String.endsWith ")"
->
let inline indentBlock (block : Block) =
{ block with
content =
block.content
|> String.split [[| '\n' |]]
|> Array.fold
(fun (lines, isMultiline) line ->
let trimmedLine = line |> String.trim
if trimmedLine = ""
then "" :: lines, isMultiline
else
let inline singleQuoteLine () =
trimmedLine |> Seq.sumBy ((=) '"' >>
System.Convert.ToInt32) = 1
&& trimmedLine |> String.contains
@"'""'" |> not
&& trimmedLine |> String.endsWith "{" |>
not
&& trimmedLine |> String.endsWith "{|"
|> not
&& trimmedLine |> String.startsWith "}"
|> not
&& trimmedLine |> String.startsWith "|}"
|> not
match isMultiline, trimmedLine |>
String.splitString [[| $"{q}{q}{q}" |]] with
| false, [[| _; _ |]] ->
$" {line}" :: lines, true
| true, [[| _; _ |]] ->
line :: lines, false
| false, _ when singleQuoteLine () ->
$" {line}" :: lines, true
| false, _ when line |> String.startsWith
"#" && block.magic = "fsharp" ->
line :: lines, false
| false, _ ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () && line |>
String.startsWith " " ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () ->
line :: lines, false
| true, _ ->
line :: lines, true
)
([[]], false)
|> fst
|> List.rev
|> String.concat "\n"
}
let moduleName, namespaceName =
System.Text.RegularExpressions.Regex.Match (content, @"# (.*)
\((.*)\)$")
|> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value
let moduleBlock =
{
magic = "fsharp"
content =
$"#if !INTERACTIVE
namespace {namespaceName}
#endif
module {moduleName} ="
}
blocks
|> List.indexed
|> List.fold
(fun blocks (index, block) ->
match index with
| 0 -> blocks
| 1 -> indentBlock block :: moduleBlock :: blocks
| _ -> indentBlock block :: blocks
)
[[]]
|> List.rev
| _ -> blocks
|> Result.Ok
| Failure (errorMsg, _, _) -> Result.Error errorMsg
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example1 =
$"""#!meta
{{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name":
"fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}}
\#!markdown
# TestModule (TestNamespace)
\#!fsharp
\#!import file.dib
\#!fsharp
\#r "nuget:Expecto"
\#!markdown
## ParserLibrary
\#!fsharp
open System
\#!markdown
## x (test)
\#!fsharp
//// ignore
let x = 1
\#!spiral
// // test
inl x = 0i32
\#!spiral
inl x = 0i32
\#!markdown
### TextInput
\#!fsharp
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
\#!fsharp
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}"""
|> escapeCell
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Fs
|> Result.toOption
|> Option.get
|> (formatBlocks Fs)
|> _assert_eq $"""#if !INTERACTIVE
namespace TestNamespace
#endif
module TestModule =
/// ## ParserLibrary
open System
/// ### TextInput
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}
"""
╭─[ 196.25ms - stdout ]────────────────────────────────────────────────────────╮
│ #if !INTERACTIVE │
│ namespace TestNamespace │
│ #endif │
│ │
│ module TestModule = │
│ │
│ /// ## ParserLibrary │
│ │
│ open System │
│ │
│ /// ### TextInput │
│ │
│ let str1 = "abc │
│ def" │
│ │
│ let str2 = │
│ "abc\ │
│ def" │
│ │
│ let str3 = │
│ $"1{ │
│ 1 │
│ }1" │
│ │
│ let str4 = │
│ $"1{({| │
│ a = 1 │
│ |}).a}1" │
│ │
│ let str5 = │
│ "abc \ │
│ def" │
│ │
│ let x = │
│ match '"' with │
│ | '"' -> true │
│ | _ -> false │
│ │
│ let long1 = """a""" │
│ │
│ let long2 = │
│ """ │
│ a │
│ """ │
│ │
│ type Position = │
│ { │
│ #if INTERACTIVE │
│ line : string │
│ #else │
│ line : int │
│ #endif │
│ column : int │
│ } │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Md
|> Result.toOption
|> Option.get
|> (formatBlocks Md)
|> _assert_eq "# TestModule (TestNamespace)
## ParserLibrary
### TextInput
"
╭─[ 194.65ms - stdout ]────────────────────────────────────────────────────────╮
│ # TestModule (TestNamespace) │
│ │
│ ## ParserLibrary │
│ │
│ ### TextInput │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Spi
|> Result.toOption
|> Option.get
|> (formatBlocks Spi)
|> _assert_eq "// // # TestModule (TestNamespace)
// // ## ParserLibrary
inl x = 0i32
// // ### TextInput
"
╭─[ 162.64ms - stdout ]────────────────────────────────────────────────────────╮
│ // // # TestModule (TestNamespace) │
│ │
│ // // ## ParserLibrary │
│ │
│ inl x = 0i32 │
│ │
│ // // ### TextInput │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parseDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseDibCode output file = async {
let getLocals () = $"output: {output} / file: {file} / {getLocals ()}"
trace Debug (fun () -> "parseDibCode") getLocals
let! input = file |> FileSystem.readAllTextAsync
match parse output input with
| Result.Ok blocks -> return blocks |> formatBlocks output
| Result.Error msg -> return failwith msg
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeDibCode output path = async {
let getLocals () = $"output: {output} / path: {path} / {getLocals ()}"
trace Debug (fun () -> "writeDibCode") getLocals
let! result = parseDibCode output path
let outputPath = path |> String.replace ".dib" $".{output |> string |>
String.toLower}"
do! result |> FileSystem.writeAllTextAsync outputPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]]
File of file : string * Output
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| File _ -> nameof File
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 206.50ms - return value ]──────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │
│ │
│ FILE: │
│ │
│ <file> <fs|md|spi|spir> │
│ File │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let files =
argsMap.[[nameof Arguments.File]]
|> List.map (function
| Arguments.File (path, output) -> path, output
)
files
|> List.map (fun (path, output) -> path |> writeDibCode output)
|> Async.Parallel
|> Async.Ignore
|> Async.runWithTimeout 30000
|> function
| Some () -> 0
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> Runtime.splitArgs
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 140.92ms - return value ]──────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 152.96ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] writeDibCode / output: Fs / path: DibParser.dib │
│ 00:00:00 #2 [Debug] parseDibCode / output: Fs / file: DibParser.dib │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook DibParser.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 368966 bytes to DibParser.dib.html
00:00:00 #1 [Debug] persistCodeProject / packages: [Argu; FParsec; FSharp.Control.AsyncSeq; ... ] / modules: [lib/fsharp/Common.fs; lib/fsharp/CommonFSharp.fs; lib/fsharp/Async.fs; ... ] / name: DibParser / code.Length: 9066
00:00:00 #2 [Debug] buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj
00:00:00 #3 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime linux-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\DibParser"
CancellationToken = None
OnLine = None }
00:00:00 #4 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 #5 [Verbose] > Determining projects to restore...
00:00:02 #6 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 527 ms).
00:00:02 #7 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj]
00:00:09 #8 [Verbose] > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\linux-x64\DibParser.dll
00:00:10 #9 [Verbose] > DibParser -> C:\home\git\polyglot\apps\parser\dist\
00:00:10 #10 [Debug] executeAsync / exitCode: 0 / output.Length: 707
00:00:10 #11 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime win-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\DibParser"
CancellationToken = None
OnLine = None }
00:00:11 #12 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:11 #13 [Verbose] > Determining projects to restore...
00:00:12 #14 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 512 ms).
00:00:12 #15 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj]
00:00:20 #16 [Verbose] > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\win-x64\DibParser.dll
00:00:28 #17 [Verbose] > DibParser -> C:\home\git\polyglot\apps\parser\dist\
00:00:28 #18 [Debug] executeAsync / exitCode: 0 / output.Length: 705
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # JsonParser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import Parser.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Parser =
open Common
/// ### TextInput
type Position =
{
line : int
column : int
}
let initialPos = { line = 0; column = 0 }
let inline incrCol (pos : Position) =
{ pos with column = pos.column + 1 }
let inline incrLine pos =
{ line = pos.line + 1; column = 0 }
type InputState =
{
lines : string[[]]
position : Position
}
let inline fromStr str =
{
lines =
if str |> String.IsNullOrEmpty
then [[||]]
else str |> String.splitString [[| "\r\n"; "\n" |]]
position = initialPos
}
...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open Parser
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## JsonParser │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
(*
// --------------------------------
JSON spec from http://www.json.org/
// --------------------------------
The JSON spec is available at [[json.org]](http://www.json.org/). I'll paraphase
it here:
* A `value` can be a `string` or a `number` or a `bool` or `null` or an `object`
or an `array`.
* These structures can be nested.
* A `string` is a sequence of zero or more Unicode characters, wrapped in double
quotes, using backslash escapes.
* A `number` is very much like a C or Java number, except that the octal and
hexadecimal formats are not used.
* A `boolean` is the literal `true` or `false`
* A `null` is the literal `null`
* An `object` is an unordered set of name/value pairs.
* An object begins with { (left brace) and ends with } (right brace).
* Each name is followed by : (colon) and the name/value pairs are separated by
, (comma).
* An `array` is an ordered collection of values.
* An array begins with [[ (left bracket) and ends with ]] (right bracket).
* Values are separated by , (comma).
* Whitespace can be inserted between any pair of tokens.
*)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline parserEqual (expected : ParseResult<'a>) (actual : ParseResult<'a *
Input>) =
match actual, expected with
| Success (_actual, _), Success _expected ->
printResult actual
_actual |> _assert_eq _expected
| Failure (l1, e1, p1), Failure (l2, e2, p2) when l1 = l2 && e1 = e2 && p1 =
p2 ->
printResult actual
| _ ->
printfn $"Actual: {actual}"
printfn $"Expected: {expected}"
failwith "Parse failed"
actual
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### JValue │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type JValue =
| JString of string
| JNumber of float
| JBool of bool
| JNull
| JObject of Map<string, JValue>
| JArray of JValue list
── fsharp ──────────────────────────────────────────────────────────────────────
let jValue, jValueRef = createParserForwardedToRef<JValue> ()
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jNull │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jNull =
pstring "null"
>>% JNull
<?> "null"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
jValueRef <|
choice
[[
jNull
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jValue "null"
|> parserEqual (Success JNull)
╭─[ 247.72ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNull, { lines = [ │
│ |"null"|]<br/> position = { line = 0<br/> │
│ column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNull, { lines = [|"null"|]<br/> │
│ position = { line = 0<br/> column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNull</code></span></summary><div><table><thead> │
│ <tr></tr></thead><tbody><tr><td>IsJString</td><td><d... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 257.29ms - stdout ]────────────────────────────────────────────────────────╮
│ JNull │
│ JValue │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: True │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNull "nulp"
|> parserEqual (
Failure (
"null",
"Unexpected 'p'",
{ currentLine = "nulp"; line = 0; column = 3 }
)
)
╭─[ 50.77ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("null", "Unexpected │
│ 'p'", { currentLine = "nulp"<br/> │
│ line = 0<br/> column = 3 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>null</pre></div></td></tr><tr><td>Item2</td><td>< │
│ div class="dni-plaintext"><pre>Unexpected │
│ 'p'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "nulp"<br/> line = 0<br/> column = 3 │
│ }</code></span></summary><div><table><thead><tr></tr></thead... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 58.80ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:3 Error parsing null │
│ nulp │
│ ^Unexpected 'p' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jBool │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jBool =
let jtrue =
pstring "true"
>>% JBool true
let jfalse =
pstring "false"
>>% JBool false
jtrue <|> jfalse
<?> "bool"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
jValueRef <|
choice
[[
jNull
jBool
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jBool "true"
|> parserEqual (Success (JBool true))
╭─[ 55.85ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JBool true, { lines = [ │
│ |"true"|]<br/> position = { line = 0<br/> │
│ column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JBool true, { lines = [|"true"|]<br/> │
│ position = { line = 0<br/> column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JBool │
│ true</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr.. │
│ . │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 63.65ms - stdout ]─────────────────────────────────────────────────────────╮
│ JBool true │
│ JBool │
│ Item: True │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: True │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jBool "false"
|> parserEqual (Success (JBool false))
╭─[ 61.67ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JBool false, { lines = [ │
│ |"false"|]<br/> position = { line = 0<br/> │
│ column = 5 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JBool false, { lines = [ │
│ |"false"|]<br/> position = { line = 0<br/> column = │
│ 5 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JBool │
│ false</code></span></summary><div><table><thead><tr></tr></thead><tb... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 69.73ms - stdout ]─────────────────────────────────────────────────────────╮
│ JBool false │
│ JBool │
│ Item: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: True │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jBool "truX"
|> parserEqual (
Failure (
"bool",
"Unexpected 't'",
{ currentLine = "truX"; line = 0; column = 0 }
)
)
╭─[ 78.35ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("bool", "Unexpected │
│ 't'", { currentLine = "truX"<br/> │
│ line = 0<br/> column = 0 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>bool</pre></div></td></tr><tr><td>Item2</td><td>< │
│ div class="dni-plaintext"><pre>Unexpected │
│ 't'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "truX"<br/> line = 0<br/> column = 0 │
│ }</code></span></summary><div><table><thead><tr></tr></thead... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 85.57ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:0 Error parsing bool │
│ truX │
│ ^Unexpected 't' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jUnescapedChar │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jUnescapedChar =
satisfy (fun ch -> ch <> '\\' && ch <> '\"') "char"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jUnescapedChar "a"
|> parserEqual (Success 'a')
╭─[ 65.50ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('a', { lines = [ │
│ |"a"|]<br/> position = { line = 0<br/> │
│ column = 1 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(a, { lines = [|"a"|]<br/> position = │
│ { line = 0<br/> column = 1 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>a</pre></div></td></tr><tr><td>Item2</td><td><det │
│ ails class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines │
│ = [|"a"|]<br/... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 73.40ms - stdout ]─────────────────────────────────────────────────────────╮
│ 'a' │
│ a │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jUnescapedChar "\\"
|> parserEqual (
Failure (
"char",
"Unexpected '\\'",
{ currentLine = "\\"; line = 0; column = 0 }
)
)
╭─[ 40.05ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("char", "Unexpected │
│ '\'", { currentLine = "\"<br/> │
│ line = 0<br/> column = 0 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>char</pre></div></td></tr><tr><td>Item2</td><td>< │
│ div class="dni-plaintext"><pre>Unexpected │
│ '\'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "\"<br/> line = 0<br/> column = 0 │
│ }</code></span></summary><div><table><thead><tr></tr></thead><tbod... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 47.68ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:0 Error parsing char │
│ \ │
│ ^Unexpected '\' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jEscapedChar │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jEscapedChar =
[[
("\\\"",'\"')
("\\\\",'\\')
("\\/",'/')
("\\b",'\b')
("\\f",'\f')
("\\n",'\n')
("\\r",'\r')
("\\t",'\t')
]]
|> List.map (fun (toMatch, result) ->
pstring toMatch >>% result
)
|> choice
<?> "escaped char"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jEscapedChar "\\\\"
|> parserEqual (Success '\\')
╭─[ 41.06ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('\\', { lines = [ │
│ |"\\"|]<br/> position = { line = 0<br/> │
│ column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br/> position │
│ = { line = 0<br/> column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>\</pre></div></td></tr><tr><td>Item2</td><td><det │
│ ails class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines │
│ = [|"\\"... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 49.77ms - stdout ]─────────────────────────────────────────────────────────╮
│ '\\' │
│ \ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jEscapedChar "\\t"
|> parserEqual (Success '\t')
╭─[ 36.30ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('\009', { lines = [ │
│ |"\t"|]<br/> position = { line = 0<br/> │
│ column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>( , { lines = [|"\t"|]<br/> position = │
│ { line = 0<br/> column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div class="dni-plaintext"><pre> │
│ </pre></div></td></tr><tr><td>Item2</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │
│ |"\t... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 44.56ms - stdout ]─────────────────────────────────────────────────────────╮
│ '\009' │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jEscapedChar @"\\"
|> parserEqual (Success '\\')
╭─[ 40.73ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('\\', { lines = [ │
│ |"\\"|]<br/> position = { line = 0<br/> │
│ column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br/> position │
│ = { line = 0<br/> column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>\</pre></div></td></tr><tr><td>Item2</td><td><det │
│ ails class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines │
│ = [|"\\"... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 48.94ms - stdout ]─────────────────────────────────────────────────────────╮
│ '\\' │
│ \ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jEscapedChar @"\n"
|> parserEqual (Success '\n')
╭─[ 37.88ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('\010', { lines = [ │
│ |"<br/>"|]<br/> position = { line = 0<br/> │
│ column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(<br/>, { lines = [|"<br/>"|]<br/> │
│ position = { line = 0<br/> column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div class="dni-plaintext"><pre> │
│ </pre></div></td></tr><tr><td>Item2</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = │
│ ... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 45.73ms - stdout ]─────────────────────────────────────────────────────────╮
│ '\010' │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jEscapedChar "a"
|> parserEqual (
Failure (
"escaped char",
"Unexpected 'a'",
{ currentLine = "a"; line = 0; column = 0 }
)
)
╭─[ 28.12ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("escaped char", │
│ "Unexpected 'a'", { currentLine = "a"<br/> │
│ line = 0<br/> column = 0 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div class="dni-plaintext"><pre>escaped │
│ char</pre></div></td></tr><tr><td>Item2</td><td><div │
│ class="dni-plaintext"><pre>Unexpected │
│ 'a'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "a"<br/> line = 0<br/> column = 0 │
│ }</code></span></summary><div><tab... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 34.89ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:0 Error parsing escaped char │
│ a │
│ ^Unexpected 'a' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jUnicodeChar │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jUnicodeChar =
let backslash = pchar '\\'
let uChar = pchar 'u'
let hexdigit = anyOf ([[ '0' .. '9' ]] @ [[ 'A' .. 'F' ]] @ [[ 'a' .. 'f'
]])
let fourHexDigits = hexdigit .>>. hexdigit .>>. hexdigit .>>. hexdigit
let inline convertToChar (((h1, h2), h3), h4) =
let str = $"%c{h1}%c{h2}%c{h3}%c{h4}"
Int32.Parse (str, Globalization.NumberStyles.HexNumber) |> char
backslash >>. uChar >>. fourHexDigits
|>> convertToChar
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jUnicodeChar "\\u263A"
|> parserEqual (Success '☺')
╭─[ 56.62ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success ('☺', { lines = [ │
│ |"\u263A"|]<br/> position = { line = 0<br/> │
│ column = 6 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(☺, { lines = [|"\u263A"|]<br/> │
│ position = { line = 0<br/> column = 6 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>☺</pre></div></td></tr><tr><td>Item2</td><td><det │
│ ails class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines │
│ = [|"\u2... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 65.31ms - stdout ]─────────────────────────────────────────────────────────╮
│ '☺' │
│ ☺ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jString │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let quotedString =
let quote = pchar '\"' <?> "quote"
let jchar = jUnescapedChar <|> jEscapedChar <|> jUnicodeChar
quote >>. manyChars jchar .>> quote
── fsharp ──────────────────────────────────────────────────────────────────────
let jString =
quotedString
|>> JString
<?> "quoted string"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
jValueRef <|
choice
[[
jNull
jBool
jString
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jString "\"\""
|> parserEqual (Success (JString ""))
╭─[ 59.31ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JString "", { lines = [ │
│ |""""|]<br/> position = { line = │
│ 0<br/> column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JString "", { lines = [ │
│ |""""|]<br/> position = { line = 0<br/> │
│ column = 2 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JString ""</code></span></summary>... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 66.71ms - stdout ]─────────────────────────────────────────────────────────╮
│ JString "" │
│ JString │
│ Item: │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jString "\"a\""
|> parserEqual (Success (JString "a"))
╭─[ 34.64ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JString "a", { lines = [ │
│ |""a""|]<br/> position = { line = │
│ 0<br/> column = 3 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JString "a", { lines = [ │
│ |""a""|]<br/> position = { line = 0<br/> │
│ column = 3 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JString "a"</code></span></s... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 42.81ms - stdout ]─────────────────────────────────────────────────────────╮
│ JString "a" │
│ JString │
│ Item: a │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jString "\"ab\""
|> parserEqual (Success (JString "ab"))
╭─[ 49.28ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JString "ab", { lines = [ │
│ |""ab""|]<br/> position = { line │
│ = 0<br/> column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JString "ab", { lines = [ │
│ |""ab""|]<br/> position = { line = 0<br/> │
│ column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JString "ab"</code></s... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 58.72ms - stdout ]─────────────────────────────────────────────────────────╮
│ JString "ab" │
│ JString │
│ Item: ab │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jString "\"ab\\tde\""
|> parserEqual (Success (JString "ab\tde"))
╭─[ 45.71ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JString "ab de", { lines = [ │
│ |""ab\tde""|]<br/> position = │
│ { line = 0<br/> column = 8 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JString "ab de", { lines = [ │
│ |""ab\tde""|]<br/> position = { line = 0<br/> │
│ column = 8 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JString &quo... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 53.59ms - stdout ]─────────────────────────────────────────────────────────╮
│ JString "ab de" │
│ JString │
│ Item: ab de │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jString "\"ab\\u263Ade\""
|> parserEqual (Success (JString "ab☺de"))
╭─[ 38.64ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JString "ab☺de", { lines = [ │
│ |""ab\u263Ade""|]<br/> │
│ position = { line = 0<br/> column = │
│ 12 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JString "ab☺de", { lines = [ │
│ |""ab\u263Ade""|]<br/> position = { line = 0<br/> │
│ column = 12 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JS... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 46.32ms - stdout ]─────────────────────────────────────────────────────────╮
│ JString "ab☺de" │
│ JString │
│ Item: ab☺de │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jNumber │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jNumber =
let optSign = opt (pchar '-')
let zero = pstring "0"
let digitOneNine =
satisfy (fun ch -> Char.IsDigit ch && ch <> '0') "1-9"
let digit =
satisfy Char.IsDigit "digit"
let point = pchar '.'
let e = pchar 'e' <|> pchar 'E'
let optPlusMinus = opt (pchar '-' <|> pchar '+')
let nonZeroInt =
digitOneNine .>>. manyChars digit
|>> fun (first, rest) -> string first + rest
let intPart = zero <|> nonZeroInt
let fractionPart = point >>. manyChars1 digit
let exponentPart = e >>. optPlusMinus .>>. manyChars1 digit
let inline (|>?) opt f =
match opt with
| None -> ""
| Some x -> f x
let inline convertToJNumber (((optSign, intPart), fractionPart), expPart) =
let signStr =
optSign
|>? string
let fractionPartStr =
fractionPart
|>? (fun digits -> "." + digits)
let expPartStr =
expPart
|>? fun (optSign, digits) ->
let sign = optSign |>? string
"e" + sign + digits
(signStr + intPart + fractionPartStr + expPartStr)
|> float
|> JNumber
optSign .>>. intPart .>>. opt fractionPart .>>. opt exponentPart
|>> convertToJNumber
<?> "number"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
jValueRef <|
choice
[[
jNull
jBool
jString
jNumber
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber "123"
|> parserEqual (Success (JNumber 123.0))
╭─[ 68.73ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │
│ |"123"|]<br/> position = { line = 0<br/> │
│ column = 3 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 123.0, { lines = [ │
│ |"123"|]<br/> position = { line = 0<br/> column = 3 │
│ } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 123.0</code></span></summary><div><table><thead><tr></tr></the... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 82.23ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 123.0 │
│ JNumber │
│ Item: 123 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber "-123"
|> parserEqual (Success (JNumber -123.0))
╭─[ 47.16ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │
│ |"-123"|]<br/> position = { line = │
│ 0<br/> column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │
│ |"-123"|]<br/> position = { line = 0<br/> column = │
│ 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ -123.0</code></span></summary><div><table><thead><tr></t... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 54.91ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber -123.0 │
│ JNumber │
│ Item: -123 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber "123.4"
|> parserEqual (Success (JNumber 123.4))
╭─[ 52.83ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │
│ |"123.4"|]<br/> position = { line = │
│ 0<br/> column = 5 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │
│ |"123.4"|]<br/> position = { line = 0<br/> column = │
│ 5 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 123.4</code></span></summary><div><table><thead><tr></tr><... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 61.31ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 123.4 │
│ JNumber │
│ Item: 123.4 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber "-123."
|> parserEqual (Success (JNumber -123.0))
╭─[ 45.76ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │
│ |"-123."|]<br/> position = { line = │
│ 0<br/> column = 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │
│ |"-123."|]<br/> position = { line = 0<br/> column = │
│ 4 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ -123.0</code></span></summary><div><table><thead><tr><... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 54.50ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber -123.0 │
│ JNumber │
│ Item: -123 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber "00.1"
|> parserEqual (Success (JNumber 0.0))
╭─[ 43.45ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 0.0, { lines = [ │
│ |"00.1"|]<br/> position = { line = 0<br/> │
│ column = 1 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 0.0, { lines = [ │
│ |"00.1"|]<br/> position = { line = 0<br/> column = │
│ 1 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 0.0</code></span></summary><div><table><thead><tr></tr></thead><tbod... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 51.79ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 0.0 │
│ JNumber │
│ Item: 0 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let jNumber_ = jNumber .>> spaces1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "123"
|> parserEqual (Success (JNumber 123.0))
╭─[ 49.34ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │
│ |"123"|]<br/> position = { line = 1<br/> │
│ column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 123.0, { lines = [ │
│ |"123"|]<br/> position = { line = 1<br/> column = 0 │
│ } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 123.0</code></span></summary><div><table><thead><tr></tr></the... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 56.57ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 123.0 │
│ JNumber │
│ Item: 123 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "-123"
|> parserEqual (Success (JNumber -123.0))
╭─[ 47.69ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │
│ |"-123"|]<br/> position = { line = │
│ 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │
│ |"-123"|]<br/> position = { line = 1<br/> column = │
│ 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ -123.0</code></span></summary><div><table><thead><tr></t... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 56.92ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber -123.0 │
│ JNumber │
│ Item: -123 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "-123."
|> parserEqual (
Failure (
"number andThen many1 whitespace",
"Unexpected '.'",
{ currentLine = "-123."; line = 0; column = 4 }
)
)
╭─[ 33.74ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure<br/> ("number andThen many1 │
│ whitespace", "Unexpected '.'", { currentLine = │
│ "-123."<br/> │
│ line = 0<br/> │
│ column = 4 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div class="dni-plaintext"><pre>number andThen many1 │
│ whitespace</pre></div></td></tr><tr><td>Item2</td><td><div │
│ class="dni-plaintext"><pre>Unexpected │
│ '.'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 41.35ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:4 Error parsing number andThen many1 whitespace │
│ -123. │
│ ^Unexpected '.' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "123.4"
|> parserEqual (Success (JNumber 123.4))
╭─[ 45.39ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │
│ |"123.4"|]<br/> position = { line = │
│ 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │
│ |"123.4"|]<br/> position = { line = 1<br/> column = │
│ 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 123.4</code></span></summary><div><table><thead><tr></tr><... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 56.74ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 123.4 │
│ JNumber │
│ Item: 123.4 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "00.4"
|> parserEqual (
Failure (
"number andThen many1 whitespace",
"Unexpected '0'",
{ currentLine = "00.4"; line = 0; column = 1 }
)
)
╭─[ 42.79ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure<br/> ("number andThen many1 │
│ whitespace", "Unexpected '0'", { currentLine = │
│ "00.4"<br/> │
│ line = 0<br/> │
│ column = 1 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div class="dni-plaintext"><pre>number andThen many1 │
│ whitespace</pre></div></td></tr><tr><td>Item2</td><td><div │
│ class="dni-plaintext"><pre>Unexpected │
│ '0'</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "0... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 50.43ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:1 Error parsing number andThen many1 whitespace │
│ 00.4 │
│ ^Unexpected '0' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "123e4"
|> parserEqual (Success (JNumber 1230000.0))
╭─[ 44.77ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 1230000.0, { lines = [ │
│ |"123e4"|]<br/> position = { line = │
│ 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 1230000.0, { lines = [ │
│ |"123e4"|]<br/> position = { line = 1<br/> column = │
│ 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 1230000.0</code></span></summary><div><tab... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 52.47ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 1230000.0 │
│ JNumber │
│ Item: 1230000 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "123.4e5"
|> parserEqual (Success (JNumber 12340000.0))
╭─[ 55.63ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 12340000.0, { lines = [ │
│ |"123.4e5"|]<br/> position = { line │
│ = 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 12340000.0, { lines = [ │
│ |"123.4e5"|]<br/> position = { line = 1<br/> column │
│ = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber 12340000.0</code></span></summary>... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 65.27ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 12340000.0 │
│ JNumber │
│ Item: 12340000 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jNumber_ "123.4e-5"
|> parserEqual (Success (JNumber 0.001234))
╭─[ 47.61ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JNumber 0.001234, { lines = [ │
│ |"123.4e-5"|]<br/> position = { line = │
│ 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JNumber 0.001234, { lines = [ │
│ |"123.4e-5"|]<br/> position = { line = 1<br/> │
│ column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>JNumber │
│ 0.001234</code></span></summary><div><ta... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 55.00ms - stdout ]─────────────────────────────────────────────────────────╮
│ JNumber 0.001234 │
│ JNumber │
│ Item: 0.001234 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jArray │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jArray =
let left = pchar '[[' .>> spaces
let right = pchar ']]' .>> spaces
let comma = pchar ',' .>> spaces
let value = jValue .>> spaces
let values = sepBy value comma
between left values right
|>> JArray
<?> "array"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
jValueRef <|
choice
[[
jNull
jBool
jString
jNumber
jArray
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jArray "[[ 1, 2 ]]"
|> parserEqual (Success (JArray [[ JNumber 1.0; JNumber 2.0 ]]))
╭─[ 103.07ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success (JArray [JNumber 1.0; JNumber 2.0], { │
│ lines = [|"[ 1, 2 ]"|]<br/> │
│ position = { line = 1<br/> │
│ column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JArray [JNumber 1.0; JNumber 2.0], { lines = [ │
│ |"[ 1, 2 ]"|]<br/> position = { line = 1<br/> │
│ column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span class="d... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 110.75ms - stdout ]────────────────────────────────────────────────────────╮
│ JArray [JNumber 1.0; JNumber 2.0] │
│ JArray │
│ Item: FSharpList<JValue> │
│ - Item: 1 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: 2 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jArray "[[ 1, 2, ]]"
|> parserEqual (
Failure (
"array",
"Unexpected ','",
{ currentLine = "[[ 1, 2, ]]"; line = 0; column = 6 }
)
)
╭─[ 45.32ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("array", "Unexpected │
│ ','", { currentLine = "[ 1, 2, ]"<br/> │
│ line = 0<br/> column = 6 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>array</pre></div></td></tr><tr><td>Item2</td><td> │
│ <div class="dni-plaintext"><pre>Unexpected │
│ ','</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "[ 1, 2, ]"<br/> line = 0<br/> column = 6 │
│ }</code></span></summary><div><table><thead><t... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 54.08ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:6 Error parsing array │
│ [ 1, 2, ] │
│ ^Unexpected ',' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jObject │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let jObject =
let left = spaces >>. pchar '{' .>> spaces
let right = pchar '}' .>> spaces
let colon = pchar ':' .>> spaces
let comma = pchar ',' .>> spaces
let key = quotedString .>> spaces
let value = jValue .>> spaces
let keyValue = (key .>> colon) .>>. value
let keyValues = sepBy keyValue comma
between left keyValues right
|>> Map.ofList
|>> JObject
<?> "object"
── fsharp ──────────────────────────────────────────────────────────────────────
jValueRef <|
choice
[[
jNull
jBool
jString
jNumber
jArray
jObject
]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jObject """{ "a":1, "b" : 2 }"""
|> parserEqual (
Success (
JObject (
Map.ofList [[
"a", JNumber 1.0
"b", JNumber 2.0
]]
)
)
)
╭─[ 111.47ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success<br/> (JObject (map [("a", │
│ JNumber 1.0); ("b", JNumber 2.0)]),<br/> { lines = [|"{ │
│ "a":1, "b" : 2 }"|]<br/> position = { line = │
│ 1<br/> column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JObject (map [("a", JNumber 1.0); │
│ ("b", JNumber 2.0)]), { lines = [|"{ "a":1, │
│ "b" : 2 }"|]<br/> position = { line = 1<br/> │
│ column = 0 } │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbod... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 118.66ms - stdout ]────────────────────────────────────────────────────────╮
│ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │
│ JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: a │
│ Value: JNumber │
│ Item: 1 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: b │
│ Value: JNumber │
│ Item: 2 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run jObject """{ "a":1, "b" : 2, }"""
|> parserEqual (
Failure (
"object",
"Unexpected ','",
{ currentLine = """{ "a":1, "b" : 2, }"""; line = 0; column = 18 }
)
)
╭─[ 34.54ms - return value ]───────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Failure ("object", "Unexpected │
│ ','", { currentLine = "{ "a":1, "b" : │
│ 2, }"<br/> line = 0<br/> │
│ column = 18 │
│ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><div │
│ class="dni-plaintext"><pre>object</pre></div></td></tr><tr><td>Item2</td><td │
│ ><div class="dni-plaintext"><pre>Unexpected │
│ ','</pre></div></td></tr><tr><td>Item3</td><td><details │
│ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │
│ currentLine = "{ "a":1, "b" : 2, }"<br/> │
│ lin... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 41.84ms - stdout ]─────────────────────────────────────────────────────────╮
│ Line:0 Col:18 Error parsing object │
│ { "a":1, "b" : 2, } │
│ ^Unexpected ',' │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### jValue │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example1 = """{
"name" : "Scott",
"isMale" : true,
"bday" : {"year":2001, "month":12, "day":25 },
"favouriteColors" : [["blue", "green"]],
"emptyArray" : [[]],
"emptyObject" : {}
}"""
run jValue example1
|> parserEqual (
Success (
JObject (
Map.ofList [[
"name", JString "Scott"
"isMale", JBool true
"bday", JObject (
Map.ofList [[
"year", JNumber 2001.0
"month", JNumber 12.0
"day", JNumber 25.0
]]
)
"favouriteColors", JArray [[ JString "blue"; JString "green" ]]
"emptyArray", JArray [[]]
"emptyObject", JObject Map.empty
]]
)
)
)
╭─[ 184.32ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success<br/> (JObject<br/> (map<br/> │
│ [("bday",<br/> JObject<br/> (map<br/> │
│ [("day", JNumber 25.0); ("month", JNumber 12.0);<br/> │
│ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │
│ ]);<br/> ("emptyObject", JObject (map []));<br/> │
│ ("favouriteColors", │
│ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │
│ d>Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JObject<br/> (map<br/> [ │
│ ("bday",<br/> JObject<br/> (map<br/> [ │
│ (... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 191.79ms - stdout ]────────────────────────────────────────────────────────╮
│ JObject │
│ (map │
│ [("bday", │
│ JObject │
│ (map │
│ [("day", JNumber 25.0); ("month", JNumber 12.0); │
│ ("year", JNumber 2001.0)])); ("emptyArray", JArray []); │
│ ("emptyObject", JObject (map [])); │
│ ("favouriteColors", JArray [JString "blue"; JString "green"]); │
│ ("isMale", JBool true); ("name", JString "Scott")]) │
│ JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: bday │
│ Value: JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: day │
│ Value: JNumber 25.0 │
│ - Key: month │
│ Value: JNumber 12.0 │
│ - Key: year │
│ Value: JNumber 2001.0 │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ - Key: emptyArray │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: emptyObject │
│ Value: JObject │
│ Item: FSharpMap<String,JValue> │
│ │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ - Key: favouriteColors │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ - Item: blue │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: green │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: isMale │
│ Value: JBool │
│ Item: True │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: True │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: name │
│ Value: JString │
│ Item: Scott │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example2 = """{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}}"""
run jValue example2
|> parserEqual (
Success (
JObject (
Map.ofList [[
"widget", JObject (
Map.ofList [[
"debug", JString "on"
"window", JObject (
Map.ofList [[
"title", JString "Sample Konfabulator Widget"
"name", JString "main_window"
"width", JNumber 500.0
"height", JNumber 500.0
]]
)
"image", JObject (
Map.ofList [[
"src", JString "Images/Sun.png"
"name", JString "sun1"
"hOffset", JNumber 250.0
"vOffset", JNumber 250.0
"alignment", JString "center"
]]
)
"text", JObject (
Map.ofList [[
"data", JString "Click Here"
"size", JNumber 36.0
"style", JString "bold"
"name", JString "text1"
"hOffset", JNumber 250.0
"vOffset", JNumber 100.0
"alignment", JString "center"
"onMouseUp", JString "sun1.opacity =
(sun1.opacity / 100) * 90;"
]]
)
]]
)
]]
)
)
)
╭─[ 415.28ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success<br/> (JObject<br/> (map<br/> │
│ [("widget",<br/> JObject<br/> (map<br/> │
│ [("debug", JString "on");<br/> │
│ ("image",<br/> JObject<br/> │
│ (map<br/> [("alignment", JString │
│ "center");<br/> │
│ ("hOffset"...</code></span></summary><div><table><thead><tr></tr>< │
│ /thead><tbody><tr><td>Item</td><td><details │
│ class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JObject<br/> (map<br/> [ │
│ ("widget",<br/> JObject<br/> (map<br/> ... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 423.20ms - stdout ]────────────────────────────────────────────────────────╮
│ JObject │
│ (map │
│ [("widget", │
│ JObject │
│ (map │
│ [("debug", JString "on"); │
│ ("image", │
│ JObject │
│ (map │
│ [("alignment", JString "center"); ("hOffset", JNumber │
│ 250.0); │
│ ("name", JString "sun1"); ("src", JString │
│ "Images/Sun.png"); │
│ ("vOffset", JNumber 250.0)])); │
│ ("text", │
│ JObject │
│ (map │
│ [("alignment", JString "center"); │
│ ("data", JString "Click Here"); ("hOffset", JNumber │
│ 250.0); │
│ ("name", JString "text1"); │
│ ("onMouseUp", │
│ JString "sun1.opacity = (sun1.opacity / 100) * 90;"); │
│ ("size", JNumber 36.0); ("style", JString "bold"); │
│ ("vOffset", JNumber 100.0)])); │
│ ("window", │
│ JObject │
│ (map │
│ [("height", JNumber 500.0); ("name", JString │
│ "main_window"); │
│ ("title", JString "Sample Konfabulator Widget"); │
│ ("width", JNumber 500.0)]))]))]) │
│ JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: widget │
│ Value: JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: debug │
│ Value: JString "on" │
│ - Key: image │
│ Value: JObject │
│ (map │
│ [("alignment", JString "center"); ("hOffset", JNumber 250.0); │
│ ("name", JString "sun1"); ("src", JString "Images/Sun.png"); │
│ ("vOffset", JNumber 250.0)]) │
│ - Key: text │
│ Value: JObject │
│ (map │
│ [("alignment", JString "center"); ("data", JString "Click Here"); │
│ ("hOffset", JNumber 250.0); ("name", JString "text1"); │
│ ("onMouseUp", JString "sun1.opacity = (sun1.opacity / 100) * 90;"); │
│ ("size", JNumber 36.0); ("style", JString "bold"); │
│ ("vOffset", JNumber 100.0)]) │
│ - Key: window │
│ Value: JObject │
│ (map │
│ [("height", JNumber 500.0); ("name", JString "main_window"); │
│ ("title", JString "Sample Konfabulator Widget"); ("width", JNumber │
│ 500.0)]) │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example3 = """{
"string": "Hello, \"World\"!",
"escapedString": "This string contains \\/\\\\\\b\\f\\n\\r\\t\\\"\\'",
"number": 42,
"scientificNumber": 3.14e-10,
"boolean": true,
"nullValue": null,
"array": [[1, 2, 3, 4, 5]],
"unicodeString1": "프리마",
"unicodeString2": "\u0048\u0065\u006C\u006C\u006F,
\u0022\u0057\u006F\u0072\u006C\u0064\u0022!",
"specialCharacters": "!@#$%^&*()",
"emptyArray": [[]],
"emptyObject": {},
"nestedArrays": [[[[1, 2, 3]], [[4, 5, 6]]]],
"object": {
"nestedString": "Nested Value",
"nestedNumber": 3.14,
"nestedBoolean": false,
"nestedNull": null,
"nestedArray": [["a", "b", "c"]],
"nestedObject": {
"nestedProperty": "Nested Object Value"
}
},
"nestedObjects": [[
{"name": "Alice", "age": 25},
{"name": "Bob", "age": 30}
]]
}"""
run jValue example3
|> parserEqual (
Success (
JObject (
Map.ofList [[
"string", JString @"Hello, ""World""!"
"escapedString", JString @"This string contains
\/\\\b\f\n\r\t\""\'"
"number", JNumber 42.0
"scientificNumber", JNumber 3.14e-10
"boolean", JBool true
"nullValue", JNull
"array", JArray [[
JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber
5.0
]]
"unicodeString1", JString "프리마"
"unicodeString2", JString @"Hello, ""World""!"
"specialCharacters", JString "!@#$%^&*()"
"emptyArray", JArray [[]]
"emptyObject", JObject Map.empty
"nestedArrays", JArray [[
JArray [[ JNumber 1.0; JNumber 2.0; JNumber 3.0 ]]
JArray [[ JNumber 4.0; JNumber 5.0; JNumber 6.0 ]]
]]
"object", JObject (
Map.ofList [[
"nestedString", JString "Nested Value"
"nestedNumber", JNumber 3.14
"nestedBoolean", JBool false
"nestedNull", JNull
"nestedArray", JArray [[JString "a"; JString "b";
JString "c"]]
"nestedObject", JObject (
Map.ofList [[
"nestedProperty", JString "Nested Object Value"
]]
)
]]
)
"nestedObjects", JArray [[
JObject (Map.ofList [[ "name", JString "Alice"; "age", JNumber
25.0 ]])
JObject (Map.ofList [[ "name", JString "Bob"; "age", JNumber
30.0 ]])
]]
]]
)
)
)
╭─[ 543.96ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Success<br/> (JObject<br/> (map<br/> │
│ [("array",<br/> JArray<br/> [JNumber 1.0; │
│ JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber 5.0]);<br/> │
│ ("boolean", JBool true); ("emptyArray", JArray []);<br/> │
│ ("emptyObject", JObject (map []));<br/> │
│ ("escapedString", JString "This │
│ s...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │
│ td>Item</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(JObject<br/> (map<br/> [ │
│ ("array",<br/> JArray [JNumber 1.0; JNumber 2.0; JNumber │
│ 3.0; JNumber 4.0; J... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 553.02ms - stdout ]────────────────────────────────────────────────────────╮
│ JObject │
│ (map │
│ [("array", │
│ JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber │
│ 5.0]); │
│ ("boolean", JBool true); ("emptyArray", JArray []); │
│ ("emptyObject", JObject (map [])); │
│ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │
│ ("nestedArrays", │
│ JArray │
│ [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; │
│ JArray [JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │
│ ("nestedObjects", │
│ JArray │
│ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │
│ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │
│ ("nullValue", JNull); ("number", JNumber 42.0); ...]) │
│ JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: array │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ - Item: 1 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: 2 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: 3 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: 4 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Item: 5 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: boolean │
│ Value: JBool │
│ Item: True │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: True │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: emptyArray │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: emptyObject │
│ Value: JObject │
│ Item: FSharpMap<String,JValue> │
│ │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ - Key: escapedString │
│ Value: JString │
│ Item: This string contains \/\\\b\f\n\r\t\"\' │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: nestedArrays │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ - Item: [ JNumber 1.0, JNumber 2.0, JNumber 3.0 ] │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Item: [ JNumber 4.0, JNumber 5.0, JNumber 6.0 ] │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: nestedObjects │
│ Value: JArray │
│ Item: FSharpList<JValue> │
│ - Item: [ [age, JNumber 25.0], [name, JString "Alice"] ] │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ - Item: [ [age, JNumber 30.0], [name, JString "Bob"] ] │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: True │
│ - Key: nullValue │
│ Value: JValue │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: True │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: number │
│ Value: JNumber │
│ Item: 42 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: object │
│ Value: JObject │
│ Item: FSharpMap<String,JValue> │
│ - Key: nestedArray │
│ Value: JArray [JString "a"; JString "b"; JString "c"] │
│ - Key: nestedBoolean │
│ Value: JBool false │
│ - Key: nestedNull │
│ Value: JNull │
│ - Key: nestedNumber │
│ Value: JNumber 3.14 │
│ - Key: nestedObject │
│ Value: JObject (map [("nestedProperty", JString "Nested │
│ Object Value")]) │
│ - Key: nestedString │
│ Value: JString "Nested Value" │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ - Key: scientificNumber │
│ Value: JNumber │
│ Item: 3.14E-10 │
│ IsJString: False │
│ IsJNumber: True │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: specialCharacters │
│ Value: JString │
│ Item: !@#$%^&*() │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: string │
│ Value: JString │
│ Item: Hello, "World"! │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: unicodeString1 │
│ Value: JString │
│ Item: 프리마 │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ - Key: unicodeString2 │
│ Value: JString │
│ Item: Hello, "World"! │
│ IsJString: True │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: False │
│ IsJArray: False │
│ IsJString: False │
│ IsJNumber: False │
│ IsJBool: False │
│ IsJNull: False │
│ IsJObject: True │
│ IsJArray: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook JsonParser.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 545451 bytes to JsonParser.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Parser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### TextInput │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Position =
{
line : int
column : int
}
── fsharp ──────────────────────────────────────────────────────────────────────
let initialPos = { line = 0; column = 0 }
── fsharp ──────────────────────────────────────────────────────────────────────
let inline incrCol (pos : Position) =
{ pos with column = pos.column + 1 }
── fsharp ──────────────────────────────────────────────────────────────────────
let inline incrLine pos =
{ line = pos.line + 1; column = 0 }
── fsharp ──────────────────────────────────────────────────────────────────────
type InputState =
{
lines : string[[]]
position : Position
}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline fromStr str =
{
lines =
if str |> String.IsNullOrEmpty
then [[||]]
else str |> String.splitString [[| "\r\n"; "\n" |]]
position = initialPos
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
fromStr "" |> _assert_eq {
lines = [[||]]
position = { line = 0; column = 0 }
}
╭─[ 49.10ms - stdout ]─────────────────────────────────────────────────────────╮
│ InputState │
│ lines: [ ] │
│ position: Position │
│ line: 0 │
│ column: 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
fromStr "Hello \n World" |> _assert_eq {
lines = [[| "Hello "; " World" |]]
position = { line = 0; column = 0 }
}
╭─[ 25.82ms - stdout ]─────────────────────────────────────────────────────────╮
│ InputState │
│ lines: [ Hello , World ] │
│ position: Position │
│ line: 0 │
│ column: 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline currentLine inputState =
let linePos = inputState.position.line
if linePos < inputState.lines.Length
then inputState.lines.[[linePos]]
else "end of file"
── fsharp ──────────────────────────────────────────────────────────────────────
let inline nextChar input =
let linePos = input.position.line
let colPos = input.position.column
if linePos >= input.lines.Length
then input, None
else
let currentLine = currentLine input
if colPos < currentLine.Length then
let char = currentLine.[[colPos]]
let newPos = incrCol input.position
let newState = { input with position = newPos }
newState, Some char
else
let char = '\n'
let newPos = incrLine input.position
let newState = { input with position = newPos }
newState, Some char
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let newInput, charOpt = fromStr "Hello World" |> nextChar
newInput |> _assert_eq {
lines = [[| "Hello World" |]]
position = { line = 0; column = 1 }
}
charOpt |> _assert_eq (Some 'H')
╭─[ 42.11ms - stdout ]─────────────────────────────────────────────────────────╮
│ InputState │
│ lines: [ Hello World ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ FSharpOption<Char> │
│ Value: H │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let newInput, charOpt = fromStr "Hello\n\nWorld" |> nextChar
newInput |> _assert_eq {
lines = [[| "Hello"; ""; "World" |]]
position = { line = 0; column = 1 }
}
charOpt |> _assert_eq (Some 'H')
╭─[ 30.12ms - stdout ]─────────────────────────────────────────────────────────╮
│ InputState │
│ lines: [ Hello, , World ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ FSharpOption<Char> │
│ Value: H │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### Parser │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Input = InputState
type ParserLabel = string
type ParserError = string
type ParserPosition =
{
currentLine : string
line : int
column : int
}
type ParseResult<'a> =
| Success of 'a
| Failure of ParserLabel * ParserError * ParserPosition
type Parser<'a> =
{
label : ParserLabel
parseFn : Input -> ParseResult<'a * Input>
}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline printResult result =
match result with
| Success (value, input) ->
printfn $"%A{value}"
| Failure (label, error, parserPos) ->
let errorLine = parserPos.currentLine
let colPos = parserPos.column
let linePos = parserPos.line
let failureCaret = $"{' ' |> string |> String.replicate colPos}^{error}"
printfn $"Line:%i{linePos} Col:%i{colPos} Error parsing
%s{label}\n%s{errorLine}\n%s{failureCaret}"
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runOnInput parser input =
parser.parseFn input
── fsharp ──────────────────────────────────────────────────────────────────────
let inline run parser inputStr =
runOnInput parser (fromStr inputStr)
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parserPositionFromInputState (inputState : Input) =
{
currentLine = currentLine inputState
line = inputState.position.line
column = inputState.position.column
}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getLabel parser =
parser.label
── fsharp ──────────────────────────────────────────────────────────────────────
let inline setLabel parser newLabel =
{
label = newLabel
parseFn = fun input ->
match parser.parseFn input with
| Success s -> Success s
| Failure (oldLabel, err, pos) -> Failure (newLabel, err, pos)
}
── fsharp ──────────────────────────────────────────────────────────────────────
let (<?>) = setLabel
── fsharp ──────────────────────────────────────────────────────────────────────
let inline satisfy predicate label =
{
label = label
parseFn = fun input ->
let remainingInput, charOpt = nextChar input
match charOpt with
| None ->
let err = "No more input"
let pos = parserPositionFromInputState input
Failure (label, err, pos)
| Some first ->
if predicate first
then Success (first, remainingInput)
else
let err = $"Unexpected '%c{first}'"
let pos = parserPositionFromInputState input
Failure (label, err, pos)
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
runOnInput parser input |> _assert_eq (
Success (
'H',
{
lines = [[| "Hello" |]]
position = { line = 0; column = 1 }
}
)
)
╭─[ 34.14ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - H │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "World"
let parser = satisfy (fun c -> c = 'H') "H"
runOnInput parser input |> _assert_eq (
Failure (
"H",
"Unexpected 'W'",
{
currentLine = "World"
line = 0
column = 0
}
)
)
╭─[ 32.26ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: H │
│ Item2: Unexpected 'W' │
│ Item3: ParserPosition │
│ currentLine: World │
│ line: 0 │
│ column: 0 │
│ IsSuccess: False │
│ IsFailure: True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline bindP f p =
{
label = "unknown"
parseFn = fun input ->
match runOnInput p input with
| Failure (label, err, pos) -> Failure (label, err, pos)
| Success (value1, remainingInput) -> runOnInput (f value1)
remainingInput
}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (>>=) p f = bindP f p
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e"
runOnInput parser2 input |> _assert_eq (
Success (
'e',
{
lines = [[| "Hello" |]]
position = { line = 0; column = 2 }
}
)
)
╭─[ 50.55ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - e │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 2 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "World"
let parser = satisfy (fun c -> c = 'W') "W"
let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e"
runOnInput parser2 input |> _assert_eq (
Failure (
"e",
"Unexpected 'o'",
{
currentLine = "World"
line = 0
column = 1
}
)
)
╭─[ 42.69ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: e │
│ Item2: Unexpected 'o' │
│ Item3: ParserPosition │
│ currentLine: World │
│ line: 0 │
│ column: 1 │
│ IsSuccess: False │
│ IsFailure: True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline returnP x =
{
label = $"%A{x}"
parseFn = fun input -> Success (x, input)
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = returnP "Hello"
runOnInput parser input |> _assert_eq (
Success (
"Hello",
{
lines = [[| "Hello" |]]
position = { line = 0; column = 0 }
}
)
)
╭─[ 33.84ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - Hello │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 0 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline mapP f =
bindP (f >> returnP)
── fsharp ──────────────────────────────────────────────────────────────────────
let (<!>) = mapP
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (|>>) x f = f <!> x
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = parser |>> string
runOnInput parser2 input |> _assert_eq (
Success (
"H",
{
lines = [[| "Hello" |]]
position = { line = 0; column = 1 }
}
)
)
╭─[ 35.57ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - H │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline applyP fP xP =
fP >>=
fun f ->
xP >>=
fun x ->
returnP (f x)
── fsharp ──────────────────────────────────────────────────────────────────────
let (<*>) = applyP
── fsharp ──────────────────────────────────────────────────────────────────────
let inline lift2 f xP yP =
returnP f <*> xP <*> yP
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = satisfy (fun c -> c = 'e') "e"
let parser3 = lift2 (fun c1 c2 -> string c1 + string c2) parser parser2
runOnInput parser3 input |> _assert_eq (
Success (
"He",
{
lines = [[| "Hello" |]]
position = { line = 0; column = 2 }
}
)
)
╭─[ 71.68ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - He │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 2 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline andThen p1 p2 =
p1 >>=
fun p1Result ->
p2 >>=
fun p2Result ->
returnP (p1Result, p2Result)
<?> $"{getLabel p1} andThen {getLabel p2}"
── fsharp ──────────────────────────────────────────────────────────────────────
let (.>>.) = andThen
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = satisfy (fun c -> c = 'e') "e"
let parser3 = parser .>>. parser2
runOnInput parser3 input |> _assert_eq (
Success (
('H', 'e'),
{
lines = [[| "Hello" |]]
position = { line = 0; column = 2 }
}
)
)
╭─[ 65.17ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - ( H, e ) │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 2 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline orElse p1 p2 =
{
label = $"{getLabel p1} orElse {getLabel p2}"
parseFn = fun input ->
match runOnInput p1 input with
| Success _ as result -> result
| Failure _ -> runOnInput p2 input
}
── fsharp ──────────────────────────────────────────────────────────────────────
let (<|>) = orElse
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = satisfy (fun c -> c = 'h') "h"
let parser3 = parser <|> parser2
runOnInput parser3 input |> _assert_eq (
Success (
'h',
{
lines = [[| "hello" |]]
position = { line = 0; column = 1 }
}
)
)
╭─[ 38.26ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - h │
│ - InputState │
│ lines: [ hello ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline choice listOfParsers =
listOfParsers |> List.reduce (<|>)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = satisfy (fun c -> c = 'h') "h"
let parser3 = choice [[ parser; parser2 ]]
runOnInput parser3 input |> _assert_eq (
Success (
'h',
{
lines = [[| "hello" |]]
position = { line = 0; column = 1 }
}
)
)
╭─[ 48.16ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - h │
│ - InputState │
│ lines: [ hello ] │
│ position: Position │
│ line: 0 │
│ column: 1 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let rec sequence parserList =
match parserList with
| [[]] -> returnP [[]]
| head :: tail -> (lift2 cons) head (sequence tail)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = satisfy (fun c -> c = 'e') "e"
let parser3 = sequence [[ parser; parser2 ]]
runOnInput parser3 input |> _assert_eq (
Success (
[[ 'H'; 'e' ]],
{
lines = [[| "Hello" |]]
position = { line = 0; column = 2 }
}
)
)
╭─[ 61.21ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - [ H, e ] │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 2 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let rec parseZeroOrMore parser input =
match runOnInput parser input with
| Failure (_, _, _) ->
[[]], input
| Success (firstValue, inputAfterFirstParse) ->
let subsequentValues, remainingInput = parseZeroOrMore parser
inputAfterFirstParse
firstValue :: subsequentValues, remainingInput
── fsharp ──────────────────────────────────────────────────────────────────────
let inline many parser =
{
label = $"many {getLabel parser}"
parseFn = fun input -> Success (parseZeroOrMore parser input)
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = many parser
runOnInput parser2 input |> _assert_eq (
Success (
[[]],
{
lines = [[| "hello" |]]
position = { line = 0; column = 0 }
}
)
)
╭─[ 33.11ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - [ ] │
│ - InputState │
│ lines: [ hello ] │
│ position: Position │
│ line: 0 │
│ column: 0 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline many1 p =
p >>=
fun head ->
many p >>=
fun tail ->
returnP (head :: tail)
<?> $"many1 {getLabel p}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = many1 parser
runOnInput parser2 input |> _assert_eq (
Failure (
"many1 H",
"Unexpected 'h'",
{
currentLine = "hello"
line = 0
column = 0
}
)
)
╭─[ 44.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: many1 H │
│ Item2: Unexpected 'h' │
│ Item3: ParserPosition │
│ currentLine: hello │
│ line: 0 │
│ column: 0 │
│ IsSuccess: False │
│ IsFailure: True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline opt p =
let some = p |>> Some
let none = returnP None
(some <|> none)
<?> $"opt {getLabel p}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "hello"
let parser = satisfy (fun c -> c = 'H') "H"
let parser2 = opt parser
runOnInput parser2 input |> _assert_eq (
Success (
None,
{
lines = [[| "hello" |]]
position = { line = 0; column = 0 }
}
)
)
╭─[ 56.36ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - <null> │
│ - InputState │
│ lines: [ hello ] │
│ position: Position │
│ line: 0 │
│ column: 0 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (.>>) p1 p2 =
p1 .>>. p2
|> mapP fst
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (>>.) p1 p2 =
p1 .>>. p2
|> mapP snd
── fsharp ──────────────────────────────────────────────────────────────────────
let inline between p1 p2 p3 =
p1 >>. p2 .>> p3
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "[[Hello]]"
let parser =
between
(satisfy (fun c -> c = '[[') "[[")
(many (satisfy (fun c -> [[ 'a' .. 'z' ]] @ [[ 'A' .. 'Z' ]] |>
List.contains c) "letter"))
(satisfy (fun c -> c = ']]') "]]")
runOnInput parser input |> _assert_eq (
Success (
[[ 'H'; 'e'; 'l'; 'l'; 'o' ]],
{
lines = [[| "[[Hello]]" |]]
position = { line = 0; column = 7 }
}
)
)
╭─[ 109.51ms - stdout ]────────────────────────────────────────────────────────╮
│ Success │
│ Item: - [ H, e, l, l, o ] │
│ - InputState │
│ lines: [ [Hello] ] │
│ position: Position │
│ line: 0 │
│ column: 7 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline sepBy1 p sep =
let sepThenP = sep >>. p
p .>>. many sepThenP
|>> fun (p, pList) -> p :: pList
── fsharp ──────────────────────────────────────────────────────────────────────
let inline sepBy p sep =
sepBy1 p sep <|> returnP [[]]
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello,World"
let parser = sepBy (many (satisfy (fun c -> c <> ',') "not comma")) (satisfy
(fun c -> c = ',') "comma")
runOnInput parser input |> _assert_eq (
Success (
[[ [[ 'H'; 'e'; 'l'; 'l'; 'o' ]]; [[ 'W'; 'o'; 'r'; 'l'; 'd'; '\n' ]]
]],
{
lines = [[| "Hello,World" |]]
position = { line = 1; column = 0 }
}
)
)
╭─[ 78.85ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - FSharpList<FSharpList<Char>> │
│ [ H, e, l, l, o ] │
│ [ W, o, r, l, d, │
│ ] │
│ - InputState │
│ lines: [ Hello,World ] │
│ position: Position │
│ line: 1 │
│ column: 0 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline pchar charToMatch =
satisfy ((=) charToMatch) $"%c{charToMatch}"
── fsharp ──────────────────────────────────────────────────────────────────────
let inline anyOf listOfChars =
listOfChars
|> List.map pchar
|> choice
<?> $"anyOf %A{listOfChars}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = anyOf [[ 'H'; 'e'; 'l'; 'o' ]] |> many
runOnInput parser input |> _assert_eq (
Success (
[[ 'H'; 'e'; 'l'; 'l'; 'o' ]],
{
lines = [[| "Hello" |]]
position = { line = 0; column = 5 }
}
)
)
╭─[ 40.10ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - [ H, e, l, l, o ] │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 5 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline charListToStr charList =
charList |> List.toArray |> String
── fsharp ──────────────────────────────────────────────────────────────────────
let inline manyChars cp =
many cp
|>> charListToStr
── fsharp ──────────────────────────────────────────────────────────────────────
let inline manyChars1 cp =
many1 cp
|>> charListToStr
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = manyChars1 (anyOf [[ 'H'; 'e'; 'l'; 'o' ]])
runOnInput parser input |> _assert_eq (
Success (
"Hello",
{
lines = [[| "Hello" |]]
position = { line = 0; column = 5 }
}
)
)
╭─[ 55.79ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - Hello │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 5 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline pstring str =
str
|> List.ofSeq
|> List.map pchar
|> sequence
|> mapP charListToStr
<?> str
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = pstring "Hello"
runOnInput parser input |> _assert_eq (
Success (
"Hello",
{
lines = [[| "Hello" |]]
position = { line = 0; column = 5 }
}
)
)
╭─[ 46.25ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - Hello │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 5 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let whitespaceChar =
satisfy Char.IsWhiteSpace "whitespace"
── fsharp ──────────────────────────────────────────────────────────────────────
let spaces = many whitespaceChar
── fsharp ──────────────────────────────────────────────────────────────────────
let spaces1 = many1 whitespaceChar
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr " Hello"
let parser = spaces1 .>>. pstring "Hello"
runOnInput parser input |> _assert_eq (
Success (
([[ ' '; ' ' ]], "Hello"),
{
lines = [[| " Hello" |]]
position = { line = 0; column = 7 }
}
)
)
╭─[ 82.24ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - - [ , ] │
│ - Hello │
│ - InputState │
│ lines: [ Hello ] │
│ position: Position │
│ line: 0 │
│ column: 7 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let digitChar =
satisfy Char.IsDigit "digit"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let input = fromStr "Hello"
let parser = digitChar
runOnInput parser input |> _assert_eq (
Failure (
"digit",
"Unexpected 'H'",
{
currentLine = "Hello"
line = 0
column = 0
}
)
)
╭─[ 34.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure │
│ Item1: digit │
│ Item2: Unexpected 'H' │
│ Item3: ParserPosition │
│ currentLine: Hello │
│ line: 0 │
│ column: 0 │
│ IsSuccess: False │
│ IsFailure: True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let pint =
let inline resultToInt (sign, digits) =
let i = int digits
match sign with
| Some ch -> -i
| None -> i
let digits = manyChars1 digitChar
opt (pchar '-') .>>. digits
|> mapP resultToInt
<?> "integer"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run pint "-123"
|> _assert_eq (
Success (
-123,
{
lines = [[| "-123" |]]
position = { line = 0; column = 4 }
}
)
)
╭─[ 39.66ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - -123 │
│ - InputState │
│ lines: [ -123 ] │
│ position: Position │
│ line: 0 │
│ column: 4 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let pfloat =
let inline resultToFloat (((sign, digits1), point), digits2) =
let fl = float $"{digits1}.{digits2}"
match sign with
| Some ch -> -fl
| None -> fl
let digits = manyChars1 digitChar
opt (pchar '-') .>>. digits .>>. pchar '.' .>>. digits
|> mapP resultToFloat
<?> "float"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
run pfloat "-123.45"
|> _assert_eq (
Success (
-123.45,
{
lines = [[| "-123.45" |]]
position = { line = 0; column = 7 }
}
)
)
╭─[ 39.27ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success │
│ Item: - -123.45 │
│ - InputState │
│ lines: [ -123.45 ] │
│ position: Position │
│ line: 0 │
│ column: 7 │
│ - IsSuccess: True │
│ IsFailure: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline createParserForwardedToRef<'a> () =
let mutable parserRef : Parser<'a> =
{
label = "unknown"
parseFn = fun _ -> failwith "unfixed forwarded parser"
}
let wrapperParser =
{ parserRef with
parseFn = fun input -> runOnInput parserRef input
}
wrapperParser, (fun v -> parserRef <- v)
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (>>%) p x =
p
|>> fun _ -> x
[NbConvertApp] Converting notebook Parser.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 415212 bytes to Parser.dib.html
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Parser.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: JsonParser.dib
00:00:00 #2 [Debug] parseDibCode / output: Fs / file: Parser.dib
00:00:00 #3 [Debug] parseDibCode / output: Fs / file: JsonParser.dib
In [ ]:
{ . "$ScriptDir/../lib/fsharp/build.ps1" } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Async (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## choice │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## map │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline map fn a = async {
let! x = a
return fn x
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## catch │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline catch a =
a
|> Async.Catch
|> map (function
| Choice1Of2 result -> Ok result
| Choice2Of2 ex -> Error ex
)
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## runWithTimeoutAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runWithTimeoutAsync (timeout : int) fn =
let getLocals () = $"timeout: {timeout} / {getLocals ()}"
let timeoutTask = async {
do! Async.Sleep timeout
trace Debug (fun () -> "runWithTimeoutAsync") getLocals
return None
}
let task = async {
try
let! result = fn
return Some result
with
| :? System.AggregateException as ex when
ex.InnerExceptions
|> Seq.exists (function :?
System.Threading.Tasks.TaskCanceledException -> true | _ -> false)
->
let getLocals () = $"ex: {ex |> printException} / {getLocals ()}"
trace Warning (fun () -> "runWithTimeoutAsync") getLocals
return None
| ex ->
trace Critical (fun () -> $"runWithTimeoutAsync** / ex: {ex |>
printException}") getLocals
return None
}
[[ timeoutTask; task ]]
|> choice
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runWithTimeout timeout fn =
fn
|> runWithTimeoutAsync timeout
|> Async.RunSynchronously
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 60
|> runWithTimeout 10
|> _assert_eq None
╭─[ 164.90ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 10 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 10
|> runWithTimeout 60
|> _assert_eq (Some ())
╭─[ 112.05ms - stdout ]────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
async {
raise (exn "error")
}
|> runWithTimeout 60
|> _assert_eq None
╭─[ 128.47ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #2 [Critical] runWithTimeoutAsync** / ex: System.Exception: error / │
│ timeout: 60 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## runWithTimeoutChildAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runWithTimeoutChildAsync (timeout : int) fn = async {
let getLocals () = $"timeout: {timeout} / {getLocals ()}"
let! child = Async.StartChild (fn, timeout)
return!
child
|> catch
|> map (function
| Ok result -> Some result
| Error (:? System.TimeoutException as ex) ->
trace Debug (fun () -> $"runWithTimeoutChildAsync") getLocals
None
| Error ex ->
trace Critical (fun () -> $"runWithTimeoutChildAsync** / ex: {ex
|> printException}") getLocals
None
)
}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runWithTimeoutChild timeout fn =
fn
|> runWithTimeoutChildAsync timeout
|> Async.RunSynchronously
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 60
|> runWithTimeoutChild 10
|> _assert_eq None
╭─[ 93.34ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #3 [Debug] runWithTimeoutChildAsync / timeout: 10 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 10
|> runWithTimeoutChild 60
|> _assert_eq (Some ())
╭─[ 70.15ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
async {
raise (exn "error")
}
|> runWithTimeoutChild 60
|> _assert_eq None
╭─[ 77.58ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #4 [Critical] runWithTimeoutChildAsync** / ex: System.Exception: │
│ error / timeout: 60 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## runWithTimeoutStrict │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline runWithTimeoutStrict (timeout : int) fn =
let getLocals () = $"timeout: {timeout} / {getLocals ()}"
let timeoutTask = async {
do! Async.Sleep timeout
return None, getLocals
}
let task = async {
try
return Async.RunSynchronously (fn, timeout) |> Some, getLocals
with
| :? System.TimeoutException as ex ->
let getLocals () = $"ex: {ex |> printException} / {getLocals ()}"
return None, getLocals
| ex ->
trace Critical (fun () -> $"runWithTimeoutStrict / ex: {ex |>
printException}") getLocals
return raise ex
}
try
[[| timeoutTask; task |]]
|> Array.map Async.StartAsTask
|> System.Threading.Tasks.Task.WhenAny
|> fun task ->
match task.Result.Result with
| None, getLocals ->
trace Debug (fun () -> "runWithTimeoutStrict") getLocals
None
| result, _ -> result
with
| :? System.AggregateException as ex when
ex.InnerExceptions
|> Seq.exists (function :? System.Threading.Tasks.TaskCanceledException
-> true | _ -> false)
->
let getLocals () = $"ex: {ex |> printException} / {getLocals ()}"
trace Warning (fun () -> "runWithTimeoutStrict") getLocals
None
| ex ->
let getLocals () = $"ex: {ex |> printException} / {getLocals ()}"
trace Critical (fun () -> "runWithTimeoutStrict**") getLocals
None
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 60
|> runWithTimeoutStrict 10
|> _assert_eq None
╭─[ 88.82ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #5 [Debug] runWithTimeoutStrict / timeout: 10 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Async.Sleep 10
|> runWithTimeoutStrict 60
|> _assert_eq (Some ())
╭─[ 90.06ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
async {
raise (exn "error")
}
|> runWithTimeoutStrict 60
|> _assert_eq None
╭─[ 148.24ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:01 #6 [Critical] runWithTimeoutStrict / ex: System.Exception: error / │
│ timeout: 60 │
│ 00:00:01 #7 [Critical] runWithTimeoutStrict** / ex: │
│ System.AggregateException: One or more errors occurred. (error) / timeout: │
│ 60 │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## awaitValueTask │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline awaitValueTaskUnit (task : System.Threading.Tasks.ValueTask) =
task.AsTask () |> Async.AwaitTask
let inline awaitValueTask (task : System.Threading.Tasks.ValueTask<_>) =
task.AsTask () |> Async.AwaitTask
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## init │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline init x = async {
return x
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
init 1
|> Async.RunSynchronously
|> _assert_eq 1
╭─[ 39.59ms - stdout ]─────────────────────────────────────────────────────────╮
│ 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## mergeCancellationTokenWithDefaultAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline mergeCancellationTokenWithDefaultAsync (token :
System.Threading.CancellationToken) = async {
let! ct = Async.CancellationToken
let dct = Async.DefaultCancellationToken
let cts = System.Threading.CancellationTokenSource.CreateLinkedTokenSource
[[| ct; dct; token |]]
return cts.Token
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## withCancellationToken │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline withCancellationToken (ct : System.Threading.CancellationToken) fn =
Async.StartImmediateAsTask (fn, ct)
|> Async.AwaitTask
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let cts = new System.Threading.CancellationTokenSource ()
async {
let run = async {
do! Async.Sleep 100
return 1
}
let! child =
run
|> withCancellationToken cts.Token
|> catch
|> Async.StartChild
do! Async.Sleep 50
cts.Cancel ()
return! child
}
|> Async.RunSynchronously
|> Result.mapError (fun x -> x.Message)
|> _assert_eq (Error ("A task was canceled."))
╭─[ 196.38ms - stdout ]────────────────────────────────────────────────────────╮
│ FSharpResult<Int32,String> │
│ ResultValue: 0 │
│ ErrorValue: A task was canceled. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## withTraceLevel │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline withTraceLevel level fn = async {
let oldTraceLevel = traceLevel
try
traceLevel <- level
return! fn
finally
traceLevel <- oldTraceLevel
}
[NbConvertApp] Converting notebook Async.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 324813 bytes to Async.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # AsyncSeq (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/Async.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## subscribeEvent │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
type TestEvent () as self =
member val Calls = [[]] with get, set
member val Event = Event<ErrorEventHandler, ErrorEventArgs> () with get
member _.AddCall text =
self.Calls <- self.Calls @ [[ text ]]
member _.EventInterface =
{ new IEvent<ErrorEventHandler, ErrorEventArgs> with
member _.AddHandler handler =
self.AddCall "AddHandler"
self.Event.Publish.AddHandler handler
member _.RemoveHandler handler =
self.AddCall "RemoveHandler"
self.Event.Publish.RemoveHandler handler
member _.Subscribe observer =
self.AddCall "IObservable.Subscribe"
let disposable = self.Event.Publish.Subscribe observer
newDisposable (fun () ->
self.AddCall "IObservable.Dispose"
disposable.Dispose ()
)
}
member _.Subscribe () =
subscribeEvent
self.EventInterface
(fun args ->
let result = args.GetException () |> printException
self.AddCall $"TestEvent.Subscribe({result})"
result
)
member _.Iter subscription =
subscription
|> FSharp.Control.AsyncSeq.iteriAsync (fun i error -> async {
self.AddCall $"TestEvent.Iter({i}: {error})"
})
member _.WaitCall text = async {
while self.Calls |> List.last <> text do
do! Async.SwitchToThreadPool ()
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let testEvent = TestEvent ()
async {
testEvent.AddCall "1"
let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
do! testEvent.WaitCall "AddHandler"
testEvent.AddCall "2"
do! child
testEvent.AddCall "3"
}
|> Async.runWithTimeout 300
|> _assert_eq None
testEvent.Calls
|> Seq.toList
|> _assert_eq [[ "1"; "AddHandler"; "2"; "RemoveHandler" ]]
╭─[ 517.12ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 300 │
│ <null> │
│ [ 1, AddHandler, 2, RemoveHandler ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let testEvent = TestEvent ()
async {
testEvent.AddCall "1"
let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
do! testEvent.WaitCall "AddHandler"
testEvent.AddCall "2"
use _ = testEvent.EventInterface.Subscribe (fun args ->
testEvent.AddCall $"testEvent.EventInterface.Subscribe({args})"
)
testEvent.AddCall "3"
do! child
testEvent.AddCall "4"
}
|> Async.runWithTimeout 300
|> _assert_eq None
testEvent.Calls
|> _assert_eq [[ "1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3";
"RemoveHandler"; "IObservable.Dispose" ]]
╭─[ 513.64ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #2 [Debug] runWithTimeoutAsync / timeout: 300 │
│ <null> │
│ [ 1, AddHandler, 2, IObservable.Subscribe, 3, RemoveHandler, │
│ IObservable.Dispose ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let testEvent = TestEvent ()
async {
testEvent.AddCall "1"
let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
do! testEvent.WaitCall "AddHandler"
testEvent.AddCall "2"
use _ = testEvent.EventInterface.Subscribe (fun args ->
async {
do! testEvent.WaitCall "TestEvent.Iter(0: System.Exception: error)"
testEvent.AddCall
$"testEvent.EventInterface.Subscribe({args.GetException () |> printException})"
}
|> Async.RunSynchronously
)
testEvent.AddCall "3"
testEvent.Event.Trigger (null, ErrorEventArgs (Exception "error"))
testEvent.AddCall "4"
do! child
testEvent.AddCall "5"
}
|> Async.runWithTimeout 300
|> _assert_eq None
testEvent.Calls
|> _assert_eq [[
"1"
"AddHandler"
"2"
"IObservable.Subscribe"
"3"
"TestEvent.Subscribe(System.Exception: error)"
"TestEvent.Iter(0: System.Exception: error)"
"testEvent.EventInterface.Subscribe(System.Exception: error)"
"4"
"RemoveHandler"
"IObservable.Dispose"
]]
╭─[ 470.47ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:01 #3 [Debug] runWithTimeoutAsync / timeout: 300 │
│ <null> │
│ [ 1, AddHandler, 2, IObservable.Subscribe, 3, │
│ TestEvent.Subscribe(System.Exception: error), TestEvent.Iter(0: │
│ System.Exception: error), │
│ testEvent.EventInterface.Subscribe(System.Exception: error), 4, │
│ RemoveHandler, IObservable.Dispose ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun () -> async {
do! tcs.Task |> Async.AwaitTask
return Some (System.DateTime.Now.Ticks - start, ())
})
()
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let cts = new System.Threading.CancellationTokenSource ()
async {
let! child =
cts.Token
|> subscribeToken
|> FSharp.Control.AsyncSeq.tryFirst
|> Async.StartChild
do! Async.Sleep 100
cts.Cancel ()
return! child
}
|> Async.RunSynchronously
|> Option.get
|> _isGreaterThan 900000
╭─[ 175.43ms - stdout ]────────────────────────────────────────────────────────╮
│ 992267 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook AsyncSeq.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 301486 bytes to AsyncSeq.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Common (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
let nl = System.Environment.NewLine
let q = @""""
── fsharp ──────────────────────────────────────────────────────────────────────
let inline cons head tail = head :: tail
── fsharp ──────────────────────────────────────────────────────────────────────
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input : string)
=
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline splitString (separator : string array) (input : string) =
input.Split (separator, System.StringSplitOptions.None)
let inline startsWith (value : string) (input : string) =
input.StartsWith value
let inline substring startIndex length (input : string) =
input.Substring (startIndex, length)
let inline toLower (input : string) =
input.ToLower ()
let inline toUpper (input : string) =
input.ToUpper ()
let inline trim (input : string) =
input.Trim ()
let inline trimEnd (trimChars : char array) (input : string) =
input.TrimEnd trimChars
let inline trimStart (trimChars : char array) (input : string) =
input.TrimStart trimChars
let ellipsis max value =
if value |> String.length <= max
then value
else $"{value |> substring 0 max}..."
── fsharp ──────────────────────────────────────────────────────────────────────
type TicksGuid = System.Guid
type DateTimeGuid = System.Guid
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let testGuid = Guid "FEDCBA98-7654-3210-FEDC-BA9876543210"
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## dateTimeGuidFromDateTime │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline dateTimeGuidFromDateTime (guid: System.Guid) (dateTime:
System.DateTime) =
let guid = guid |> string
let prefix = dateTime.ToString "yyyyMMdd-HHmm-ssff-ffff-f"
DateTimeGuid $"{prefix}{guid.[[prefix.Length..]]}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeGuidFromDateTime testGuid DateTime.MinValue
|> _assert_eq (DateTimeGuid "00010101-0000-0000-0000-0a9876543210")
╭─[ 59.83ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00010101-0000-0000-0000-0a9876543210 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeGuidFromDateTime testGuid DateTime.MaxValue
|> _assert_eq (DateTimeGuid $"99991231-2359-5999-9999-9{(testGuid |>
string).[[^10..]]}")
╭─[ 45.87ms - stdout ]─────────────────────────────────────────────────────────╮
│ 99991231-2359-5999-9999-9a9876543210 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeGuidFromDateTime testGuid DateTime.UnixEpoch
|> _assert_eq (DateTimeGuid $"19700101-0000-0000-0000-0{(testGuid |>
string).[[^10..]]}")
╭─[ 46.75ms - stdout ]─────────────────────────────────────────────────────────╮
│ 19700101-0000-0000-0000-0a9876543210 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## dateTimeFromGuid │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline dateTimeFromGuid (dateTimeGuid: DateTimeGuid) =
let dateTimeGuid = dateTimeGuid |> string
System.DateTime.ParseExact (dateTimeGuid.[[..24]] |> String.replace "-" "",
"yyyyMMddHHmmssfffffff", null)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeFromGuid (DateTimeGuid "00010101-0000-0000-0000-0a9876543210")
|> _assert_eq DateTime.MinValue
╭─[ 33.39ms - stdout ]─────────────────────────────────────────────────────────╮
│ 0001-01-01 00:00:00Z │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeFromGuid (DateTimeGuid $"99991231-2359-5999-9999-9{(testGuid |>
string).[[^10..]]}")
|> _assert_eq DateTime.MaxValue
╭─[ 36.78ms - stdout ]─────────────────────────────────────────────────────────╮
│ 9999-12-31 23:59:59Z │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
dateTimeFromGuid (DateTimeGuid $"19700101-0000-0000-0000-0{(testGuid |>
string).[[^10..]]}")
|> _assert_eq DateTime.UnixEpoch
╭─[ 40.20ms - stdout ]─────────────────────────────────────────────────────────╮
│ 1970-01-01 00:00:00Z │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## ticksGuidFromTicks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline ticksGuidFromTicks (guid: System.Guid) (ticks: int64) =
let guid = guid |> string
let ticks = ticks |> string |> String.padLeft 18 '0'
TicksGuid
$"{ticks.[[0..7]]}-{ticks.[[8..11]]}-{ticks.[[12..15]]}-{ticks.[[16..17]]}{guid.
[[21..]]}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
ticksGuidFromTicks testGuid 0L
|> _assert_eq (TicksGuid "00000000-0000-0000-00dc-ba9876543210")
╭─[ 49.51ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00000000-0000-0000-00dc-ba9876543210 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
ticksGuidFromTicks testGuid 999999999999999999L
|> _assert_eq (TicksGuid $"99999999-9999-9999-99dc-b{(testGuid |>
string).[[^10..]]}")
╭─[ 58.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ 99999999-9999-9999-99dc-ba9876543210 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## ticksFromGuid │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline ticksFromGuid (ticksGuid: DateTimeGuid) =
let ticks = ticksGuid |> string
int64
$"{ticks.[[0..7]]}{ticks.[[9..12]]}{ticks.[[14..17]]}{ticks.[[19..20]]}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
ticksFromGuid (TicksGuid "00000000-0000-0000-00dc-ba9876543210")
|> _assert_eq 0L
╭─[ 47.68ms - stdout ]─────────────────────────────────────────────────────────╮
│ 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
ticksFromGuid (TicksGuid $"99999999-9999-9999-99{(testGuid |>
string).[[^14..]]}")
|> _assert_eq 999999999999999999L
╭─[ 63.63ms - stdout ]─────────────────────────────────────────────────────────╮
│ 999999999999999999 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## newGuidFromDateTime │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline newGuidFromDateTime (dateTime: System.DateTime) =
let guid = System.Guid.NewGuid ()
dateTimeGuidFromDateTime guid dateTime
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
newGuidFromDateTime System.DateTime.UtcNow
|> dateTimeFromGuid
|> fun dateTime -> (dateTime - System.DateTime.UtcNow).TotalSeconds |> int
|> _assert_eq 0
╭─[ 70.40ms - stdout ]─────────────────────────────────────────────────────────╮
│ 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## newGuidFromTicks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline newGuidFromTicks (ticks: int64) =
let guid = System.Guid.NewGuid ()
ticksGuidFromTicks guid ticks
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
newGuidFromTicks System.DateTime.UtcNow.Ticks
|> ticksFromGuid
|> fun ticks -> (ticks - System.DateTime.UtcNow.Ticks) / 100000L
|> _assert_eq 0L
╭─[ 85.31ms - stdout ]─────────────────────────────────────────────────────────╮
│ 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## memoize │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline memoize fn =
let result = lazy fn ()
fun () -> result.Value
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable count = 0
let add =
fun () -> count <- count + 1
|> memoize
add ()
add ()
add ()
count
|> _assert_eq 1
╭─[ 40.82ms - stdout ]─────────────────────────────────────────────────────────╮
│ 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## printException │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline printException (ex : System.Exception) =
$"{ex.GetType ()}: {ex.Message}"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
fun () -> failwith "test"
|> _throwsC (fun ex _ ->
printException ex
|> _assert_eq "System.Exception: test"
)
╭─[ 67.72ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSI_0034+it@3-1 │
│ System.Exception: test │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## TraceLevel │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type TraceLevel =
| Verbose
| Debug
| Info
| Warning
| Critical
let inline getLocals () = ""
let mutable traceEnabled = true
let mutable traceCount = 0
let mutable traceLevel = Verbose
let mutable traceDump = false
── fsharp ──────────────────────────────────────────────────────────────────────
let testTraceLevel level =
traceEnabled && level >= traceLevel
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## traceRaw │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let rec traceRaw level fn =
if level |> testTraceLevel then
traceCount <- traceCount + 1
let text = $"%s{fn ()}"
#if FABLE_COMPILER_RUST
Fable.Core.RustInterop.emitRustExpr () @"println!(""{}"", text)"
#else
System.Console.WriteLine text
#endif
#if !WASM && !FABLE_COMPILER
if traceDump then
try
let tmpPath = System.IO.Path.GetTempPath ()
let logDir = System.IO.Path.Combine (tmpPath, "!polyglot")
System.IO.Directory.CreateDirectory logDir |> ignore
let logFile = System.IO.Path.Combine (logDir,
$"{newGuidFromDateTime System.DateTime.Now}.txt")
System.IO.File.WriteAllTextAsync (logFile, text) |>
Async.AwaitTask |> Async.RunSynchronously
with ex ->
traceRaw Critical (fun () -> $"trace / ex: {ex |>
printException}")
#endif
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
traceRaw Debug (fun () -> "test")
╭─[ 10.42ms - stdout ]─────────────────────────────────────────────────────────╮
│ test │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## trace │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let private replStart =
#if INTERACTIVE || !FABLE_COMPILER
fun () ->
if System.Reflection.Assembly.GetEntryAssembly().GetName().Name <>
"Microsoft.DotNet.Interactive.App"
then Some System.DateTime.Now.Ticks
else None
|> memoize
#else
fun () -> None : int64 option
#endif
let trace level fn getLocals =
fun () ->
let time =
#if WASM
""
#else
match replStart () with
| Some replStart ->
let t = System.DateTime.Now.Ticks - replStart |> System.TimeSpan
System.DateTime (1, 1, 1, t.Hours, t.Minutes, t.Seconds,
t.Milliseconds)
| None -> System.DateTime.Now
|> fun dateTime ->
#if FABLE_COMPILER_RUST
"hh:mm:ss"
#else
"HH:mm:ss"
#endif
|> dateTime.ToString
#endif
$"{time} #{traceCount} [[%A{level}]] %s{fn ()} / %s{getLocals ()}"
|> String.trimStart [[||]]
|> String.trimEnd [[| ' '; '/' |]]
|> traceRaw level
let inline withTrace enabled fn =
let oldTraceEnabled = traceEnabled
try
traceEnabled <- enabled
fn ()
finally
traceEnabled <- oldTraceEnabled
let inline withTraceEnabled fn =
withTrace true fn
let inline withTraceDisabled fn =
withTrace false fn
let inline withTraceLevel level fn =
let oldTraceLevel = traceLevel
try
traceLevel <- level
fn ()
finally
traceLevel <- oldTraceLevel
let inline withTraceDump dump fn =
let oldTraceDump = traceDump
try
traceDump <- dump
fn ()
finally
traceDump <- oldTraceDump
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
trace Debug (fun () -> "test") getLocals
╭─[ 29.29ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #2 [Debug] test │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## newDisposable │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline newDisposable fn =
{ new System.IDisposable with
member _.Dispose () = fn ()
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable newDisposableTest = 0
newDisposable (fun () -> newDisposableTest <- newDisposableTest + 1)
|> fun x -> x.Dispose ()
newDisposableTest |> _assert_eq 1
╭─[ 29.49ms - stdout ]─────────────────────────────────────────────────────────╮
│ 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable newDisposableTest = 0
fun () -> task {
use x = newDisposable (fun () -> newDisposableTest <- newDisposableTest + 1)
()
}
|> fun x -> x () |> Async.AwaitTask |> Async.RunSynchronously
newDisposableTest |> _assert_eq 1
╭─[ 163.63ms - stdout ]────────────────────────────────────────────────────────╮
│ 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable newDisposableTest = 0
async {
use x = newDisposable (fun () -> newDisposableTest <- newDisposableTest + 1)
()
}
|> Async.RunSynchronously
newDisposableTest |> _assert_eq 1
╭─[ 55.28ms - stdout ]─────────────────────────────────────────────────────────╮
│ 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable newDisposableTest = 0
async {
let x = newDisposable (fun () -> newDisposableTest <- newDisposableTest + 1)
()
}
|> Async.RunSynchronously
newDisposableTest |> _assert_eq 0
╭─[ 42.05ms - stdout ]─────────────────────────────────────────────────────────╮
│ 0 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## retryFn │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline retryFn retries fn =
let rec loop retry =
try
if retry < retries
then fn () |> Some
else None
with ex ->
let getLocals () = $"retry: {retry} / ex: {ex |> printException} /
{getLocals ()}"
trace Warning (fun () -> "retryFn") getLocals
System.Threading.Thread.Sleep 1
loop (retry + 1)
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable retryFnTest = 0
fun () ->
retryFnTest <- retryFnTest + 1
retryFnTest
|> retryFn 3
|> _assert_eq (Some 1)
╭─[ 29.19ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSharpOption<Int32> │
│ Value: 1 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
fun () -> failwith "test"
|> retryFn 3
|> _assert_eq None
╭─[ 71.51ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #3 [Warning] retryFn / retry: 0 / ex: System.Exception: test │
│ 00:00:00 #4 [Warning] retryFn / retry: 1 / ex: System.Exception: test │
│ 00:00:00 #5 [Warning] retryFn / retry: 2 / ex: System.Exception: test │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable retryFnTest = 0
fun () ->
if retryFnTest >= 2
then retryFnTest
else
retryFnTest <- retryFnTest + 1
failwith "test"
|> retryFn 3
|> _assert_eq (Some 2)
╭─[ 58.15ms - stdout ]─────────────────────────────────────────────────────────╮
│ 00:00:00 #6 [Warning] retryFn / retry: 0 / ex: System.Exception: test │
│ 00:00:00 #7 [Warning] retryFn / retry: 1 / ex: System.Exception: test │
│ FSharpOption<Int32> │
│ Value: 2 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Common.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 353972 bytes to Common.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # CommonFSharp (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getUnionCaseName │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
TraceLevel.Critical
|> getUnionCaseName
|> _assert_eq (nameof TraceLevel.Critical)
╭─[ 56.77ms - stdout ]─────────────────────────────────────────────────────────╮
│ Critical │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook CommonFSharp.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 275586 bytes to CommonFSharp.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Threading (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## newDisposableToken │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline newDisposableToken (mergeToken: System.Threading.CancellationToken
option) =
let cts = new System.Threading.CancellationTokenSource ()
let cts =
match mergeToken with
| None -> cts
| Some mergeToken ->
System.Threading.CancellationTokenSource.CreateLinkedTokenSource [[|
cts.Token; mergeToken |]]
let disposable = newDisposable cts.Cancel
cts.Token, disposable
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let mutable counter = 0
let inline run fn =
let token, disposable = newDisposableToken None
use _ = disposable
fn token
async {
fn token
}
|> Async.Start
let inline fn (token : System.Threading.CancellationToken) =
counter <- counter + (if token.IsCancellationRequested then 10 else 1)
async {
run fn
do! Async.Sleep 10
return counter
}
|> Async.RunSynchronously
|> _assert_eq 11
╭─[ 146.93ms - stdout ]────────────────────────────────────────────────────────╮
│ 11 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Threading.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 278603 bytes to Threading.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Crypto (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## hashText │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let hashText (input : string) =
use sha256 = System.Security.Cryptography.SHA256.Create ()
input
|> System.Text.Encoding.UTF8.GetBytes
|> sha256.ComputeHash
|> Array.map (fun b -> b.ToString "x2")
|> String.concat ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
""
|> hashText
|> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
╭─[ 89.08ms - stdout ]─────────────────────────────────────────────────────────╮
│ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
" "
|> hashText
|> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
╭─[ 22.74ms - stdout ]─────────────────────────────────────────────────────────╮
│ 36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Crypto.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 277424 bytes to Crypto.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # FileSystem (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Operators │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
── fsharp ──────────────────────────────────────────────────────────────────────
open Operators
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## createTempDirectoryName │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
createTempDirectoryName ()
|> _contains System.IO.Path.DirectorySeparatorChar
╭─[ 52.14ms - stdout ]─────────────────────────────────────────────────────────╮
│ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-1570-7006-7eed9 │
│ dd6b273 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## createTempDirectory │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let getLocals () =
$"tempFolder: {tempFolder} / result: {({|
Exists = result.Exists
CreationTime = result.CreationTime
|})} {getLocals ()}"
trace Debug (fun () -> "createTempDirectory") getLocals
tempFolder
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempDirectory = createTempDirectory ()
Directory.Exists tempDirectory
|> _assert_eq true
╭─[ 41.35ms - stdout ]─────────────────────────────────────────────────────────╮
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getSourceDirectory │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let getSourceDirectory =
fun () -> __SOURCE_DIRECTORY__
|> memoize
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
getSourceDirectory ()
|> System.IO.DirectoryInfo
|> fun dir -> dir.Name
|> _assert_eq "fsharp"
╭─[ 34.02ms - stdout ]─────────────────────────────────────────────────────────╮
│ fsharp │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## findParent │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline findParent name isFile rootDir =
let rec loop dir =
if dir </> name |> (if isFile then System.IO.File.Exists else
System.IO.Directory.Exists)
then dir
else
dir
|> System.IO.Directory.GetParent
|> function
| null -> failwith $"""No parent for {if isFile then "file" else
"dir"} '{name}' at '{rootDir}'"""
| parent -> parent.FullName |> loop
loop rootDir
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
getSourceDirectory () |> findParent ".paket" false
|> System.IO.DirectoryInfo
|> fun dir -> dir.Name
|> _assert_eq "polyglot"
╭─[ 27.46ms - stdout ]─────────────────────────────────────────────────────────╮
│ polyglot │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
getSourceDirectory () |> findParent "paket.dependencies" true
|> System.IO.DirectoryInfo
|> fun dir -> dir.Name
|> _assert_eq "polyglot"
╭─[ 26.90ms - stdout ]─────────────────────────────────────────────────────────╮
│ polyglot │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## readAllTextAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline readAllTextAsync path =
path |> System.IO.File.ReadAllTextAsync |> Async.AwaitTask
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## fileExistsContent │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline fileExistsContent path content = async {
if path |> System.IO.File.Exists |> not
then return false
else
let! existingContent = path |> readAllTextAsync
return content = existingContent
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeAllTextAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeAllTextAsync path contents =
System.IO.File.WriteAllTextAsync (path, contents) |> Async.AwaitTask
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeAllTextExists │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeAllTextExists path contents = async {
let! exists = contents |> fileExistsContent path
if not exists
then do! contents |> writeAllTextAsync path
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## waitForFileAccess │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline waitForFileAccess access path =
let fileAccess, fileShare =
access
|> Option.defaultValue (System.IO.FileAccess.ReadWrite,
System.IO.FileShare.Read)
let rec loop retry = async {
try
use _ = new System.IO.FileStream (
path,
System.IO.FileMode.Open,
fileAccess,
fileShare
)
return retry
with ex ->
if retry % 100 = 0 then
let getLocals () = $"path: {path |> System.IO.Path.GetFileName}
/ ex: {ex |> printException} / {getLocals ()}"
trace Debug (fun () -> "waitForFileAccess") getLocals
do! Async.Sleep 10
return! loop (retry + 1)
}
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = createTempDirectory ()
let path = tempFolder </> "test.txt"
let inline lockFile () = async {
trace Debug (fun () -> "_1") getLocals
use stream = new System.IO.FileStream (
path,
System.IO.FileMode.Open,
System.IO.FileAccess.ReadWrite,
System.IO.FileShare.None
)
trace Debug (fun () -> "_2") getLocals
do! Async.Sleep 2000
trace Debug (fun () -> "_3") getLocals
stream.Seek (0L, SeekOrigin.Begin) |> ignore
trace Debug (fun () -> "_4") getLocals
stream.WriteByte 49uy
trace Debug (fun () -> "_5") getLocals
stream.Flush ()
trace Debug (fun () -> "_6") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
do! "0" |> writeAllTextAsync path
trace Debug (fun () -> "2") getLocals
let! child = lockFile () |> Async.StartChild
trace Debug (fun () -> "3") getLocals
do! Async.Sleep 1
trace Debug (fun () -> "4") getLocals
let! retries = path |> waitForFileAccess None
trace Debug (fun () -> "5") getLocals
let! text = path |> readAllTextAsync
trace Debug (fun () -> "6") getLocals
do! child
trace Debug (fun () -> "7") getLocals
return retries, text
}
|> Async.runWithTimeout 3000
|> function
| Some (retries, text) ->
retries
|> _isBetween
(if Runtime.isWindows () then 100 else 100)
(if Runtime.isWindows () then 150 else 200)
text |> _assert_eq "1"
true
| _ -> false
|> _assert_eq true
╭─[ 2.51s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] 1 │
│ 00:00:00 #2 [Debug] 2 │
│ 00:00:00 #3 [Debug] _1 │
│ 00:00:00 #4 [Debug] 3 │
│ 00:00:00 #5 [Debug] _2 │
│ 00:00:00 #6 [Debug] 4 │
│ 00:00:00 #7 [Debug] waitForFileAccess / path: test.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-1658-5890-5d55 │
│ 780e9a41\test.txt' because it is being used by another process. │
│ 00:00:01 #8 [Debug] waitForFileAccess / path: test.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-1658-5890-5d55 │
│ 780e9a41\test.txt' because it is being used by another process. │
│ 00:00:02 #9 [Debug] _3 │
│ 00:00:02 #10 [Debug] _4 │
│ 00:00:02 #11 [Debug] _5 │
│ 00:00:02 #12 [Debug] _6 │
│ 00:00:02 #13 [Debug] 5 │
│ 00:00:02 #14 [Debug] 6 │
│ 00:00:02 #15 [Debug] 7 │
│ 128 │
│ 128 │
│ 128 │
│ 1 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## readAllTextRetryAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline readAllTextRetryAsync fullPath =
let rec loop retry = async {
try
if retry > 0
then do!
fullPath
|> waitForFileAccess (Some (
System.IO.FileAccess.Read,
System.IO.FileShare.Read
))
|> Async.runWithTimeoutAsync 1000
|> Async.Ignore
return! fullPath |> readAllTextAsync |> Async.map Some
with ex ->
let getLocals () = $"retry: {retry} / ex: {ex |> printException} /
{getLocals ()}"
trace Debug (fun () -> $"watchWithFilter / readContent") getLocals
if retry = 0
then return! loop (retry + 1)
else return None
}
loop 0
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## deleteDirectoryAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline deleteDirectoryAsync path =
let rec loop retry = async {
try
System.IO.Directory.Delete (path, true)
return retry
with ex ->
if retry % 100 = 0 then
let getLocals () = $"path: {path |> System.IO.Path.GetFileName}
/ ex: {ex |> printException} / {getLocals ()}"
trace Debug (fun () -> "deleteDirectoryAsync") getLocals
do! Async.Sleep 10
return! loop (retry + 1)
}
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = createTempDirectory ()
let path = tempFolder </> "test"
let inline lockDirectory () = async {
trace Debug (fun () -> "_1") getLocals
System.IO.File.WriteAllText (path </> "test.txt", "0")
use _ = new System.IO.FileStream (
path </> "test.txt",
System.IO.FileMode.Open,
System.IO.FileAccess.ReadWrite,
System.IO.FileShare.None
)
trace Debug (fun () -> "_2") getLocals
do! Async.Sleep 2000
trace Debug (fun () -> "_3") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
Directory.CreateDirectory path |> ignore
trace Debug (fun () -> "2") getLocals
let! child = lockDirectory () |> Async.StartChild
trace Debug (fun () -> "3") getLocals
do! Async.Sleep 60
trace Debug (fun () -> "4") getLocals
let! retries = deleteDirectoryAsync path
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return retries
}
|> Async.runWithTimeout 3000
|> function
| Some retries ->
retries
|> _isBetween
(if Runtime.isWindows () then 100 else 0)
(if Runtime.isWindows () then 150 else 0)
true
| _ -> false
|> _assert_eq true
╭─[ 2.37s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:02 #16 [Debug] 1 │
│ 00:00:02 #17 [Debug] 2 │
│ 00:00:02 #18 [Debug] 3 │
│ 00:00:02 #19 [Debug] _1 │
│ 00:00:02 #20 [Debug] _2 │
│ 00:00:02 #21 [Debug] 4 │
│ 00:00:02 #22 [Debug] deleteDirectoryAsync / path: test / ex: │
│ System.IO.IOException: The process cannot access the file 'test.txt' because │
│ it is being used by another process. │
│ 00:00:04 #23 [Debug] deleteDirectoryAsync / path: test / ex: │
│ System.IO.IOException: The process cannot access the file 'test.txt' because │
│ it is being used by another process. │
│ 00:00:04 #24 [Debug] _3 │
│ 00:00:04 #25 [Debug] 5 │
│ 00:00:04 #26 [Debug] 6 │
│ 125 │
│ 125 │
│ 125 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## deleteFileAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline deleteFileAsync path =
let rec loop retry = async {
try
System.IO.File.Delete path
return retry
with ex ->
if retry % 100 = 0 then
let getLocals () = $"path: {path |> System.IO.Path.GetFileName}
/ ex: {ex |> printException} / {getLocals ()}"
trace Warning (fun () -> "deleteFileAsync") getLocals
do! Async.Sleep 10
return! loop (retry + 1)
}
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = createTempDirectory ()
let path = tempFolder </> "test.txt"
let inline lockFile () = async {
trace Debug (fun () -> "_1") getLocals
use _ = new System.IO.FileStream (
path,
System.IO.FileMode.Open,
System.IO.FileAccess.ReadWrite,
System.IO.FileShare.None
)
trace Debug (fun () -> "_2") getLocals
do! Async.Sleep 2000
trace Debug (fun () -> "_3") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
do! "0" |> writeAllTextAsync path
trace Debug (fun () -> "2") getLocals
let! child = lockFile () |> Async.StartChild
trace Debug (fun () -> "3") getLocals
do! Async.Sleep 1
trace Debug (fun () -> "4") getLocals
let! retries = deleteFileAsync path
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return retries
}
|> Async.runWithTimeout 3000
|> function
| Some retries ->
retries
|> _isBetween
(if Runtime.isWindows () then 100 else 0)
(if Runtime.isWindows () then 150 else 0)
true
| _ -> false
|> _assert_eq true
╭─[ 2.29s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:05 #27 [Debug] 1 │
│ 00:00:05 #28 [Debug] 2 │
│ 00:00:05 #29 [Debug] 3 │
│ 00:00:05 #30 [Debug] _1 │
│ 00:00:05 #31 [Debug] _2 │
│ 00:00:05 #32 [Debug] 4 │
│ 00:00:05 #33 [Warning] deleteFileAsync / path: test.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-2173-7321-71cc │
│ 68b7a4ec\test.txt' because it is being used by another process. │
│ 00:00:06 #34 [Warning] deleteFileAsync / path: test.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-2173-7321-71cc │
│ 68b7a4ec\test.txt' because it is being used by another process. │
│ 00:00:07 #35 [Debug] _3 │
│ 00:00:07 #36 [Debug] 5 │
│ 00:00:07 #37 [Debug] 6 │
│ 128 │
│ 128 │
│ 128 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## moveFileAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline moveFileAsync newPath oldPath =
let rec loop retry = async {
try
System.IO.File.Move (oldPath, newPath)
return retry
with ex ->
if retry % 100 = 0 then
let getLocals () =
$"oldPath: {oldPath |> System.IO.Path.GetFileName} /
newPath: {newPath |> System.IO.Path.GetFileName} / ex: {ex |> printException} /
{getLocals ()}"
trace Warning (fun () -> "moveFileAsync") getLocals
do! Async.Sleep 10
return! loop (retry + 1)
}
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = createTempDirectory ()
let path = tempFolder </> "test.txt"
let newPath = tempFolder </> "test2.txt"
let inline lockFile () = async {
trace Debug (fun () -> "_1") getLocals
use _ = new System.IO.FileStream (
path,
System.IO.FileMode.Open,
System.IO.FileAccess.ReadWrite,
System.IO.FileShare.None
)
trace Debug (fun () -> "_2") getLocals
do! Async.Sleep 2000
trace Debug (fun () -> "_3") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
do! "0" |> writeAllTextAsync path
trace Debug (fun () -> "2") getLocals
let! child = lockFile () |> Async.StartChild
trace Debug (fun () -> "3") getLocals
do! Async.Sleep 1
trace Debug (fun () -> "4") getLocals
let! retries1 = path |> moveFileAsync newPath
trace Debug (fun () -> "5") getLocals
let! retries2 = newPath |> waitForFileAccess None
trace Debug (fun () -> "6") getLocals
let! text = newPath |> readAllTextAsync
trace Debug (fun () -> "7") getLocals
do! child
trace Debug (fun () -> "8") getLocals
return retries1, retries2, text
}
|> Async.runWithTimeout 3000
|> function
| Some (retries1, retries2, text) ->
retries1
|> _isBetween
(if Runtime.isWindows () then 100 else 0)
(if Runtime.isWindows () then 150 else 0)
retries2
|> _isBetween
(if Runtime.isWindows () then 0 else 100)
(if Runtime.isWindows () then 0 else 200)
text |> _assert_eq "0"
true
| _ -> false
|> _assert_eq true
╭─[ 2.36s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:07 #38 [Debug] 1 │
│ 00:00:07 #39 [Debug] 2 │
│ 00:00:07 #40 [Debug] 3 │
│ 00:00:07 #41 [Debug] _1 │
│ 00:00:07 #42 [Debug] _2 │
│ 00:00:07 #43 [Debug] 4 │
│ 00:00:07 #44 [Warning] moveFileAsync / oldPath: test.txt / newPath: │
│ test2.txt / ex: System.IO.IOException: The process cannot access the file │
│ because it is being used by another process. │
│ 00:00:09 #45 [Warning] moveFileAsync / oldPath: test.txt / newPath: │
│ test2.txt / ex: System.IO.IOException: The process cannot access the file │
│ because it is being used by another process. │
│ 00:00:09 #46 [Debug] _3 │
│ 00:00:09 #47 [Debug] 5 │
│ 00:00:09 #48 [Debug] 6 │
│ 00:00:09 #49 [Debug] 7 │
│ 00:00:09 #50 [Debug] 8 │
│ 129 │
│ 129 │
│ 129 │
│ 0 │
│ 0 │
│ 0 │
│ 0 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## watchDirectory │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type FileSystemChangeType =
| Failure
| Changed
| Created
| Deleted
| Renamed
[[<RequireQualifiedAccess>]]
type FileSystemChange =
| Failure of exn: exn
| Changed of path: string * content: string option
| Created of path: string * content: string option
| Deleted of path: string
| Renamed of oldPath: string * (string * string option)
let inline watchDirectoryWithFilter filter shouldReadContent path =
let fullPath = path |> System.IO.Path.GetFullPath
let getLocals () = $"filter: {filter} / {getLocals ()}"
let watcher =
new System.IO.FileSystemWatcher (
Path = fullPath,
NotifyFilter = filter,
EnableRaisingEvents = true,
IncludeSubdirectories = true
)
let inline getEventPath (path : string) =
path |> String.trim |> String.replace fullPath "" |> String.trimStart
[[| '/'; '\\' |]]
let inline ticks () =
System.DateTime.UtcNow.Ticks
let changedStream =
AsyncSeq.subscribeEvent
watcher.Changed
(fun event ->
ticks (),
[[ FileSystemChange.Changed (getEventPath event.FullPath, None)
]]
)
let deletedStream =
AsyncSeq.subscribeEvent
watcher.Deleted
(fun event ->
ticks (),
[[ FileSystemChange.Deleted (getEventPath event.FullPath) ]]
)
let createdStream =
AsyncSeq.subscribeEvent
watcher.Created
(fun event ->
let path = getEventPath event.FullPath
ticks (), [[
FileSystemChange.Created (path, None)
if Runtime.isWindows () then
FileSystemChange.Changed (path, None)
]])
let renamedStream =
AsyncSeq.subscribeEvent
watcher.Renamed
(fun event ->
ticks (), [[
FileSystemChange.Renamed (
getEventPath event.OldFullPath,
(getEventPath event.FullPath, None)
)
]]
)
let failureStream =
AsyncSeq.subscribeEvent
watcher.Error
(fun event -> ticks (), [[ FileSystemChange.Failure
(event.GetException ()) ]])
let stream =
[[
changedStream
deletedStream
createdStream
renamedStream
failureStream
]]
|> FSharp.Control.AsyncSeq.mergeAll
|> FSharp.Control.AsyncSeq.map (fun (t, events) ->
events
|> List.fold
(fun (i, events) event ->
i + 1L,
(t + i, event) :: events)
(0L, [[]])
|> snd
|> List.rev
)
|> FSharp.Control.AsyncSeq.concatSeq
|> FSharp.Control.AsyncSeq.mapAsyncParallel (fun (t, event) -> async {
match shouldReadContent event, event with
| true, FileSystemChange.Changed (path, _) ->
do! Async.Sleep 5
let! content = fullPath </> path |> readAllTextRetryAsync
return t, FileSystemChange.Changed (path, content)
| true, FileSystemChange.Created (path, _) ->
do! Async.Sleep 5
let! content = fullPath </> path |> readAllTextRetryAsync
return t, FileSystemChange.Created (path, content)
| true, FileSystemChange.Renamed (oldPath, (newPath, _)) ->
let! content = fullPath </> newPath |> readAllTextRetryAsync
return t, FileSystemChange.Renamed (oldPath, (newPath, content))
| _ -> return t, event
})
let disposable =
newDisposable (fun () ->
trace Debug (fun () -> "watchWithFilter / Disposing watch stream")
getLocals
watcher.EnableRaisingEvents <- false
watcher.Dispose ()
)
stream, disposable
let inline watchDirectory path =
watchDirectoryWithFilter
(System.IO.NotifyFilters.FileName
// ||| System.IO.NotifyFilters.DirectoryName
// ||| System.IO.NotifyFilters.Attributes
//// ||| System.IO.NotifyFilters.Size
||| System.IO.NotifyFilters.LastWrite
//// ||| System.IO.NotifyFilters.LastAccess
// ||| System.IO.NotifyFilters.CreationTime
// ||| System.IO.NotifyFilters.Security
)
path
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### testEventsRaw (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline testEventsRaw
(watchFn : (_ -> bool) -> string -> FSharp.Control.AsyncSeq<int64 *
FileSystemChange> * IDisposable)
write
=
let tempDirectory = createTempDirectory ()
let stream, disposable = watchFn (fun _ -> true) tempDirectory
let events = System.Collections.Concurrent.ConcurrentBag ()
let inline iter () =
stream
|> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
events.Add event })
let run = async {
let! _ = iter () |> Async.StartChild
do! Async.Sleep 250
return! write tempDirectory
}
try
run
|> Async.runWithTimeout 60000
|> _assert_eq (Some ())
finally
disposable.Dispose ()
deleteDirectoryAsync tempDirectory |> Async.Ignore |>
Async.RunSynchronously
let eventsLog =
events
|> Seq.toList
|> List.sortBy fst
|> List.fold
(fun (prev, acc) (ticks, event) ->
ticks, (ticks, (if prev = 0L then 0L else ticks - prev), event)
:: acc
)
(0L, [[]])
|> snd
|> List.rev
|> List.map (fun (diff, n, event) ->
let text = $"{n} / {diff} / {event}"
if text |> String.length <= 100
then text
else text |> String.substring 0 100 |> String.replace "\n" ""
)
|> String.concat "\n"
let getLocals () = $"eventsLog: \n{eventsLog} / {getLocals ()}"
trace Debug (fun () -> "testEventsRaw") getLocals
events
|> Seq.toList
|> List.sortBy fst
|> List.map snd
|> List.fold
(fun acc event ->
match acc, event with
| FileSystemChange.Changed (lastPath, Some lastContent) as lastEvent
:: acc,
FileSystemChange.Changed (path, Some content)
when lastPath = path && content |> String.startsWith lastContent
->
event :: acc
| _ -> event :: acc
)
[[]]
|> List.rev
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### fast (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 2
for i = 1 to n do
do! $"a{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
do! Async.Sleep 250
for i = 1 to n do
do! $"b{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
do! Async.Sleep 250
for i = 1 to n do
do! path </> $"file{i}.txt" |> moveFileAsync (path </> $"file_{i}.txt")
|> Async.Ignore
do! Async.Sleep 250
for i = 1 to n do
do! $"c{i}" |> writeAllTextAsync (path </> $"file_{i}.txt")
do! Async.Sleep 250
for i = 1 to n do
do! deleteFileAsync (path </> $"file_{i}.txt") |> Async.Ignore
do! Async.Sleep 250
}
let inline run () =
let events = testEventsRaw watchDirectory write
events
|> _sequenceEqual [[
FileSystemChange.Created ("file1.txt", Some "a1")
FileSystemChange.Changed ("file1.txt", Some "a1")
FileSystemChange.Created ("file2.txt", Some "a2")
FileSystemChange.Changed ("file2.txt", Some "a2")
FileSystemChange.Changed ("file1.txt", Some "b1")
FileSystemChange.Changed ("file2.txt", Some "b2")
FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "b1"))
FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "b2"))
FileSystemChange.Changed ("file_1.txt", Some "c1")
FileSystemChange.Changed ("file_2.txt", Some "c2")
FileSystemChange.Deleted "file_1.txt"
FileSystemChange.Deleted "file_2.txt"
]]
run
|> retryFn 3
|> _assert_eq (Some ())
╭─[ 6.09s - stdout ]───────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:18 #51 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ 00:00:18 #52 [Debug] testEventsRaw / eventsLog: │
│ 0 / 638463557733364364 / Created ("file1.txt", Some "a1") │
│ 1 / 638463557733364365 / Changed ("file1.txt", Some "a1") │
│ 64570 / 638463557733428935 / Changed ("file1.txt", Some "a1") │
│ 4220 / 638463557733433155 / Created ("file2.txt", Some "a2") │
│ 1 / 638463557733433156 / Changed ("file2.txt", Some "a2") │
│ 225 / 638463557733433381 / Changed ("file2.txt", Some "a2") │
│ 2594728 / 638463557736028109 / Changed ("file1.txt", Some "b1") │
│ 1360 / 638463557736029469 / Changed ("file1.txt", Some "b1") │
│ 6080 / 638463557736035549 / Changed ("file2.txt", Some "b2") │
│ 1232 / 638463557736036781 / Changed ("file2.txt", Some "b2") │
│ 2682419 / 638463557738719200 / Renamed ("file1.txt", ("file_1.txt", Some │
│ "b1")) │
│ 38479 / 638463557738757679 / Renamed ("file2.txt", ("file_2.txt", Some │
│ "b2")) │
│ 2633799 / 638463557741391478 / Changed ("file_1.txt", Some "c1") │
│ 4717 / 638463557741396195 / Changed ("file_1.txt", Some "c1") │
│ 11532 / 638463557741407727 / Changed ("file_2.txt", Some "c2") │
│ 2059 / 638463557741409786 / Changed ("file_2.txt", Some "c2") │
│ 2487087 / 638463557743896873 / Deleted "file_1.txt" │
│ 3899 / 638463557743900772 / Deleted "file_2.txt" │
│ FSharpList<FileSystemChange> │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: a1 │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: True │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: a1 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: a2 │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: True │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: a2 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: b1 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: b2 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - oldPath: file1.txt │
│ Item2: - file_1.txt │
│ - FSharpOption<String> │
│ Value: b1 │
│ - IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: True │
│ - oldPath: file2.txt │
│ Item2: - file_2.txt │
│ - FSharpOption<String> │
│ Value: b2 │
│ - IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: True │
│ - path: file_1.txt │
│ content: FSharpOption<String> │
│ Value: c1 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file_2.txt │
│ content: FSharpOption<String> │
│ Value: c2 │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file_1.txt │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: True │
│ IsRenamed: False │
│ - path: file_2.txt │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: True │
│ IsRenamed: False │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### slow (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 2
let contents =
[[ 1 .. n ]]
|> List.map (string >> String.replicate 1_000_000)
for i = 1 to n do
do! $"{contents.[[i - 1]]}a" |> writeAllTextAsync (path </>
$"file{i}.txt")
do! Async.Sleep 1500
for i = 1 to n do
do! $"{contents.[[i - 1]]}b" |> writeAllTextAsync (path </>
$"file{i}.txt")
do! Async.Sleep 1500
for i = 1 to n do
do! path </> $"file{i}.txt" |> moveFileAsync (path </> $"file_{i}.txt")
|> Async.Ignore
do! Async.Sleep 1500
for i = 1 to n do
do! $"{contents.[[i - 1]]}c" |> writeAllTextAsync (path </>
$"file_{i}.txt")
do! Async.Sleep 1500
for i = 1 to n do
do! deleteFileAsync (path </> $"file_{i}.txt") |> Async.Ignore
do! Async.Sleep 1500
}
let inline run () =
let events =
testEventsRaw watchDirectory write
|> List.map (function
| FileSystemChange.Changed (path, Some content) ->
FileSystemChange.Changed (path, content |> Seq.distinct |>
Seq.map string |> String.concat "" |> Some)
| FileSystemChange.Created (path, Some content) ->
FileSystemChange.Created (path, content |> Seq.distinct |>
Seq.map string |> String.concat "" |> Some)
| FileSystemChange.Renamed (oldPath, (newPath, Some content)) ->
FileSystemChange.Renamed (
oldPath,
(newPath, content |> Seq.distinct |> Seq.map string |>
String.concat "" |> Some)
)
| event -> event
)
events
|> _sequenceEqual [[
FileSystemChange.Created ("file1.txt", Some "1a")
FileSystemChange.Changed ("file1.txt", Some "1a")
FileSystemChange.Created ("file2.txt", Some "2a")
FileSystemChange.Changed ("file2.txt", Some "2a")
FileSystemChange.Changed ("file1.txt", Some "1b")
FileSystemChange.Changed ("file2.txt", Some "2b")
FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "1b"))
FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "2b"))
FileSystemChange.Changed ("file_1.txt", Some "1c")
FileSystemChange.Changed ("file_2.txt", Some "2c")
FileSystemChange.Deleted "file_1.txt"
FileSystemChange.Deleted "file_2.txt"
]]
run
|> retryFn 5
|> _assert_eq (Some ())
╭─[ 14.09s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:24 #53 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file2.txt' because it is being used by another process.) │
│ 00:00:24 #54 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file2.txt' because it is being used by another process.) │
│ 00:00:25 #55 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file1.txt' because it is being used by another process.) │
│ 00:00:25 #56 [Debug] waitForFileAccess / path: file1.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file1.txt' because it is being used by another process. │
│ 00:00:25 #57 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file2.txt' because it is being used by another process.) │
│ 00:00:25 #58 [Debug] waitForFileAccess / path: file2.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file2.txt' because it is being used by another process. │
│ 00:00:28 #59 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file_1.txt' because it is being used by another process.) │
│ 00:00:28 #60 [Debug] waitForFileAccess / path: file_1.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file_1.txt' because it is being used by another process. │
│ 00:00:28 #61 [Debug] watchWithFilter / readContent / retry: 0 / ex: │
│ System.AggregateException: One or more errors occurred. (The process cannot │
│ access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file_2.txt' because it is being used by another process.) │
│ 00:00:28 #62 [Debug] waitForFileAccess / path: file_2.txt / ex: │
│ System.IO.IOException: The process cannot access the file │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0649-4054-5451-52da │
│ 7931788b\file_2.txt' because it is being used by another process. │
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:31 #63 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ 00:00:32 #64 [Debug] testEventsRaw / eventsLog: │
│ 0 / 638463557808261807 / Created ("file1.txt", Some │
│ "1111111111111111111111111111111111111 │
│ 1 / 638463557808261808 / Changed ("file1.txt", Some │
│ "1111111111111111111111111111111111111 │
│ 120847 / 638463557808382655 / Changed ("file1.txt", Some │
│ "11111111111111111111111111111111 │
│ 22068 / 638463557808404723 / Created ("file2.txt", Some │
│ "222222222222222222222222222222222 │
│ 1 / 638463557808404724 / Changed ("file2.txt", Some │
│ "2222222222222222222222222222222222222 │
│ 166124 / 638463557808570848 / Changed ("file2.txt", Some │
│ "22222222222222222222222222222222 │
│ 15129971 / 638463557823700819 / Changed ("file1.txt", Some │
│ "111111111111111111111111111111 │
│ 144860 / 638463557823845679 / Changed ("file1.txt", Some │
│ "11111111111111111111111111111111 │
│ 63038 / 638463557823908717 / Changed ("file2.txt", Some │
│ "222222222222222222222222222222222 │
│ 83170 / 638463557823991887 / Changed ("file2.txt", Some │
│ "222222222222222222222222222222222 │
│ 15136066 / 638463557839127953 / Renamed ("file1.txt", ("file_1.txt", │
│ Some "1111111111 │
│ 45717 / 638463557839173670 / Renamed ("file2.txt", ("file_2.txt", Some │
│ "2222222222222 │
│ 15274624 / 638463557854448294 / Changed ("file_1.txt", Some │
│ "11111111111111111111111111111 │
│ 164841 / 638463557854613135 / Changed ("file_1.txt", Some │
│ "1111111111111111111111111111111 │
│ 61692 / 638463557854674827 / Changed ("file_2.txt", Some │
│ "22222222222222222222222222222222 │
│ 123351 / 638463557854798178 / Changed ("file_2.txt", Some │
│ "2222222222222222222222222222222 │
│ 15110415 / 638463557869908593 / Deleted "file_1.txt" │
│ 14308 / 638463557869922901 / Deleted "file_2.txt" │
│ FSharpList<FileSystemChange> │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: 1a │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: True │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: 1a │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: 2a │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: True │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: 2a │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file1.txt │
│ content: FSharpOption<String> │
│ Value: 1b │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file2.txt │
│ content: FSharpOption<String> │
│ Value: 2b │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - oldPath: file1.txt │
│ Item2: - file_1.txt │
│ - FSharpOption<String> │
│ Value: 1b │
│ - IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: True │
│ - oldPath: file2.txt │
│ Item2: - file_2.txt │
│ - FSharpOption<String> │
│ Value: 2b │
│ - IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: True │
│ - path: file_1.txt │
│ content: FSharpOption<String> │
│ Value: 1c │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file_2.txt │
│ content: FSharpOption<String> │
│ Value: 2c │
│ IsFailure: False │
│ IsChanged: True │
│ IsCreated: False │
│ IsDeleted: False │
│ IsRenamed: False │
│ - path: file_1.txt │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: True │
│ IsRenamed: False │
│ - path: file_2.txt │
│ IsFailure: False │
│ IsChanged: False │
│ IsCreated: False │
│ IsDeleted: True │
│ IsRenamed: False │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ### testEventsSorted (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline sortEvent event =
match event with
| FileSystemChange.Failure _ -> 0
| FileSystemChange.Created _ -> 1
| FileSystemChange.Changed _ -> 2
| FileSystemChange.Renamed (_oldPath, _) -> 3
| FileSystemChange.Deleted _ -> 4
let inline formatEvents events =
events
|> Seq.toList
|> List.sortBy (snd >> sortEvent)
|> List.choose (fun (ticks, event) ->
match event with
| FileSystemChange.Failure _ ->
None
| FileSystemChange.Changed (path, _) ->
Some (ticks, System.IO.Path.GetFileName path, nameof
FileSystemChangeType.Changed)
| FileSystemChange.Created (path, _) ->
Some (ticks, System.IO.Path.GetFileName path, nameof
FileSystemChangeType.Created)
| FileSystemChange.Deleted path ->
Some (ticks, System.IO.Path.GetFileName path, nameof
FileSystemChangeType.Deleted)
| FileSystemChange.Renamed (_oldPath, (path, _)) ->
Some (ticks, System.IO.Path.GetFileName path, nameof
FileSystemChangeType.Renamed)
)
|> List.sortBy (fun (_, path, _) -> path)
|> List.distinctBy (fun (_, path, event) -> path, event)
let inline testEventsSorted
(watchFn : string -> FSharp.Control.AsyncSeq<int64 * FileSystemChange> *
IDisposable)
write
=
let path = createTempDirectory ()
let stream, disposable = watchFn path
let events = System.Collections.Concurrent.ConcurrentBag ()
let inline iter () =
stream
|> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
events.Add event })
let run = async {
let! _ = iter () |> Async.StartChild
do! Async.Sleep 250
return! write path
}
try
run
|> Async.runWithTimeout 5000
|> _assert_eq (Some ())
finally
disposable.Dispose ()
deleteDirectoryAsync path |> Async.Ignore |> Async.RunSynchronously
let events = formatEvents events
let eventMap =
events
|> List.map (fun (ticks, path, event) -> path, (event, ticks))
|> List.groupBy fst
|> List.map (fun (path, events) ->
let event, _ticks =
events
|> List.map snd
|> List.sortByDescending snd
|> List.head
path, event
)
|> Map.ofList
let eventList =
events
|> List.map (fun (_ticks, path, event) -> path, event)
eventMap, eventList
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### create and delete (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 3
for i = 1 to n do
do! $"{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! deleteFileAsync (path </> $"file{i}.txt") |> Async.Ignore
do! Async.Sleep 150
}
let inline run () =
let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
write
[[
"file1.txt", nameof FileSystemChangeType.Created
"file1.txt", nameof FileSystemChangeType.Changed
"file1.txt", nameof FileSystemChangeType.Deleted
"file2.txt", nameof FileSystemChangeType.Created
"file2.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Deleted
"file3.txt", nameof FileSystemChangeType.Created
"file3.txt", nameof FileSystemChangeType.Changed
"file3.txt", nameof FileSystemChangeType.Deleted
]]
|> _sequenceEqual eventList
[[
"file1.txt", nameof FileSystemChangeType.Deleted
"file2.txt", nameof FileSystemChangeType.Deleted
"file3.txt", nameof FileSystemChangeType.Deleted
]]
|> Map.ofList
|> _sequenceEqual eventMap
run
|> retryFn 3
|> _assert_eq (Some ())
╭─[ 4.79s - stdout ]───────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:37 #65 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpList<Tuple<String,String>> │
│ ( file1.txt, Created ) │
│ ( file1.txt, Changed ) │
│ ( file1.txt, Deleted ) │
│ ( file2.txt, Created ) │
│ ( file2.txt, Changed ) │
│ ( file2.txt, Deleted ) │
│ ( file3.txt, Created ) │
│ ( file3.txt, Changed ) │
│ ( file3.txt, Deleted ) │
│ FSharpMap<String,String> │
│ - Key: file1.txt │
│ Value: Deleted │
│ - Key: file2.txt │
│ Value: Deleted │
│ - Key: file3.txt │
│ Value: Deleted │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### change (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 2
for i = 1 to n do
do! $"{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! "" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! deleteFileAsync (path </> $"file{i}.txt") |> Async.Ignore
do! Async.Sleep 150
}
let inline run () =
let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
write
[[
"file1.txt", nameof FileSystemChangeType.Created
"file1.txt", nameof FileSystemChangeType.Changed
"file1.txt", nameof FileSystemChangeType.Deleted
"file2.txt", nameof FileSystemChangeType.Created
"file2.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Deleted
]]
|> _sequenceEqual eventList
[[
"file1.txt", nameof FileSystemChangeType.Deleted
"file2.txt", nameof FileSystemChangeType.Deleted
]]
|> Map.ofList
|> _sequenceEqual eventMap
run
|> retryFn 3
|> _assert_eq (Some ())
╭─[ 4.73s - stdout ]───────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:42 #66 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpList<Tuple<String,String>> │
│ ( file1.txt, Created ) │
│ ( file1.txt, Changed ) │
│ ( file1.txt, Deleted ) │
│ ( file2.txt, Created ) │
│ ( file2.txt, Changed ) │
│ ( file2.txt, Deleted ) │
│ FSharpMap<String,String> │
│ - Key: file1.txt │
│ Value: Deleted │
│ - Key: file2.txt │
│ Value: Deleted │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### rename (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 2
for i = 1 to n do
do! $"{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! path </> $"file{i}.txt" |> moveFileAsync (path </> $"file_{i}.txt")
|> Async.Ignore
for i = 1 to n do
do! deleteFileAsync (path </> $"file_{i}.txt") |> Async.Ignore
do! Async.Sleep 150
}
let inline run () =
let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
write
[[
"file1.txt", nameof FileSystemChangeType.Created
"file1.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Created
"file2.txt", nameof FileSystemChangeType.Changed
"file_1.txt", nameof FileSystemChangeType.Renamed
"file_1.txt", nameof FileSystemChangeType.Deleted
"file_2.txt", nameof FileSystemChangeType.Renamed
"file_2.txt", nameof FileSystemChangeType.Deleted
]]
|> _sequenceEqual eventList
[[
"file1.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Changed
"file_1.txt", nameof FileSystemChangeType.Deleted
"file_2.txt", nameof FileSystemChangeType.Deleted
]]
|> Map.ofList
|> _sequenceEqual eventMap
run
|> retryFn 3
|> _assert_eq (Some ())
╭─[ 5.51s - stdout ]───────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:47 #67 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpList<Tuple<String,String>> │
│ ( file1.txt, Created ) │
│ ( file1.txt, Changed ) │
│ ( file2.txt, Created ) │
│ ( file2.txt, Changed ) │
│ ( file_1.txt, Renamed ) │
│ ( file_1.txt, Deleted ) │
│ ( file_2.txt, Renamed ) │
│ ( file_2.txt, Deleted ) │
│ FSharpMap<String,String> │
│ - Key: file1.txt │
│ Value: Changed │
│ - Key: file2.txt │
│ Value: Changed │
│ - Key: file_1.txt │
│ Value: Deleted │
│ - Key: file_2.txt │
│ Value: Deleted │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ #### full (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline write path = async {
let n = 2
for i = 1 to n do
do! $"{i}" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! "" |> writeAllTextAsync (path </> $"file{i}.txt")
for i = 1 to n do
do! path </> $"file{i}.txt" |> moveFileAsync (path </> $"file_{i}.txt")
|> Async.Ignore
for i = 1 to n do
do! $"{i}" |> writeAllTextAsync (path </> $"file_{i}.txt")
for i = 1 to n do
do! deleteFileAsync (path </> $"file_{i}.txt") |> Async.Ignore
do! Async.Sleep 150
}
let inline run () =
let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
write
[[
"file1.txt", nameof FileSystemChangeType.Created
"file1.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Created
"file2.txt", nameof FileSystemChangeType.Changed
"file_1.txt", nameof FileSystemChangeType.Changed
"file_1.txt", nameof FileSystemChangeType.Renamed
"file_1.txt", nameof FileSystemChangeType.Deleted
"file_2.txt", nameof FileSystemChangeType.Changed
"file_2.txt", nameof FileSystemChangeType.Renamed
"file_2.txt", nameof FileSystemChangeType.Deleted
]]
|> _sequenceEqual eventList
[[
"file1.txt", nameof FileSystemChangeType.Changed
"file2.txt", nameof FileSystemChangeType.Changed
"file_1.txt", nameof FileSystemChangeType.Deleted
"file_2.txt", nameof FileSystemChangeType.Deleted
]]
|> Map.ofList
|> _sequenceEqual eventMap
run
|> retryFn 3
|> _assert_eq (Some ())
╭─[ 7.17s - stdout ]───────────────────────────────────────────────────────────╮
│ FSharpOption<Unit> │
│ Value: <null> │
│ 00:00:55 #68 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpList<Tuple<String,String>> │
│ ( file1.txt, Created ) │
│ ( file1.txt, Changed ) │
│ ( file2.txt, Created ) │
│ ( file2.txt, Changed ) │
│ ( file_1.txt, Changed ) │
│ ( file_1.txt, Renamed ) │
│ ( file_1.txt, Deleted ) │
│ ( file_2.txt, Changed ) │
│ ( file_2.txt, Renamed ) │
│ ( file_2.txt, Deleted ) │
│ FSharpMap<String,String> │
│ - Key: file1.txt │
│ Value: Changed │
│ - Key: file2.txt │
│ Value: Changed │
│ - Key: file_1.txt │
│ Value: Deleted │
│ - Key: file_2.txt │
│ Value: Deleted │
│ FSharpOption<Unit> │
│ Value: <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook FileSystem.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 471162 bytes to FileSystem.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Networking (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/Runtime.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## testPortOpen │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline testPortOpen port = async {
let! ct = Async.CancellationToken
use client = new System.Net.Sockets.TcpClient ()
try
do! client.ConnectAsync ("127.0.0.1", port, ct) |>
Async.awaitValueTaskUnit
return true
with ex ->
trace Verbose (fun () -> $"testPortOpen / ex: {ex |> printException}")
getLocals
return false
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
testPortOpen 65536
|> Async.runWithTimeout 120
|> _assert_eq (Some false)
╭─[ 161.60ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Verbose] testPortOpen / ex: System.ArgumentOutOfRangeException: │
│ Specified argument was out of the range of valid values. (Parameter 'port') │
│ FSharpOption<Boolean> │
│ Value: False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline testPortOpenTimeout timeout port = async {
let! result =
testPortOpen port
|> Async.runWithTimeoutAsync timeout
return
match result with
| None -> false
| Some result -> result
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
testPortOpenTimeout 120 65535
|> Async.RunSynchronously
|> _assert_eq false
╭─[ 248.50ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #2 [Debug] runWithTimeoutAsync / timeout: 120 │
│ False │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## waitForPortAccess │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline waitForPortAccess timeout status port =
let rec loop retry = async {
let! isPortOpen =
match timeout with
| None -> testPortOpen port
| Some timeout -> testPortOpenTimeout timeout port
if isPortOpen = status
then return retry
else
if retry % 100 = 0 then
let getLocals () = $"port: {port} / retry: {retry} / {getLocals
()}"
trace Verbose (fun () -> "waitForPortAccess") getLocals
do! Async.Sleep 10
return! loop (retry + 1)
}
loop 0
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let port = 5555
let inline lockPort () = async {
trace Debug (fun () -> "_1") getLocals
do! Async.Sleep 5000
use listener = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port)
trace Debug (fun () -> "_2") getLocals
listener.Start ()
trace Debug (fun () -> "_3") getLocals
do! Async.Sleep 2000
trace Debug (fun () -> "_4") getLocals
listener.Stop ()
trace Debug (fun () -> "_5") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
let! child = lockPort () |> Async.StartChild
trace Debug (fun () -> "2") getLocals
do! Async.Sleep 1
trace Debug (fun () -> "3") getLocals
let! retries1 = waitForPortAccess None true port
trace Debug (fun () -> "4") getLocals
let! retries2 = waitForPortAccess None false port
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return retries1, retries2
}
|> Async.runWithTimeout 20000
|> function
| Some (retries1, retries2) ->
retries1
|> _isBetween
(if Runtime.isWindows () then 2 else 2)
(if Runtime.isWindows () then 5 else 1500)
retries2
|> _isBetween
(if Runtime.isWindows () then 80 else 80)
(if Runtime.isWindows () then 150 else 600)
true
| _ -> false
|> _assert_eq true
╭─[ 9.67s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:01 #3 [Debug] 1 │
│ 00:00:01 #4 [Debug] _1 │
│ 00:00:01 #5 [Debug] 2 │
│ 00:00:01 #6 [Debug] 3 │
│ 00:00:03 #7 [Verbose] testPortOpen / ex: System.AggregateException: One or │
│ more errors occurred. (No connection could be made because the target │
│ machine actively refused it.) │
│ 00:00:03 #8 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:05 #9 [Verbose] testPortOpen / ex: System.AggregateException: One or │
│ more errors occurred. (No connection could be made because the target │
│ machine actively refused it.) │
│ 00:00:06 #10 [Debug] _2 │
│ 00:00:06 #11 [Debug] _3 │
│ 00:00:06 #12 [Debug] 4 │
│ 00:00:06 #13 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:07 #14 [Verbose] waitForPortAccess / port: 5555 / retry: 100 │
│ 00:00:08 #15 [Debug] _4 │
│ 00:00:08 #16 [Debug] _5 │
│ 00:00:10 #17 [Verbose] testPortOpen / ex: System.AggregateException: One or │
│ more errors occurred. (No connection could be made because the target │
│ machine actively refused it.) │
│ 00:00:10 #18 [Debug] 5 │
│ 00:00:10 #19 [Debug] 6 │
│ 2 │
│ 2 │
│ 2 │
│ 121 │
│ 121 │
│ 121 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let port = 5555
let inline lockPort () = async {
trace Debug (fun () -> "_1") getLocals
do! Async.Sleep 500
use listener = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port)
trace Debug (fun () -> "_2") getLocals
listener.Start ()
trace Debug (fun () -> "_3") getLocals
do! Async.Sleep 200
trace Debug (fun () -> "_4") getLocals
listener.Stop ()
trace Debug (fun () -> "_5") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
let! child = lockPort () |> Async.StartChild
trace Debug (fun () -> "2") getLocals
do! Async.Sleep 1
trace Debug (fun () -> "3") getLocals
let! retries1 = waitForPortAccess (Some 60) true port
trace Debug (fun () -> "4") getLocals
let! retries2 = waitForPortAccess (Some 60) false port
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return retries1, retries2
}
|> Async.runWithTimeout 2000
|> function
| Some (retries1, retries2) ->
retries1
|> _isBetween
(if Runtime.isWindows () then 4 else 2)
(if Runtime.isWindows () then 15 else 150)
retries2
|> _isBetween
(if Runtime.isWindows () then 5 else 0)
(if Runtime.isWindows () then 20 else 60)
true
| _ -> false
|> _assert_eq true
╭─[ 1.59s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:11 #20 [Debug] 1 │
│ 00:00:11 #22 [Debug] 2 │
│ 00:00:11 #22 [Debug] _1 │
│ 00:00:11 #23 [Debug] 3 │
│ 00:00:11 #24 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #25 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:11 #26 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #27 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #28 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #29 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #30 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #31 [Debug] _2 │
│ 00:00:11 #32 [Debug] _3 │
│ 00:00:11 #33 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #34 [Debug] 4 │
│ 00:00:11 #35 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:11 #36 [Debug] _4 │
│ 00:00:11 #37 [Debug] _5 │
│ 00:00:11 #38 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #39 [Debug] 5 │
│ 00:00:11 #40 [Debug] 6 │
│ 7 │
│ 7 │
│ 7 │
│ 11 │
│ 11 │
│ 11 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getAvailablePort │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getAvailablePort timeout initialPort =
let rec loop port = async {
let! isPortOpen =
match timeout with
| None -> testPortOpen port
| Some timeout -> testPortOpenTimeout timeout port
if not isPortOpen
then return port
else return! loop (port + 1)
}
loop initialPort
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let port = 5555
let inline lockPorts () = async {
trace Debug (fun () -> "_1") getLocals
use listener1 = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port)
use listener2 = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port + 1)
trace Debug (fun () -> "_2") getLocals
listener1.Start ()
listener2.Start ()
trace Debug (fun () -> "_3") getLocals
do! Async.Sleep 4000
trace Debug (fun () -> "_4") getLocals
listener1.Stop ()
listener2.Stop ()
trace Debug (fun () -> "_5") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
let! child = lockPorts () |> Async.StartChild
trace Debug (fun () -> "2") getLocals
do! Async.Sleep 240
trace Debug (fun () -> "3") getLocals
let! availablePort = getAvailablePort None port
trace Debug (fun () -> "4") getLocals
let! retries = waitForPortAccess None false port
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return availablePort, retries
}
|> Async.runWithTimeout 15000
|> function
| Some (availablePort, retries) ->
availablePort |> _assert_eq (port + 2)
retries
|> _isBetween
(if Runtime.isWindows () then 100 else 100)
(if Runtime.isWindows () then 150 else 1200)
true
| _ -> false
|> _assert_eq true
╭─[ 6.48s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:12 #41 [Debug] 1 │
│ 00:00:12 #42 [Debug] 2 │
│ 00:00:12 #43 [Debug] _1 │
│ 00:00:12 #44 [Debug] _2 │
│ 00:00:12 #45 [Debug] _3 │
│ 00:00:12 #46 [Debug] 3 │
│ 00:00:14 #47 [Verbose] testPortOpen / ex: System.AggregateException: One or │
│ more errors occurred. (No connection could be made because the target │
│ machine actively refused it.) │
│ 00:00:14 #48 [Debug] 4 │
│ 00:00:14 #49 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:16 #50 [Verbose] waitForPortAccess / port: 5555 / retry: 100 │
│ 00:00:16 #51 [Debug] _4 │
│ 00:00:16 #52 [Debug] _5 │
│ 00:00:18 #53 [Verbose] testPortOpen / ex: System.AggregateException: One or │
│ more errors occurred. (No connection could be made because the target │
│ machine actively refused it.) │
│ 00:00:18 #54 [Debug] 5 │
│ 00:00:18 #55 [Debug] 6 │
│ 5557 │
│ 109 │
│ 109 │
│ 109 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let port = 5555
let inline lockPorts () = async {
trace Debug (fun () -> "_1") getLocals
use listener1 = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port)
use listener2 = new System.Net.Sockets.TcpListener
(System.Net.IPAddress.Parse "127.0.0.1", port + 1)
trace Debug (fun () -> "_2") getLocals
listener1.Start ()
listener2.Start ()
trace Debug (fun () -> "_3") getLocals
do! Async.Sleep 400
trace Debug (fun () -> "_4") getLocals
listener1.Stop ()
listener2.Stop ()
trace Debug (fun () -> "_5") getLocals
}
async {
trace Debug (fun () -> "1") getLocals
let! child = lockPorts () |> Async.StartChild
trace Debug (fun () -> "2") getLocals
do! Async.Sleep 240
trace Debug (fun () -> "3") getLocals
let! availablePort = getAvailablePort (Some 60) port
trace Debug (fun () -> "4") getLocals
let! retries = waitForPortAccess (Some 60) false port
trace Debug (fun () -> "5") getLocals
do! child
trace Debug (fun () -> "6") getLocals
return availablePort, retries
}
|> Async.runWithTimeout 1500
|> function
| Some (availablePort, retries) ->
availablePort |> _assert_eq (port + 2)
retries
|> _isBetween
(if Runtime.isWindows () then 2 else 1)
(if Runtime.isWindows () then 10 else 120)
true
| _ -> false
|> _assert_eq true
╭─[ 1.04s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:19 #56 [Debug] 1 │
│ 00:00:19 #58 [Debug] 2 │
│ 00:00:19 #57 [Debug] _1 │
│ 00:00:19 #59 [Debug] _2 │
│ 00:00:19 #60 [Debug] _3 │
│ 00:00:19 #61 [Debug] 3 │
│ 00:00:19 #62 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:19 #63 [Debug] 4 │
│ 00:00:19 #64 [Verbose] waitForPortAccess / port: 5555 / retry: 0 │
│ 00:00:19 #65 [Debug] _4 │
│ 00:00:19 #66 [Debug] _5 │
│ 00:00:19 #67 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:19 #68 [Debug] 5 │
│ 00:00:19 #69 [Debug] 6 │
│ 5557 │
│ 4 │
│ 4 │
│ 4 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Networking.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 325219 bytes to Networking.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Runtime (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
open FileSystem.Operators
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## isWindows │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
isWindows ()
╭─[ 74.27ms - return value ]───────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>True</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getExecutableSuffix │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
getExecutableSuffix ()
╭─[ 14.51ms - return value ]───────────────────────────────────────────────────╮
│ .exe │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## splitCommand │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (path, args) tail (Path
true)
| ('"' | '\'') :: tail, Path true -> loop (path, args) tail (Path false)
| ' ' :: tail, Path true -> loop ($"{path} ", args) tail (Path true)
| ' ' :: tail, (Start | Path _) -> loop (path, args) tail Arguments
| char :: tail, Arguments -> loop (path, $"{args}{char}") tail Arguments
| char :: tail, _ -> loop ($"{path}{char}", args) tail step
| _, _ -> path |> String.replace @"\" "/", args
loop ("", "") (command |> Seq.toList) Start
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
splitCommand ""
|> _assert_eq ("", "")
splitCommand "/a/b/c"
|> _assert_eq ("/a/b/c", "")
splitCommand "cat file.txt"
|> _assert_eq ("cat", "file.txt")
splitCommand """..\..\file.exe file1.txt file2.txt"""
|> _assert_eq ("../../file.exe", "file1.txt file2.txt")
splitCommand @"c:\dir\file.exe ""file1.txt file2.txt"""
|> _assert_eq ("c:/dir/file.exe", @"""file1.txt file2.txt""")
splitCommand @"""..\..\dir name\file.exe"" ""file 1.txt"" file2.txt"
|> _assert_eq ("../../dir name/file.exe", @"""file 1.txt"" file2.txt")
splitCommand @"""..\..\file 1.exe"" -c \\""echo 1\\"""
|> _assert_eq ("../../file 1.exe", @"-c \\""echo 1\\""")
splitCommand @"..\..\file 1.exe -c \\""echo 1\\"""
|> _assert_eq ("../../file", @"1.exe -c \\""echo 1\\""")
╭─[ 92.05ms - stdout ]─────────────────────────────────────────────────────────╮
│ ( , ) │
│ ( /a/b/c, ) │
│ ( cat, file.txt ) │
│ ( ../../file.exe, file1.txt file2.txt ) │
│ ( c:/dir/file.exe, "file1.txt file2.txt" ) │
│ ( ../../dir name/file.exe, "file 1.txt" file2.txt ) │
│ ( ../../file 1.exe, -c \\"echo 1\\" ) │
│ ( ../../file, 1.exe -c \\"echo 1\\" ) │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## executeAsync │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type ExecutionLine =
{
ProcessId : int
Line : string
Error : bool
}
type ExecutionOptions =
{
Command : string
WorkingDirectory : string option
CancellationToken : System.Threading.CancellationToken option
OnLine : (ExecutionLine -> Async<unit>) option
}
let inline executeWithOptionsAsync (options : ExecutionOptions) = async {
let fileName, arguments = options.Command |> splitCommand
let workingDirectory = options.WorkingDirectory |> Option.defaultValue ""
trace Debug (fun () -> $"executeAsync / options: {options}") getLocals
let startInfo = System.Diagnostics.ProcessStartInfo (
Arguments = arguments,
CreateNoWindow = true,
FileName = fileName,
RedirectStandardError = true,
RedirectStandardOutput = true,
StandardOutputEncoding = System.Text.Encoding.UTF8,
UseShellExecute = false,
WorkingDirectory = workingDirectory
)
use proc = new System.Diagnostics.Process (StartInfo = startInfo)
let output = System.Collections.Concurrent.ConcurrentStack<string> ()
let inline event error (e: System.Diagnostics.DataReceivedEventArgs) = async
{
if e.Data <> null then
match options.OnLine with
| Some onLine ->
do!
onLine
{
ProcessId = proc.Id
Line = e.Data
Error = error
}
| None -> ()
trace
Verbose
(fun () -> $"> {e.Data}")
Common.getLocals
output.Push
$"{
if error then '[['.ToString() else System.String.Empty
}{
e.Data
}{
if error then ']]'.ToString() else System.String.Empty
}"
}
proc.OutputDataReceived.Add (event false >> Async.StartImmediate)
proc.ErrorDataReceived.Add (event true >> Async.StartImmediate)
if proc.Start () |> not
then failwith $"executeAsync / proc.Start () error"
proc.BeginErrorReadLine ()
proc.BeginOutputReadLine ()
let! ct =
options.CancellationToken
|> Option.defaultValue System.Threading.CancellationToken.None
|> Async.mergeCancellationTokenWithDefaultAsync
use reg = ct.Register (fun _ ->
if not proc.HasExited then proc.Kill ()
)
let! exitCode = async {
try
do! proc.WaitForExitAsync ct |> Async.AwaitTask
return proc.ExitCode
with :? System.Threading.Tasks.TaskCanceledException as ex ->
trace Warning (fun () -> $"executeAsync / WaitForExitAsync / ex: {ex
|> printException}") getLocals
ex |> printException |> output.Push
return System.Int32.MinValue
}
let output = output |> Seq.rev |> String.concat "\n"
trace Debug (fun () ->
$"executeAsync / exitCode: {exitCode} / output.Length: {output.Length}"
) getLocals
return exitCode, output
}
let inline executeAsync command =
executeWithOptionsAsync
{
Command = command
CancellationToken = None
OnLine = None
WorkingDirectory = None
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = FileSystem.createTempDirectory ()
let fileName = "test.txt"
let path = tempFolder </> fileName
async {
let! exitCode, result = executeAsync @$"pwsh -c ""Get-Content {path}"""
exitCode |> _assert_eq 1
result |> _stringContains "not exist"
do! "0" |> FileSystem.writeAllTextAsync path
return!
executeWithOptionsAsync
{
Command = @$"pwsh -c ""Get-Content {fileName}"""
CancellationToken = None
OnLine = None
WorkingDirectory = Some tempFolder
}
}
|> Async.runWithTimeout 10000
|> function
| Some (exitCode, output) ->
exitCode |> _assert_eq 0
output |> _assert_eq "0"
true
| _ -> false
|> _assert_eq true
╭─[ 2.15s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] executeAsync / options: { Command = │
│ "pwsh -c "Get-Content │
│ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0651-0293-9336-94d67 │
│ ad396a2\test.txt"" │
│ WorkingDirectory = None │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:00 #2 [Verbose] > Get-Content: Cannot find path │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0651-0293-9336-94d6 │
│ 7ad396a2\test.txt' because it does not exist. │
│ 00:00:00 #3 [Debug] executeAsync / exitCode: 1 / output.Length: 171 │
│ 1 │
│ [Get-Content: Cannot find path │
│ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0651-0293-9336-94d6 │
│ 7ad396a2\test.txt' because it does not exist.] │
│ 00:00:00 #4 [Debug] executeAsync / options: { Command = "pwsh -c │
│ "Get-Content test.txt"" │
│ WorkingDirectory = │
│ Some │
│ │
│ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0651-0293-9336-94d6 │
│ 7ad396a2" │
│ CancellationToken = None │
│ OnLine = None } │
│ 00:00:01 #5 [Verbose] > 0 │
│ 00:00:01 #6 [Debug] executeAsync / exitCode: 0 / output.Length: 1 │
│ 0 │
│ 0 │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = FileSystem.createTempDirectory ()
let path = tempFolder </> "test.txt"
let command = @$"pwsh -c ""Get-Content {path}"""
async {
do! "0" |> FileSystem.writeAllTextAsync path
let cts = new System.Threading.CancellationTokenSource ()
trace Debug (fun () -> "1") getLocals
let! result =
executeWithOptionsAsync
{
Command = command
CancellationToken = Some cts.Token
OnLine = None
WorkingDirectory = None
}
|> Async.StartChild
trace Debug (fun () -> "2") getLocals
do! Async.Sleep 100
trace Debug (fun () -> "3") getLocals
cts.Cancel ()
trace Debug (fun () -> "4") getLocals
let! exitCode, output = result
trace Debug (fun () -> "5") getLocals
return exitCode, output
}
|> Async.runWithTimeout 10000
|> function
| Some (exitCode, output) ->
exitCode |> _assert_eq -2147483648
output |> _assert_eq "System.Threading.Tasks.TaskCanceledException: A
task was canceled."
true
| _ -> false
|> _assert_eq true
╭─[ 684.56ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:02 #7 [Debug] 1 │
│ 00:00:02 #9 [Debug] 2 │
│ 00:00:02 #8 [Debug] executeAsync / options: { Command = │
│ "pwsh -c "Get-Content │
│ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0651-0507-0743-0f6a1 │
│ f4f23a5\test.txt"" │
│ WorkingDirectory = None │
│ CancellationToken = Some System.Threading.CancellationToken │
│ OnLine = None } │
│ 00:00:02 #10 [Debug] 3 │
│ 00:00:02 #11 [Debug] 4 │
│ 00:00:02 #12 [Warning] executeAsync / WaitForExitAsync / ex: │
│ System.Threading.Tasks.TaskCanceledException: A task was canceled. │
│ 00:00:02 #13 [Debug] executeAsync / exitCode: -2147483648 / output.Length: │
│ 66 │
│ 00:00:02 #14 [Debug] 5 │
│ -2147483648 │
│ System.Threading.Tasks.TaskCanceledException: A task was canceled. │
│ True │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## splitArgs │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline splitArgs commandLine =
commandLine
|> System.CommandLine.Parsing.CommandLineStringSplitter.Instance.Split
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""a b "c d" e"""
|> splitArgs
|> Seq.toArray
|> _assert_eq [[| "a"; "b"; "c d"; "e" |]]
╭─[ 33.10ms - stdout ]─────────────────────────────────────────────────────────╮
│ [ a, b, c d, e ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parseArgs │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
let assemblyName =
System.Reflection.Assembly.GetEntryAssembly().GetName().Name
let errorHandler : Argu.IExiter =
if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
List.contains assemblyName
then Argu.ExceptionExiter ()
else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ ->
Some System.ConsoleColor.Red)
let parser =
Argu.ArgumentParser.Create<'T> (
programName = $"{assemblyName}{getExecutableSuffix ()}",
errorHandler = errorHandler
)
parser.ParseCommandLine args
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
Argu.ArguAttributes.Last>]]
Paths of paths : string list
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Paths _ -> nameof Paths
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 81.93ms - return value ]───────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] <paths>... │
│ │
│ PATHS: │
│ │
│ <paths>... Paths │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
fun () -> parseArgs<Arguments> [[||]] |> ignore
|> _throwsC (fun ex _ ->
printException ex
|> _stringContains "Argu.ArguParseException: ERROR: missing parameter
'<paths>...'."
)
╭─[ 55.81ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSI_0030+it@3-246 │
│ Argu.ArguParseException: ERROR: missing parameter '<paths>...'. │
│ USAGE: dotnet-repl.exe [--help] <paths>... │
│ │
│ PATHS: │
│ │
│ <paths>... Paths │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseArgs<'T>
|> fun results -> results.GetAllResults ()
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
Argu.ArguAttributes.Last>]]
Paths of paths : string list
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Paths _ -> nameof Paths
parseAllArgs<Arguments> [[| "a b"; "c" |]]
|> _assert_eq [[ Arguments.Paths [[ "a b"; "c" ]] ]]
╭─[ 91.34ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSharpList<Arguments> │
│ - paths: [ a b, c ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseAllArgs<'T>
|> List.groupBy CommonFSharp.getUnionCaseName<'T>
|> Map.ofList
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
parseArgsMap<Arguments> [[| "a b"; "c" |]]
|> _assert_eq (
[[ nameof Arguments.Paths, [[ Arguments.Paths [[ "a b"; "c" ]] ]] ]]
|> Map.ofList
)
╭─[ 62.49ms - stdout ]─────────────────────────────────────────────────────────╮
│ FSharpMap<String,FSharpList<Arguments>> │
│ - Key: Paths │
│ Value: FSharpList<Arguments> │
│ - paths: [ a b, c ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Runtime.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 339892 bytes to Runtime.dib.html
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Toml (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/tomlyn/0.17.0/lib/net7.0/Tomlyn.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
── fsharp ──────────────────────────────────────────────────────────────────────
let inline (/./) (table: Tomlyn.Model.TomlTable) (key: string) :
Tomlyn.Model.TomlTable =
table.[[key]] :?> Tomlyn.Model.TomlTable
let inline (/../) (table: Tomlyn.Model.TomlTable) (key: string) : 'T seq =
table.[[key]] :?> Tomlyn.Model.TomlArray |> Seq.cast<'T>
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tomlContent =
"""
[[extension]]
paths = [["/a", "/b"]]
"""
let toml = Tomlyn.Toml.Parse tomlContent
let tomlModel = Tomlyn.Toml.ToModel toml
let paths : string seq = tomlModel /./ "extension" /../ "paths"
paths
|> Seq.toList
|> _assert_eq [[ "/a"; "/b" ]]
╭─[ 125.71ms - stdout ]────────────────────────────────────────────────────────╮
│ [ /a, /b ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Toml.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 277988 bytes to Toml.dib.html
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Threading.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: CommonFSharp.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Common.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Crypto.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: AsyncSeq.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Networking.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: FileSystem.dib
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Async.dib
00:00:00 #5 [Debug] parseDibCode / output: Fs / file: Networking.dib
00:00:00 #5 [Debug] parseDibCode / output: Fs / file: Async.dib
00:00:00 #9 [Debug] parseDibCode / output: Fs / file: Crypto.dib
00:00:00 #8 [Debug] parseDibCode / output: Fs / file: FileSystem.dib
00:00:00 #5 [Debug] parseDibCode / output: Fs / file: Threading.dib
00:00:00 #5 [Debug] parseDibCode / output: Fs / file: AsyncSeq.dib
00:00:00 #6 [Debug] parseDibCode / output: Fs / file: CommonFSharp.dib
00:00:00 #7 [Debug] parseDibCode / output: Fs / file: Common.dib
00:00:00 #10 [Debug] writeDibCode / output: Fs / path: Runtime.dib
00:00:00 #10 [Debug] writeDibCode / output: Fs / path: Toml.dib
00:00:00 #12 [Debug] parseDibCode / output: Fs / file: Toml.dib
00:00:00 #11 [Debug] parseDibCode / output: Fs / file: Runtime.dib
In [ ]:
{ . "$ScriptDir/../lib/rust/fable/build.ps1" } | Invoke-Block
── pwsh ──────────────────────────────────────────────────────────────────────── . ../../../scripts/nbs_header.ps1 . ../../../scripts/core.ps1 ── pwsh ──────────────────────────────────────────────────────────────────────── dotnet fable --optimize --lang rs --extension .rs ╭─[ 1.27s - stdout ]───────────────────────────────────────────────────────────╮ │ Fable 4.14.0: F# to Rust compiler (status: alpha) │ │ │ │ Thanks to the contributor! @mastoj │ │ Stand with Ukraine! https://standwithukraine.com.ua/ │ │ │ │ Parsing fable-library-rust.fsproj... │ │ Retrieving project options from cache, in case of issues run `dotnet fable │ │ clean` or try `--noCache` option. │ │ Project and references (1 source files) parsed in 210ms │ │ │ │ Skipped compilation because all generated files are up-to-date! │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ [NbConvertApp] Converting notebook build.dib.ipynb to html C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. validate(nb) C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3 return _pygments_highlight( [NbConvertApp] Writing 272478 bytes to build.dib.html
In [ ]:
{ . "$ScriptDir/../apps/spiral/build.ps1" } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Supervisor (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com
mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli
ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0
/lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0
/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/
7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll"
#r
@"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha
rp.Json.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Threading.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Networking.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Threading =
open Common
/// ## newDisposableToken
let inline newDisposableToken (mergeToken:
System.Threading.CancellationToken option) =
let cts = new System.Threading.CancellationTokenSource ()
let cts =
match mergeToken with
| None -> cts
| Some mergeToken ->
System.Threading.CancellationTokenSource.CreateLinkedTokenSource
[[| cts.Token; mergeToken |]]
let disposable = newDisposable cts.Cancel
cts.Token, disposable
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Networking =
open Common
/// ## testPortOpen
let inline testPortOpen port = async {
let! ct = Async.CancellationToken
use client = new System.Net.Sockets.TcpClient ()
try
do! client.ConnectAsync ("127.0.0.1", port, ct) |>
Async.awaitValueTaskUnit
return true
with ex ->
trace Verbose (fun () -> $"testPortOpen / ex: {ex |>
printException}") getLocals
return false
}
let inline testPortOpenTimeout timeout port = async {
let! result =
testPortOpen port
|> Async.runWithTimeoutAsync timeout
return
match result with
| None -> false
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FileSystem.Operators
open Microsoft.AspNetCore.SignalR.Client
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## sendJson │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline sendJson (port : int) (json : string) = async {
let! portOpen = Networking.testPortOpen port
if portOpen then
try
let connection =
HubConnectionBuilder().WithUrl($"http://127.0.0.1:{port}").Build()
do! connection.StartAsync () |> Async.AwaitTask
let! result = connection.InvokeAsync<string>("ClientToServerMsg",
json) |> Async.AwaitTask
do! connection.StopAsync () |> Async.AwaitTask
trace Debug (fun () -> $"sendJson / port: {port} / json: {json} /
result.Length: {result |> Option.ofObj |> Option.map String.length}") getLocals
return Some result
with ex ->
trace Critical (fun () -> $"sendJson / port: {port} / json: {json} /
ex: {ex |> printException}") getLocals
return None
else
trace Debug (fun () -> "sendJson / error: port not open") getLocals
return None
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## sendObj │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline sendObj port obj =
obj
|> System.Text.Json.JsonSerializer.Serialize
|> sendJson port
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## awaitCompiler │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type VSCPos = {| line : int; character : int |}
type VSCRange = VSCPos * VSCPos
type RString = VSCRange * string
type TracedError = {| trace : string list; message : string |}
type ClientErrorsRes =
| FatalError of string
| TracedError of TracedError
| PackageErrors of {| uri : string; errors : RString list |}
| TokenizerErrors of {| uri : string; errors : RString list |}
| ParserErrors of {| uri : string; errors : RString list |}
| TypeErrors of {| uri : string; errors : RString list |}
── fsharp ──────────────────────────────────────────────────────────────────────
let inline awaitCompiler port cancellationToken = async {
let! ct =
cancellationToken
|> Option.defaultValue System.Threading.CancellationToken.None
|> Async.mergeCancellationTokenWithDefaultAsync
let cts = new System.Threading.CancellationTokenSource ()
let compiler = MailboxProcessor.Start (fun inbox -> async {
let! availablePort = Networking.getAvailablePort (Some 60) port
if availablePort <> port then
inbox.Post port
else
let repositoryRoot = FileSystem.getSourceDirectory () |>
FileSystem.findParent ".paket" false
let compilerPath =
repositoryRoot </> "deps/The-Spiral-Language/The Spiral Language
2/artifacts/bin/The Spiral Language 2/release"
|> System.IO.Path.GetFullPath
let dllPath = compilerPath </> "Spiral.dll"
let! exitCode, result =
Runtime.executeWithOptionsAsync
{
Command = $@"dotnet ""{dllPath}"" --port {availablePort}
--default-int i32 --default-float f64"
CancellationToken = Some ct
WorkingDirectory = None
OnLine = Some <| fun { Line = line } -> async {
if line |> String.contains $"Server bound to:
http://localhost:{availablePort}" then
do! Networking.waitForPortAccess (Some 500) true
availablePort |> Async.Ignore
let rec loop retry = async {
let getLocals () = $"port: {availablePort} /
retry: {retry} / {getLocals ()}"
try
let pingObj = {| Ping = true |}
let! pingResult = pingObj |> sendObj
availablePort
trace Verbose (fun () -> $"awaitCompiler
/ Ping / result: {pingResult}") getLocals
with ex ->
trace Verbose (fun () -> $"awaitCompiler
/ Ping / ex: {ex |> printException}") getLocals
do! Async.Sleep 10
do! loop (retry + 1)
}
do! loop 0
inbox.Post availablePort
}
}
trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} /
result: {result}") getLocals
cts.Cancel ()
}, ct)
let! serverPort = compiler.Receive ()
let connection =
HubConnectionBuilder().WithUrl($"http://127.0.0.1:{serverPort}").Build ()
do! connection.StartAsync () |> Async.AwaitTask
let event = Event<_> ()
let disposable = connection.On<string> ("ServerToClientMsg", event.Trigger)
let stream =
FSharp.Control.AsyncSeq.unfoldAsync
(fun () -> async {
let! msg = event.Publish |> Async.AwaitEvent
return Some (msg |>
FSharp.Json.Json.deserialize<ClientErrorsRes>, ())
})
()
let disposable =
newDisposable (fun () ->
disposable.Dispose ()
connection.StopAsync () |> Async.AwaitTask |> Async.StartImmediate
)
return
serverPort,
stream,
cts.Token,
disposable
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getFileUri │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getFileUri (path : string) =
let path =
if Runtime.isWindows () |> not
then path
else $"{path.[[0]] |> System.Char.ToLower}{path.[[1..]]}" |>
String.replace "\\" "/"
$"file:///{path |> String.trimStart [[| '/' |]]}"
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getFilePathFromUri uri =
match System.Uri.TryCreate (uri, System.UriKind.Absolute) with
| true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath
| _ -> failwith "invalid uri"
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getCompilerPort () =
13805
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## serialize_obj │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let serializeObj obj =
obj
|> FSharp.Json.Json.serialize
|> String.replace "\\\\" "\\"
|> String.replace "\\r\\n" "\n"
|> String.replace "\\n" "\n"
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildFile timeout port cancellationToken path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let fileDir = fullPath |> System.IO.Path.GetDirectoryName
let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension
let! code = fullPath |> FileSystem.readAllTextAsync
let eventFilter = function
| FileSystem.FileSystemChange.Changed (path, _) when path =
$"{fileName}.fsx" -> true
| _ -> false
let stream, disposable = fileDir |> FileSystem.watchDirectory eventFilter
use _ = disposable
let token, disposable = Threading.newDisposableToken cancellationToken
use _ = disposable
let! serverPort, errors, ct, disposable = awaitCompiler port (Some token)
use _ = disposable
let fsxContentSeq =
stream
|> FSharp.Control.AsyncSeq.choose (function
| _, (FileSystem.FileSystemChange.Changed (path, Some content) as
event)
when event |> eventFilter
->
Some content
| _ -> None
)
|> FSharp.Control.AsyncSeq.map (fun content ->
Some (content |> String.replace "\r\n" "\n"), None
)
let inline printErrorData (data : {| uri : string; errors : RString list |})
=
let fileName = data.uri |> System.IO.Path.GetFileName
let errors =
data.errors
|> List.map snd
|> String.concat "\n"
$"{fileName}:\n{errors}"
let errorsSeq =
errors
|> FSharp.Control.AsyncSeq.choose (fun error ->
match error with
| FatalError message ->
Some (message, error)
| TracedError data ->
Some (data.message, error)
| PackageErrors data when data.errors |> List.isEmpty |> not ->
Some (data |> printErrorData, error)
| TokenizerErrors data when data.errors |> List.isEmpty |> not ->
Some (data |> printErrorData, error)
| ParserErrors data when data.errors |> List.isEmpty |> not ->
Some (data |> printErrorData, error)
| TypeErrors data when data.errors |> List.isEmpty |> not ->
Some (data |> printErrorData, error)
| _ -> None
)
|> FSharp.Control.AsyncSeq.map (fun (message, error) ->
None, Some (message, error)
)
let timerSeq =
1000
|> FSharp.Control.AsyncSeq.intervalMs
|> FSharp.Control.AsyncSeq.map (fun _ -> None, None)
let outputSeq =
[[ fsxContentSeq; errorsSeq; timerSeq ]]
|> FSharp.Control.AsyncSeq.mergeAll
let! outputChild =
((None, [[]], 0), outputSeq)
||> FSharp.Control.AsyncSeq.scan (
fun (fsxContentResult, errors, typeErrorCount) (fsxContent, error)
->
match fsxContent, error with
| Some fsxContent, None -> Some fsxContent, errors,
typeErrorCount
| None, Some (_, FatalError "File main has a type error
somewhere in its path.") ->
fsxContentResult, errors, typeErrorCount + 1
| None, Some error -> fsxContentResult, error :: errors,
typeErrorCount
| None, None when typeErrorCount >= 1 ->
fsxContentResult, errors, typeErrorCount + 1
| _ -> fsxContentResult, errors, typeErrorCount
)
|> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (fsxContent, errors,
typeErrorCount) ->
trace Debug (fun () -> $"buildFile / takeWhileInclusive /
fsxContent: {fsxContent |> Option.defaultValue System.String.Empty |>
String.ellipsis 750} / errors: {errors |> serializeObj} / typeErrorCount:
{typeErrorCount}") getLocals
match fsxContent, errors with
| None, [[]] when typeErrorCount > 2 -> false
| None, [[]] -> true
| _ -> false
)
|> FSharp.Control.AsyncSeq.tryLast
|> Async.withCancellationToken ct
|> Async.catch
|> Async.runWithTimeoutAsync timeout
|> Async.StartChild
let fileOpenObj = {| FileOpen = {| uri = fullPath |> getFileUri; spiText =
code |} |}
let! _fileOpenResult = fileOpenObj |> sendObj serverPort
do! Async.Sleep 60
let buildFileObj = {| BuildFile = {| uri = fullPath |> getFileUri; backend =
"Fsharp" |} |}
let! _buildFileResult = buildFileObj |> sendObj serverPort
return!
outputChild
|> Async.map (function
| Some (Ok (Some (message, errors, _))) ->
message, errors |> List.distinct |> List.rev
| Some (Error ex) ->
trace Critical (fun () -> $"buildFile / error: {ex |>
serializeObj}") getLocals
None, [[]]
| _ -> None, [[]]
)
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## persistCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline persistCode code = async {
let tempDir = FileSystem.createTempDirectory ()
let mainPath = tempDir </> "main.spi"
do! code |> FileSystem.writeAllTextAsync mainPath
let repositoryRoot = FileSystem.getSourceDirectory () |>
FileSystem.findParent ".paket" false
let spiprojPath = tempDir </> "package.spiproj"
let spiprojCode =
$"""packageDir: {repositoryRoot </> "lib"}
packages:
|core-
spiral-
modules:
main
"""
do! spiprojCode |> FileSystem.writeAllTextAsync spiprojPath
let disposable = newDisposable (fun () ->
()
// tempDir |> FileSystem.deleteDirectoryAsync |> Async.Ignore |>
Async.RunSynchronously
)
return mainPath, disposable
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildCode timeout cancellationToken code = async {
let! mainPath, disposable = persistCode code
use _ = disposable
let port = getCompilerPort ()
return! mainPath |> buildFile timeout port cancellationToken
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let buildCode timeout cancellationToken code = buildCode timeout
cancellationToken code
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl app () =
console.write_line "text"
1i32
inl main () =
app
|> dyn
|> ignore
"""
|> buildCode 15000 None
|> Async.runWithTimeout 15000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
Some """let rec closure0 () () : int32 =
let v0 : string = "text"
System.Console.WriteLine v0
1
let v0 : (unit -> int32) = closure0()
()
""",
[[]]
)
)
╭─[ 995.42ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:00 #2 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:00 #3 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:00 #4 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl app () =\n console.write_line │
│ \u0022text\u0022\n 1i32\n\ninl main () =\n app\n |\u003E dyn\n │
│ |\u003E │
│ ignore\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/2024 │
│ 0318-0652-0643-4359-4a74eabf82d4/main.spi"}} / result.Length: │
│ 00:00:00 #5 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-0643-4359-4a74eabf82d4/main.spi"}} / │
│ result.Length: │
│ 00:00:00 #6 [Debug] buildFile / takeWhileInclusive / fsxContent: let rec │
│ closure0 () () : int32 = │
│ let v0 : string = "text" │
│ System.Console.WriteLine v0 │
│ 1 │
│ let v0 : (unit -> int32) = closure0() │
│ () │
│ / errors: [] / typeErrorCount: 0 │
│ 00:00:00 #7 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - FSharpOption<String> │
│ Value: let rec closure0 () () : int32 = │
│ let v0 : string = "text" │
│ System.Console.WriteLine v0 │
│ 1 │
│ let v0 : (unit -> int32) = closure0() │
│ () │
│ │
│ - [ ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> _assert_eq None
╭─[ 10.23s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:00 #8 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:01 #9 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:01 #10 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:01 #11 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"","uri":"file:///c:/Users/i574n/AppData/Local/Temp/! │
│ dotnet-repl/20240318-0652-0743-4353-4ed723bf30b4/main.spi"}} / │
│ result.Length: │
│ 00:00:01 #12 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-0743-4353-4ed723bf30b4/main.spi"}} / │
│ result.Length: │
│ 00:00:02 #13 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:03 #14 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:04 #15 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:05 #16 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:06 #17 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:07 #18 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:08 #19 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:09 #20 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:10 #21 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:10 #22 [Debug] runWithTimeoutAsync / timeout: 10000 │
│ 00:00:10 #23 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ <null> │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"inl app () =
0i32
inl a = 1
inl main () =
app
|> dyn
|> ignore
"
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "main.spi:
Global inl/let statements should all return functions known at parse time." ]]
)
)
╭─[ 397.25ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:11 #26 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #27 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:11 #28 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:11 #29 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl app () =\n 0i32\n\ninl a = 1\n\ninl main () │
│ =\n app\n |\u003E dyn\n |\u003E │
│ ignore\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/2024 │
│ 0318-0652-1766-6655-6956206c2cf6/main.spi"}} / result.Length: │
│ 00:00:11 #30 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "main.spi: │
│ Global inl/let statements should all return functions known at parse time.", │
│ { │
│ "ParserErrors": { │
│ "errors": [ │
│ [ │
│ [ │
│ { │
│ "character": 0, │
│ "line": 3 │
│ }, │
│ { │
│ "character": 9, │
│ "line": 3 │
│ } │
│ ], │
│ "Global inl/let statements should all return functions known at │
│ parse time." │
│ ] │
│ ], │
│ "uri": │
│ "file:///c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1766-6 │
│ 655-6956206c2cf6\main.spi" │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:11 #31 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-1766-6655-6956206c2cf6/main.spi"}} / │
│ result.Length: │
│ 00:00:11 #32 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ main.spi: │
│ Global inl/let statements should all return functions known at parse time. ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl main () =
1i32 / 0i32
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "An attempt to divide by zero has been detected at compile time." ]]
)
)
╭─[ 558.31ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:11 #33 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:11 #34 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:11 #35 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:11 #36 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │
│ 0i32\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/202403 │
│ 18-0652-1813-1332-13015110b148/main.spi"}} / result.Length: │
│ 00:00:11 #37 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-1813-1332-13015110b148/main.spi"}} / │
│ result.Length: │
│ 00:00:11 #38 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "An attempt to divide by zero has been detected at compile time.", │
│ { │
│ "TracedError": { │
│ "message": "An attempt to divide by zero has been detected at │
│ compile time.", │
│ "trace": [ │
│ "Error trace on line: 1, column: 10 in module: │
│ c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1813-1332-13015 │
│ 110b148\main.spi. │
│ inl main () = │
│ ^ │
│ ", │
│ "Error trace on line: 2, column: 5 in module: │
│ c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1813-1332-13015 │
│ 110b148\main.spi. │
│ 1i32 / 0i32 │
│ ^ │
│ " │
│ ] │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:11 #39 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ An attempt to divide by zero has been detected at compile time. ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl main () =
1 + ""
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[
"main.spi:
Constraint satisfaction error.
Got: string
Fails to satisfy: number"
]]
)
)
╭─[ 420.30ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:12 #41 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:12 #42 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:12 #43 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:12 #44 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │
│ \u0022\u0022\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-rep │
│ l/20240318-0652-1871-7158-704d9ad12157/main.spi"}} / result.Length: │
│ 00:00:12 #45 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "main.spi: │
│ Constraint satisfaction error. │
│ Got: string │
│ Fails to satisfy: number", │
│ { │
│ "TypeErrors": { │
│ "errors": [ │
│ [ │
│ [ │
│ { │
│ "character": 8, │
│ "line": 1 │
│ }, │
│ { │
│ "character": 10, │
│ "line": 1 │
│ } │
│ ], │
│ "Constraint satisfaction error. │
│ Got: string │
│ Fails to satisfy: number" │
│ ] │
│ ], │
│ "uri": │
│ "file:///c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1871-7 │
│ 158-704d9ad12157\main.spi" │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:12 #46 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-1871-7158-704d9ad12157/main.spi"}} / │
│ result.Length: │
│ 00:00:12 #47 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ main.spi: │
│ Constraint satisfaction error. │
│ Got: string │
│ Fails to satisfy: number ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl main () =
x + y
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[
"main.spi:
Unbound variable: x.
Unbound variable: y."
]]
)
)
╭─[ 596.52ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:12 #48 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:12 #49 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:12 #50 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:12 #51 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl main () =\n x \u002B │
│ y\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318- │
│ 0652-1927-2728-242f4ef2aa2b/main.spi"}} / result.Length: │
│ 00:00:12 #52 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "main.spi: │
│ Unbound variable: x. │
│ Unbound variable: y.", │
│ { │
│ "TypeErrors": { │
│ "errors": [ │
│ [ │
│ [ │
│ { │
│ "character": 4, │
│ "line": 1 │
│ }, │
│ { │
│ "character": 5, │
│ "line": 1 │
│ } │
│ ], │
│ "Unbound variable: x." │
│ ], │
│ [ │
│ [ │
│ { │
│ "character": 8, │
│ "line": 1 │
│ }, │
│ { │
│ "character": 9, │
│ "line": 1 │
│ } │
│ ], │
│ "Unbound variable: y." │
│ ] │
│ ], │
│ "uri": │
│ "file:///c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1927-2 │
│ 728-242f4ef2aa2b\main.spi" │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:12 #53 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-1927-2728-242f4ef2aa2b/main.spi"}} / │
│ result.Length: │
│ 00:00:12 #54 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ main.spi: │
│ Unbound variable: x. │
│ Unbound variable: y. ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""union a =
| B
| c
inl main () =
()
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "main.spi:
Expected: uppercase variable" ]]
)
)
╭─[ 451.74ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:13 #56 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:13 #57 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:13 #58 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:13 #59 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"union a =\n | B\n | c\n\ninl main () =\n │
│ ()\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318 │
│ -0652-1977-7737-71dbad0705ea/main.spi"}} / result.Length: │
│ 00:00:13 #60 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "main.spi: │
│ Expected: uppercase variable", │
│ { │
│ "ParserErrors": { │
│ "errors": [ │
│ [ │
│ [ │
│ { │
│ "character": 6, │
│ "line": 2 │
│ }, │
│ { │
│ "character": 7, │
│ "line": 2 │
│ } │
│ ], │
│ "Expected: uppercase variable" │
│ ] │
│ ], │
│ "uri": │
│ "file:///c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-1977-7 │
│ 737-71dbad0705ea\main.spi" │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:13 #61 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-1977-7737-71dbad0705ea/main.spi"}} / │
│ result.Length: │
│ 00:00:13 #62 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ main.spi: │
│ Expected: uppercase variable ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""
/// abc
inl main () =
()
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "main.spi:
Expected: whitespace" ]]
)
)
╭─[ 457.60ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:13 #63 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:13 #64 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:13 #65 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:13 #66 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"\n/// abc\ninl main () =\n │
│ ()\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318 │
│ -0652-2024-2490-25e151cd2868/main.spi"}} / result.Length: │
│ 00:00:13 #67 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "main.spi: │
│ Expected: whitespace", │
│ { │
│ "TokenizerErrors": { │
│ "errors": [ │
│ [ │
│ [ │
│ { │
│ "character": 2, │
│ "line": 1 │
│ }, │
│ { │
│ "character": 3, │
│ "line": 1 │
│ } │
│ ], │
│ "Expected: whitespace" │
│ ] │
│ ], │
│ "uri": │
│ "file:///c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-2024-2 │
│ 490-25e151cd2868\main.spi" │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:13 #68 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-2024-2490-25e151cd2868/main.spi"}} / │
│ result.Length: │
│ 00:00:13 #69 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ main.spi: │
│ Expected: whitespace ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""
inl main () =
real
inl real_unbox forall a. (obj : a) : a =
typecase obj with
| _ => obj
real_unbox ()
()
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "Cannot apply a forall with a term." ]]
)
)
╭─[ 470.99ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:14 #71 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:14 #72 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:14 #73 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:14 #74 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │
│ forall a. (obj : a) : a =\n typecase obj with\n | _ │
│ =\u003E obj\n real_unbox ()\n │
│ ()\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318 │
│ -0652-2071-7108-7ddb756de818/main.spi"}} / result.Length: │
│ 00:00:14 #75 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-2071-7108-7ddb756de818/main.spi"}} / │
│ result.Length: │
│ 00:00:14 #76 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "Cannot apply a forall with a term.", │
│ { │
│ "TracedError": { │
│ "message": "Cannot apply a forall with a term.", │
│ "trace": [ │
│ "Error trace on line: 2, column: 10 in module: │
│ c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-2071-7108-7ddb7 │
│ 56de818\main.spi. │
│ inl main () = │
│ ^ │
│ ", │
│ "Error trace on line: 4, column: 9 in module: │
│ c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-2071-7108-7ddb7 │
│ 56de818\main.spi. │
│ inl real_unbox forall a. (obj : a) : a = │
│ ^ │
│ ", │
│ "Error trace on line: 7, column: 9 in module: │
│ c:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240318-0652-2071-7108-7ddb7 │
│ 56de818\main.spi. │
│ real_unbox () │
│ ^ │
│ " │
│ ] │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:14 #77 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ Cannot apply a forall with a term. ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""
inl main () =
real
inl real_unbox forall a. (obj : a) : a =
typecase obj with
| _ => obj
real_unbox `i32 1
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
None,
[[ "The main function should not have a forall." ]]
)
)
╭─[ 561.24ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:14 #78 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:14 #79 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:14 #80 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:14 #81 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │
│ forall a. (obj : a) : a =\n typecase obj with\n | _ │
│ =\u003E obj\n real_unbox \u0060i32 │
│ 1\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318- │
│ 0652-2122-2234-280adf726f04/main.spi"}} / result.Length: │
│ 00:00:14 #82 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-2122-2234-280adf726f04/main.spi"}} / │
│ result.Length: │
│ 00:00:15 #83 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [ │
│ [ │
│ "The main function should not have a forall.", │
│ { │
│ "TracedError": { │
│ "message": "The main function should not have a forall.", │
│ "trace": [] │
│ } │
│ } │
│ ] │
│ ] / typeErrorCount: 0 │
│ 00:00:15 #84 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - <null> │
│ - [ The main function should not have a forall. ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""
inl init_series start end inc =
inl total : f64 = conv ((end - start) / inc) + 1
listm.init total (conv >> (*) inc >> (+) start) : list f64
type integration = (f64 -> f64) -> f64 -> f64 -> f64
inl integral dt : integration =
fun f a b =>
init_series (a + dt / 2) (b - dt / 2) dt
|> listm.map (f >> (*) dt)
|> listm.fold (+) 0
inl main () =
integral 0.1 (fun x => x ** 2) 0 1
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
|> _assert_eq (
Some (
Some "0.3325000000000001\n",
[[]]
)
)
╭─[ 545.03ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:15 #86 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:15 #87 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:15 #88 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:15 #89 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │
│ f64 = conv ((end - start) / inc) \u002B 1\n listm.init total (conv │
│ \u003E\u003E (*) inc \u003E\u003E (\u002B) start) : list f64\n\ntype │
│ integration = (f64 -\u003E f64) -\u003E f64 -\u003E f64 -\u003E f64\n\ninl │
│ integral dt : integration =\n fun f a b =\u003E\n init_series (a │
│ \u002B dt / 2) (b - dt / 2) dt\n |\u003E listm.map (f \u003E\u003E │
│ (*) dt)\n |\u003E listm.fold (\u002B) 0\n\ninl main () =\n │
│ integral 0.1 (fun x =\u003E x ** 2) 0 │
│ 1\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318- │
│ 0652-2187-8736-84a460a18c71/main.spi"}} / result.Length: │
│ 00:00:15 #90 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-2187-8736-84a460a18c71/main.spi"}} / │
│ result.Length: │
│ 00:00:15 #91 [Debug] buildFile / takeWhileInclusive / fsxContent: │
│ 0.3325000000000001 │
│ / errors: [] / typeErrorCount: 0 │
│ 00:00:15 #92 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ FSharpOption<Tuple<FSharpOption<String>,FSharpList<String>>> │
│ Value: - FSharpOption<String> │
│ Value: 0.3325000000000001 │
│ │
│ - [ ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""
inl init_series start end inc =
inl total : f64 = conv ((end - start) / inc) + 1
listm.init total (conv >> (*) inc >> (+) start) : list f64
type integration = (f64 -> f64) -> f64 -> f64 -> f64
inl integral dt : integration =
fun f a b =>
init_series (a + dt / 2) (b - dt / 2) dt
|> listm.map (f >> (*) dt)
|> listm.fold (+) 0
inl main () =
integral 0.01 (fun x => x ** 2) 0 1
"""
|> buildCode 10000 None
|> Async.runWithTimeout 10000
|> Option.map (fun (fsxContent, errors) -> fsxContent, errors |> List.map fst)
// |> _assert_eq None
// |> fun x -> printfn $"{x.ToDisplayString ()}"
╭─[ 648.06ms - return value ]──────────────────────────────────────────────────╮
│ <details open="open" class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Some((Some(0.33332500000000004<br/>), [ │
│ ]))</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │
│ d>Value</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>(Some(0.33332500000000004<br/>), [ │
│ ])</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
│ >Item1</td><td><details class="dni-treeview"><summary><span │
│ class="dni-code-hint"><code>Some(0.33332500000000004<br/>)</code></span></su │
│ mmary><div><table><thead><tr></tr></thead><tbody><tr><td>Value</td><td><div │
│ class="dni-plaintext"><pre>0.33332500000000004 │
│ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │
│ 2</td><td><div c... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 654.97ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:15 #93 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:15 #94 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:15 #95 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:15 #96 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │
│ f64 = conv ((end - start) / inc) \u002B 1\n listm.init total (conv │
│ \u003E\u003E (*) inc \u003E\u003E (\u002B) start) : list f64\n\ntype │
│ integration = (f64 -\u003E f64) -\u003E f64 -\u003E f64 -\u003E f64\n\ninl │
│ integral dt : integration =\n fun f a b =\u003E\n init_series (a │
│ \u002B dt / 2) (b - dt / 2) dt\n |\u003E listm.map (f \u003E\u003E │
│ (*) dt)\n |\u003E listm.fold (\u002B) 0\n\ninl main () =\n │
│ integral 0.01 (fun x =\u003E x ** 2) 0 │
│ 1\n","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318- │
│ 0652-2236-3694-3f9b2fa73fa8/main.spi"}} / result.Length: │
│ 00:00:16 #97 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/Users/i574n/AppData/Local │
│ /Temp/!dotnet-repl/20240318-0652-2236-3694-3f9b2fa73fa8/main.spi"}} / │
│ result.Length: │
│ 00:00:16 #98 [Debug] buildFile / takeWhileInclusive / fsxContent: │
│ 0.33332500000000004 │
│ / errors: [] / typeErrorCount: 0 │
│ 00:00:16 #99 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getFileTokenRange │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getFileTokenRange port cancellationToken path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let! code = fullPath |> FileSystem.readAllTextAsync
let lines = code |> String.split [[| '\n' |]]
let token, disposable = Threading.newDisposableToken cancellationToken
use _ = disposable
let! serverPort, _errors, ct, disposable = awaitCompiler port (Some token)
use _ = disposable
let fileOpenObj = {| FileOpen = {| uri = fullPath |> getFileUri; spiText =
code |} |}
let! _fileOpenResult = fileOpenObj |> sendObj serverPort
let fileTokenRangeObj =
{|
FileTokenRange =
{|
uri = fullPath |> getFileUri
range =
[[|
{| line = 0; character = 0 |}
{| line = lines.Length - 1; character =
lines.[[lines.Length - 1]].Length |}
|]]
|}
|}
let! fileTokenRangeResult =
fileTokenRangeObj
|> sendObj serverPort
|> Async.withCancellationToken ct
return fileTokenRangeResult |> Option.map FSharp.Json.Json.deserialize<int
array>
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## getCodeTokenRange │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline getCodeTokenRange cancellationToken code = async {
let! mainPath, disposable = persistCode code
use _ = disposable
let port = getCompilerPort ()
return! mainPath |> getFileTokenRange port cancellationToken
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl main () = ()"""
|> getCodeTokenRange None
|> Async.runWithTimeout 10000
|> Option.flatten
|> _assert_eq (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8;
0; 0; 2; 1; 4; 0; 0;
2; 1; 8; 0; 0; 1; 1; 8; 0 |]])
╭─[ 3.54s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:25 #110 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:26 #111 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl main () = │
│ ()","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318-0 │
│ 652-3244-4452-4f3ca227be02/main.spi"}} / result.Length: │
│ 00:00:26 #112 [Debug] sendJson / port: 13805 / json: │
│ {"FileTokenRange":{"range":[ │
│ {"character":0,"line":0},{"character":16,"line":0}],"uri":"file:///c:/Users/ │
│ i574n/AppData/Local/Temp/!dotnet-repl/20240318-0652-3244-4452-4f3ca227be02/m │
│ ain.spi"}} / result.Length: Some(213) │
│ FSharpOption<Int32[]> │
│ Value: [ 0, 0, 3, 7, 0, 0, 4, 4, 0, 0, 0, 5, 1, 8, 0, 0, 1, 1, 8, 0, │
│ 0, 2, 1, 4, 0, 0, 2, 1, 8, 0, 0, 1, 1, 8, 0 ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"""inl main () = 1i32"""
|> getCodeTokenRange None
|> Async.runWithTimeout 10000
|> Option.flatten
|> _assert_eq (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8;
0; 0; 2; 1; 4; 0; 0;
2; 1; 3; 0; 0; 1; 3; 12; 0 |]])
╭─[ 3.77s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:29 #116 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:29 #117 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl main () = │
│ 1i32","uri":"file:///c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240318 │
│ -0652-3622-2211-28edfb56f7fd/main.spi"}} / result.Length: │
│ 00:00:29 #118 [Debug] sendJson / port: 13805 / json: │
│ {"FileTokenRange":{"range":[ │
│ {"character":0,"line":0},{"character":18,"line":0}],"uri":"file:///c:/Users/ │
│ i574n/AppData/Local/Temp/!dotnet-repl/20240318-0652-3622-2211-28edfb56f7fd/m │
│ ain.spi"}} / result.Length: Some(214) │
│ FSharpOption<Int32[]> │
│ Value: [ 0, 0, 3, 7, 0, 0, 4, 4, 0, 0, 0, 5, 1, 8, 0, 0, 1, 1, 8, 0, │
│ 0, 2, 1, 4, 0, 0, 2, 1, 3, 0, 0, 1, 3, 12, 0 ] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| Build_File of string * string
| File_Token_Range of string * string
| Execute_Command of string
| Timeout of int
| Port of int
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Build_File _ -> nameof Build_File
| File_Token_Range _ -> nameof File_Token_Range
| Execute_Command _ -> nameof Execute_Command
| Timeout _ -> nameof Timeout
| Port _ -> nameof Port
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 117.72ms - return value ]──────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] [--build-file <string> <string>] │
│ [--file-token-range <string> <string>] │
│ [--execute-command <string>] [--timeout <int>] [--port │
│ <int>] │
│ │
│ OPTIONS: │
│ │
│ --build-file <string> <string> │
│ Build_File │
│ --file-token-range <string> <string> │
│ File_Token_Range │
│ --execute-command <string> │
│ Execute_Command │
│ --timeout <int> Timeout │
│ --port <int> Port │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let buildFileActions =
argsMap
|> Map.tryFind (nameof Arguments.Build_File)
|> Option.defaultValue [[]]
|> List.choose (function
| Arguments.Build_File (inputPath, outputPath) -> Some (inputPath,
outputPath)
| _ -> None
)
let fileTokenRangeActions =
argsMap
|> Map.tryFind (nameof Arguments.File_Token_Range)
|> Option.defaultValue [[]]
|> List.choose (function
| Arguments.File_Token_Range (inputPath, outputPath) -> Some
(inputPath, outputPath)
| _ -> None
)
let executeCommandActions =
argsMap
|> Map.tryFind (nameof Arguments.Execute_Command)
|> Option.defaultValue [[]]
|> List.choose (function
| Arguments.Execute_Command command -> Some command
| _ -> None
)
let timeout =
match argsMap |> Map.tryFind (nameof Arguments.Timeout) with
| Some [[ Arguments.Timeout timeout ]] -> timeout
| _ -> 60000 * 60
let port =
match argsMap |> Map.tryFind (nameof Arguments.Port) with
| Some [[ Arguments.Port port ]] -> Some port
| _ -> None
async {
let! buildFileResult =
buildFileActions
|> List.map (fun (inputPath, outputPath) -> async {
let port = port |> Option.defaultWith getCompilerPort
let! outputCode, errors = inputPath |> buildFile timeout port
None
errors
|> List.map snd
|> List.iter (fun error ->
trace Critical (fun () -> $"main / error: {error |>
serializeObj}") getLocals
)
match outputCode with
| Some outputCode ->
do! outputCode |> FileSystem.writeAllTextAsync outputPath
return 0
| None ->
return 1
})
|> Async.Sequential
let! fileTokenRangeResult =
fileTokenRangeActions
|> List.map (fun (inputPath, outputPath) -> async {
let port = port |> Option.defaultWith getCompilerPort
let! tokenRange = inputPath |> getFileTokenRange port None
match tokenRange with
| Some tokenRange ->
do! tokenRange |> FSharp.Json.Json.serialize |>
FileSystem.writeAllTextAsync outputPath
return 0
| None ->
return 1
})
|> Async.Sequential
let! executeCommandResult =
executeCommandActions
|> List.map (fun command -> async {
let port = port |> Option.defaultWith getCompilerPort
let localToken, disposable = Threading.newDisposableToken None
use _ = disposable
let! serverPort, _errors, compilerToken, disposable =
awaitCompiler port (Some localToken)
use _ = disposable
let! exitCode, result =
Runtime.executeWithOptionsAsync
{
Command = command
CancellationToken = Some compilerToken
WorkingDirectory = None
OnLine = None
}
trace Debug (fun () -> $"main / executeCommand / exitCode:
{exitCode}") getLocals
return exitCode
})
|> Async.Sequential
return
[[| buildFileResult; fileTokenRangeResult; executeCommandResult |]]
|> Array.collect id
|> Array.sum
}
|> Async.runWithTimeout timeout
|> Option.defaultValue 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> Runtime.splitArgs
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 29.61ms - return value ]───────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook Supervisor.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 431985 bytes to Supervisor.dib.html
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Supervisor.dib
00:00:00 #2 [Debug] parseDibCode / output: Fs / file: Supervisor.dib
00:00:00 #1 [Debug] persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/fsharp/Common.fs; lib/fsharp/CommonFSharp.fs; lib/fsharp/Threading.fs; ... ] / name: Supervisor / code.Length: 19286
00:00:00 #2 [Debug] buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj
00:00:00 #3 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor"
CancellationToken = None
OnLine = None }
00:00:00 #4 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:00 #5 [Verbose] > Determining projects to restore...
00:00:01 #6 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 477 ms).
00:00:01 #7 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj]
00:00:14 #8 [Verbose] > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\linux-x64\Supervisor.dll
00:00:16 #9 [Verbose] > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\
00:00:16 #10 [Debug] executeAsync / exitCode: 0 / output.Length: 715
00:00:16 #11 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor"
CancellationToken = None
OnLine = None }
00:00:16 #12 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:17 #13 [Verbose] > Determining projects to restore...
00:00:18 #14 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 473 ms).
00:00:18 #15 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj]
00:00:32 #16 [Verbose] > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\win-x64\Supervisor.dll
00:00:39 #17 [Verbose] > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\
00:00:39 #18 [Debug] executeAsync / exitCode: 0 / output.Length: 713
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Eval (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com
mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli
ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0
/lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0
/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll"
#r
@"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/
7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll"
#r
@"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha
rp.Json.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Threading.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Networking.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
#!import ../../apps/builder/Builder.fs
#!import ../../apps/spiral/Supervisor.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Threading =
open Common
/// ## newDisposableToken
let inline newDisposableToken (mergeToken:
System.Threading.CancellationToken option) =
let cts = new System.Threading.CancellationTokenSource ()
let cts =
match mergeToken with
| None -> cts
| Some mergeToken ->
System.Threading.CancellationTokenSource.CreateLinkedTokenSource
[[| cts.Token; mergeToken |]]
let disposable = newDisposable cts.Cancel
cts.Token, disposable
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Networking =
open Common
/// ## testPortOpen
let inline testPortOpen port = async {
let! ct = Async.CancellationToken
use client = new System.Net.Sockets.TcpClient ()
try
do! client.ConnectAsync ("127.0.0.1", port, ct) |>
Async.awaitValueTaskUnit
return true
with ex ->
trace Verbose (fun () -> $"testPortOpen / ex: {ex |>
printException}") getLocals
return false
}
let inline testPortOpenTimeout timeout port = async {
let! result =
testPortOpen port
|> Async.runWithTimeoutAsync timeout
return
match result with
| None -> false
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Builder =
open Common
open FileSystem.Operators
/// ## buildProject
let inline buildProject runtime outputDir path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let fileDir = fullPath |> System.IO.Path.GetDirectoryName
let extension = fullPath |> System.IO.Path.GetExtension
let getLocals () = $"fullPath: {fullPath} / {getLocals ()}"
trace Debug (fun () -> "buildProject") getLocals
match extension with
| ".fsproj" -> ()
| _ -> failwith "Invalid project file"
let runtimes =
runtime
|> Option.map List.singleton
|> Option.defaultValue [[ "linux-x64"; "wi...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Supervisor =
open Common
open FileSystem.Operators
open Microsoft.AspNetCore.SignalR.Client
/// ## sendJson
let inline sendJson (port : int) (json : string) = async {
let! portOpen = Networking.testPortOpen port
if portOpen then
try
let connection =
HubConnectionBuilder().WithUrl($"http://127.0.0.1:{port}").Build()
do! connection.StartAsync () |> Async.AwaitTask
let! result =
connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask
do! connection.StopAsync () |> Async.AwaitTask
trace Debug (fun () -> $"sendJson / port: {port} / json: {json}
/...
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FileSystem.Operators
── fsharp ──────────────────────────────────────────────────────────────────────
open System
open System.Collections.Generic
open System.IO
open System.Text
open System.Threading
// open FSharp.Compiler
// open FSharp.Compiler.Interactive.Shell
// open FSharp.Compiler.Diagnostics
// open FSharp.Compiler.EditorServices
── fsharp ──────────────────────────────────────────────────────────────────────
let inline mapErrors (severity, errors, lastTopLevelIndex) allCode =
let allCodeLineLength =
allCode |> String.split [[| '\n' |]] |> Array.length
errors
|> List.map (fun (_, error) ->
match error with
| Supervisor.FatalError message ->
(
severity, message, 0, ("", (0, 0), (0, 0))
)
|> List.singleton
| Supervisor.TracedError data ->
data.trace
|> List.truncate 5
|> List.append [[ data.message ]]
|> List.map (fun message ->
(
severity, message, 0, ("", (0, 0), (0, 0))
)
)
| Supervisor.PackageErrors data
| Supervisor.TokenizerErrors data
| Supervisor.ParserErrors data
| Supervisor.TypeErrors data ->
data.errors
|> List.filter (fun ((rangeStart, _), _) ->
trace Debug (fun () -> $"Eval.mapErrors / rangeStart.line:
{rangeStart.line} / lastTopLevelIndex: {lastTopLevelIndex} / allCodeLineLength:
{allCodeLineLength} / filtered: {rangeStart.line > allCodeLineLength}")
getLocals
rangeStart.line > allCodeLineLength
)
|> List.map (fun ((rangeStart, rangeEnd), message) ->
(
severity,
message,
0,
(
(data.uri |> System.IO.Path.GetFileName),
(
(match lastTopLevelIndex with
| Some i when rangeStart.line >= i +
allCodeLineLength + 3 ->
rangeStart.line - allCodeLineLength - 2
| _ -> rangeStart.line - allCodeLineLength),
(match lastTopLevelIndex with
| Some i when rangeStart.line >= i +
allCodeLineLength + 3 ->
rangeStart.character - 4
| _ -> rangeStart.character)
),
(
(match lastTopLevelIndex with
| Some i when rangeStart.line >= i +
allCodeLineLength + 3 ->
rangeEnd.line - allCodeLineLength - 2
| _ -> rangeEnd.line - allCodeLineLength),
(match lastTopLevelIndex with
| Some i when rangeStart.line >= i +
allCodeLineLength + 3 ->
rangeEnd.character - 4
| _ -> rangeEnd.character)
)
)
)
)
)
|> List.collect id
|> List.toArray
── fsharp ──────────────────────────────────────────────────────────────────────
let spiralExDir = Path.GetTempPath () </> "!spiral-ex"
let maxTermCountPath = spiralExDir </> "max_term_count.txt"
let mutable allCode = ""
── fsharp ──────────────────────────────────────────────────────────────────────
let log2 (text : string) =
if traceLevel = TraceLevel.Verbose then
try
let tmpPath = Path.GetTempPath ()
let logDir = Path.Combine (tmpPath, "_log_spiral_kernel")
Directory.CreateDirectory logDir |> ignore
let dateTimeStr = DateTime.Now.ToString "yyyy-MM-dd HH-mm-ss-fff"
let logFile = Path.Combine (logDir,
$"log_{dateTimeStr}_{Random().Next()}.txt")
let dateTimeStr = DateTime.Now.ToString "yyyy-MM-dd HH:mm:ss.fff"
let fileName = "SpiralScriptHelpers"
File.AppendAllText (logFile, $"{dateTimeStr} {fileName}
{text}{Environment.NewLine}") |> ignore
with ex ->
trace Debug (fun () -> $"V.log / ex: {ex |> printException}")
getLocals
── fsharp ──────────────────────────────────────────────────────────────────────
let log (text : string) =
if traceLevel = TraceLevel.Verbose then
try
let tmpPath = Path.GetTempPath ()
let logDir = Path.Combine (tmpPath, "_log_spiral_kernel")
Directory.CreateDirectory logDir |> ignore
let logFile = Path.Combine (logDir, "log.txt")
let dateTimeStr = DateTime.Now.ToString "yyyy-MM-dd HH:mm:ss.fff"
let fileName = "SpiralScriptHelpers"
File.AppendAllText (logFile, $"{dateTimeStr} {fileName}
{text}{Environment.NewLine}") |> ignore
with ex ->
trace Debug (fun () -> $"SpiralScriptHelpers.log / ex: {ex |>
printException}") getLocals
log2 text
── fsharp ──────────────────────────────────────────────────────────────────────
let assemblyName = Reflection.Assembly.GetEntryAssembly().GetName().Name
let inline startTokenRangeWatcher () =
if [[ "dotnet-repl" ]] |> List.contains assemblyName |> not then
let tmpSpiralDir = Path.GetTempPath () </> "!dotnet-interactive-spiral"
let tmpCodeDir = tmpSpiralDir </> "code"
let tmpTokensDir = tmpSpiralDir </> "tokens"
[[ tmpSpiralDir; tmpCodeDir; tmpTokensDir ]]
|> List.iter (fun dir -> if Directory.Exists dir |> not then
Directory.CreateDirectory dir |> ignore)
let stream, disposable = FileSystem.watchDirectory (fun _ -> false)
tmpCodeDir
try
let port = Supervisor.getCompilerPort () + 2
let existingFilesChild =
tmpCodeDir
|> System.IO.Directory.GetFiles
|> Array.map (fun codePath -> async {
try
let tokensPath = tmpTokensDir </> (codePath |>
System.IO.Path.GetFileName)
if File.Exists tokensPath |> not then
let! tokens = codePath |>
Supervisor.getFileTokenRange port None
match tokens with
| Some tokens ->
do!
tokens
|> FSharp.Json.Json.serialize
|> FileSystem.writeAllTextAsync tokensPath
| None ->
log $"Eval.watchDirectory / GetFiles / tokens:
None / {getLocals ()}"
with ex ->
log $"Eval.watchDirectory / GetFiles / ex: {ex |>
printException} / {getLocals ()}"
})
|> Async.Sequential
|> Async.Ignore
let streamAsyncChild =
stream
|> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event)
-> async {
try
let getLocals () = $"ticks: {ticks} / event: {event} /
{getLocals ()}"
match event with
| FileSystem.FileSystemChange.Changed (path, _) ->
let codePath = tmpCodeDir </> path
do!
codePath
|> FileSystem.waitForFileAccess (Some (
System.IO.FileAccess.Read,
System.IO.FileShare.Read
))
|> Async.runWithTimeoutAsync 1000
|> Async.Ignore
let! tokens = codePath |>
Supervisor.getFileTokenRange port None
match tokens with
| Some tokens ->
do!
tokens
|> FSharp.Json.Json.serialize
|> FileSystem.writeAllTextAsync
(tmpTokensDir </> path)
| None ->
log $"Eval.watchDirectory / iterAsyncParallel /
tokens: None / {getLocals ()}"
| _ -> ()
with ex ->
log $"Eval.watchDirectory / iterAsyncParallel / ex: {ex
|> printException} / {getLocals ()}"
})
async {
do! Async.Sleep 3000
existingFilesChild |> Async.StartImmediate
streamAsyncChild |> Async.Start
}
|> Async.Start
with ex ->
log $"Eval / ex: {ex |> printException}"
disposable
else newDisposable (fun () -> ())
── fsharp ──────────────────────────────────────────────────────────────────────
let inline eval
(fsi_eval:
string
-> System.Threading.CancellationToken
-> Choice<'a,Exception> * (TraceLevel * string * int * (string * (int *
int) * (int * int))) array)
(cancellationToken: Option<System.Threading.CancellationToken>)
(code: string)
=
log $"Eval / code: %A{code}"
let rawCellCode =
if code |> String.trim <> "// // trace"
then code |> String.replace "\r\n" "\n"
else
if traceLevel = Info
then traceLevel <- Verbose
else traceLevel <- Info
traceDump <- traceLevel = Verbose
"inl main () = ()"
let lines = rawCellCode |> String.split [[| '\n' |]]
if lines |> Array.exists (fun line -> line |> String.startsWith "#r " &&
line |> String.endsWith "\"") then
let cancellationToken = defaultArg cancellationToken
System.Threading.CancellationToken.None
let ch, errors = fsi_eval code cancellationToken
match ch with
| Choice1Of2 v -> Ok(v), errors
| Choice2Of2 ex -> Error(ex), errors
else
try
let lastBlock =
lines
|> Array.tryFindBack (fun line ->
line |> String.length > 0
&& line.[[0]] <> ' '
)
let hasMain =
lastBlock
|> Option.exists (fun line ->
line |> String.startsWith "inl main "
|| line |> String.startsWith "let main "
)
let cellCode, lastTopLevelIndex =
if hasMain
then rawCellCode, None
else
let lastTopLevelIndex, _ =
(lines |> Array.indexed, (None, false))
||> Array.foldBack (fun (i, line) (lastTopLevelIndex,
finished) ->
trace Debug (fun () -> $"i: {i} / line: '{line}' /
lastTopLevelIndex: {lastTopLevelIndex} / finished: {finished}") getLocals
match line with
| _ when finished -> lastTopLevelIndex, true
| "" -> lastTopLevelIndex, false
| line when
line |> String.startsWith " "
|| line |> String.startsWith "// " ->
lastTopLevelIndex, false
| line when
line |> String.startsWith "open "
|| line |> String.startsWith "prototype "
|| line |> String.startsWith "instance "
|| line |> String.startsWith "type "
|| line |> String.startsWith "union "
|| line |> String.startsWith "nominal " ->
lastTopLevelIndex, true
| line when
line |> String.startsWith "inl "
|| line |> String.startsWith "let " ->
let m =
System.Text.RegularExpressions.Regex.Match (
line,
@"^(inl|let) +([[~\(\w]][[\w\d']]*(?:|
*[[~\w]][[\w\d']]*\)|, *[[~\w]][[\w\d']]*)) +[[:=]]"
)
trace Debug (fun () -> $"m: '{m}' /
m.Groups.Count: {m.Groups.Count}") getLocals
if m.Groups.Count = 3
then Some i, false
else lastTopLevelIndex, true
| _ -> Some i, false
)
let code =
match lastTopLevelIndex with
| Some lastTopLevelIndex ->
lines
|> Array.mapi (fun i line ->
match i with
| i when i < lastTopLevelIndex -> line
| i when i = lastTopLevelIndex -> $"\nlet main
() =\n {line}"
| _ when line |> String.trim = "" -> ""
| _ -> $" {line}"
)
|> String.concat "\n"
| None -> $"{rawCellCode}\n\ninl main () = ()\n"
code, lastTopLevelIndex
let newAllCode = $"{allCode}\n\n{cellCode}"
let rustArgs =
lines
|> Array.tryPick (fun line ->
if line |> String.startsWith "// // rust="
then line |> String.split [[| '=' |]] |> Array.tryItem 1
else None
)
let timeout =
lines
|> Array.tryPick (fun line ->
if line |> String.startsWith "// // timeout="
then line |> String.split [[| '=' |]] |> Array.tryItem 1 |>
Option.map int
else None
)
|> Option.defaultValue (60000 * 60)
let printCode =
lines
|> Array.tryPick (fun line ->
if line |> String.startsWith "// // print_code="
then line |> String.split [[| '=' |]] |> Array.tryItem 1 |>
Option.map ((=) "true")
else None
)
|> Option.defaultValue true
let maxTermCount =
lines
|> Array.tryPick (fun line ->
if line |> String.startsWith "// // max_term_count="
then line |> String.split [[| '=' |]] |> Array.tryItem 1 |>
Option.map int
else None
)
async {
try
let! mainPath, disposable = newAllCode |>
Supervisor.persistCode
use _ = disposable
match maxTermCount with
| Some maxTermCount ->
do! maxTermCount |> string |>
FileSystem.writeAllTextAsync maxTermCountPath
| None -> ()
let port = Supervisor.getCompilerPort ()
let! codeChoice =
mainPath
|> Supervisor.buildFile timeout port cancellationToken
|> Async.catch
|> Async.runWithTimeoutAsync timeout
match maxTermCount with
| Some _ -> do! FileSystem.deleteFileAsync maxTermCountPath
|> Async.Ignore
| None -> ()
let code =
match codeChoice with
| Some (Ok code) -> Some code
| Some (Error ex) ->
log $"Eval / errors: {ex |> printException}"
None
| _ -> None
match code with
| Some (Some code, spiralErrors) ->
let spiralErrors =
mapErrors (Warning, spiralErrors, lastTopLevelIndex)
allCode
let inline _trace (fn : unit -> string) =
if traceLevel = Info
then fn () |> System.Console.WriteLine
else trace Info (fun () ->
$"SpiralScriptHelpers.Eval / {fn ()}") getLocals
if printCode
then _trace (fun () -> if rustArgs |> Option.isSome then
$"\n.fsx:\n{code}" else code)
let! rustResult =
if rustArgs |> Option.isNone || lastTopLevelIndex =
None
then None |> Async.init
else
async {
// let hash = $"repl_{code |>
Crypto.hashText}"
let hash = $"spiral_eval"
let! fsprojPath = code |>
Builder.persistCodeProject [["Fable.Core"]] [[]] hash
let projectDir = fsprojPath |>
Path.GetDirectoryName
let outDir = projectDir </> $"target/{hash}"
let libLinkTargetPath = projectDir </>
"target/fable-library-rust"
let libLinkPath = outDir </>
$"fable_modules/fable-library-rust"
if Directory.Exists libLinkTargetPath |> not
then libLinkTargetPath |>
Directory.CreateDirectory |> ignore
libLinkPath |> Path.GetDirectoryName |>
Directory.CreateDirectory |> ignore
let libLinkPathInfo = DirectoryInfo
libLinkPath
if libLinkPathInfo.Exists &&
libLinkPathInfo.LinkTarget = null then
Directory.Delete (libLinkPath, true)
if libLinkPath |> Directory.Exists |> not
then
Directory.CreateSymbolicLink
(libLinkPath, libLinkTargetPath)
|> ignore
let! exitCode, result =
Runtime.executeWithOptionsAsync
{
Command = $@"dotnet fable
{fsprojPath} --optimize --lang rs --extension .rs --outDir {outDir}"
CancellationToken =
cancellationToken
WorkingDirectory = None
OnLine = None
}
if exitCode <> 0
then return Some (Error result)
else
let rsPath = outDir </> $"{hash}.rs"
let! rsCode = rsPath |>
FileSystem.readAllTextAsync
let mainCode = "pub fn main() ->
Result<(), String> { Ok(()) }"
let cached = rsCode |> String.contains
mainCode
let rsCode =
if cached
then rsCode
else rsCode |> String.replace "),);"
"));"
if printCode
then _trace (fun () ->
$".rs:\n{rsCode}")
if not cached
then do!
$"{rsCode}\n\n{mainCode}\n"
|> FileSystem.writeAllTextAsync
rsPath
let cargoTomlPath = outDir </>
$"Cargo.toml"
let cargoTomlContent = $"""[[package]]
name = "{hash}"
version = "0.0.1"
edition = "2021"
[[workspace]]
[[dependencies]]
fable_library_rust = {{ path = "fable_modules/fable-library-rust", optional =
true, default-features = false }}
clap = {{}}
num-complex = {{}}
pyo3 = "~0.21.0-beta.0"
[[features]]
default = [["fable_library_rust/default",
"fable_library_rust/static_do_bindings"]]
[[[[bin]]]]
name = "{hash}"
path = "{hash}.rs"
"""
do! cargoTomlContent |>
FileSystem.writeAllTextExists cargoTomlPath
let! exitCode, result =
Runtime.executeWithOptionsAsync
{
Command = $@"cargo run
--release --manifest-path {cargoTomlPath}"
CancellationToken =
cancellationToken
WorkingDirectory = None
OnLine = None
}
if exitCode = 0 then
try
let result =
result
|> String.split [[| '\n' |]]
|> Array.skipWhile (fun line
->
line |> String.contains
@"[[optimized]] target" |> not
)
|> Array.skip 2
|> String.concat "\n"
return Some (Ok result)
with ex ->
return $"ex:
{ex}\nresult:\n{result}" |> Error |> Some
else
return Some (Error result)
}
let cancellationToken = defaultArg cancellationToken
System.Threading.CancellationToken.None
let fsxResult =
if rustArgs |> Option.isSome
then None
else
try
let ch, errors = fsi_eval code
cancellationToken
let errors =
errors
|> Array.map (fun (e1, e2, e3, _) ->
(e1, e2, e3, ("", (0, 0), (0, 0)))
)
Some (ch, errors)
with ex ->
trace Critical (fun () ->
$"SpiralScriptHelpers.Eval / ex: {ex |> printException}") getLocals
None
match fsxResult, rustResult with
| Some (ch, errors), None ->
let errors = errors |> Array.append spiralErrors
match ch with
| Choice1Of2 v ->
allCode <- newAllCode
return Ok(v), errors
| Choice2Of2 ex -> return Error ex, errors
| _, Some result ->
let result, errors =
match result with
| Ok result -> result, [[||]]
| Error error ->
"",
[[|
(
TraceLevel.Critical, error, 0, ("",
(0, 0), (0, 0))
)
|]]
let header = if printCode then ".rs output:\n" else
""
let ch, errors2 = fsi_eval
$"\"\"\"{header}{result}\n\"\"\"" cancellationToken
let errors =
errors
|> Array.append spiralErrors
|> Array.append errors2
match ch with
| Choice1Of2 v ->
allCode <- newAllCode
return Ok(v), errors
| Choice2Of2 ex ->
return Error ex, errors
| _ ->
let ch, errors = fsi_eval "()" cancellationToken
match ch with
| Choice1Of2 v ->
allCode <- newAllCode
return Ok(v), errors
| Choice2Of2 ex ->
return Error ex, errors
| Some (None, errors) when errors |> List.isEmpty |> not ->
return errors.[[0]] |> fst |> Exception |> Error,
mapErrors (TraceLevel.Critical, errors,
lastTopLevelIndex) allCode
| _ ->
return Error (Exception "Spiral error or timeout"),
[[|
(
TraceLevel.Critical, "Diag: Spiral error or
timeout", 0, ("", (0, 0), (0, 0))
)
|]]
with ex ->
log $"Eval / ex: {ex |> printException}"
return Error (Exception $"Spiral error or timeout (4_) / ex:
{ex |> printException}"),
[[|
(
TraceLevel.Critical, $"Diag: Spiral error or timeout
(4) / ex: {ex |> printException}", 0, ("", (0, 0), (0, 0))
)
|]]
}
|> Async.runWithTimeoutStrict timeout
|> Option.defaultValue (
Error (Exception "Spiral error or timeout (2)"),
[[|
(
TraceLevel.Critical, "Diag: Spiral error or timeout
(2)", 0, ("", (0, 0), (0, 0))
)
|]]
)
with ex ->
log $"Eval / ex: {ex |> printException}"
Error (Exception $"Spiral error or timeout (3) / ex: {ex |>
printException}"),
[[|
(
TraceLevel.Critical, $"Diag: Spiral error or timeout (3) /
ex: {ex |> printException}", 0, ("", (0, 0), (0, 0))
)
|]]
[NbConvertApp] Converting notebook Eval.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 373066 bytes to Eval.dib.html
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Eval.dib
00:00:00 #2 [Debug] parseDibCode / output: Fs / file: Eval.dib
In [ ]:
{ . "$ScriptDir/../apps/scheduler/build.ps1" } | Invoke-Block
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 Tasks.dib -Retries 3""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ ## Tasks (Polyglot) │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.08s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > inl types () =
00:00:06 #22 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::string::String\")>]]
00:00:06 #23 [Verbose] > type std_string_String = class end"
00:00:06 #24 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"&$0\")>]] type Ref<'T> =
00:00:06 #25 [Verbose] > class end"
00:00:06 #26 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"str\")>]] type Str = class
00:00:06 #27 [Verbose] > end"
00:00:06 #28 [Verbose] >
00:00:06 #29 [Verbose] > inl emit_expr forall a t. (args : a) (code : string) : t =
00:00:06 #30 [Verbose] > real
00:00:06 #31 [Verbose] > $"Fable.Core.RustInterop.emitRustExpr !args !code" : t
00:00:06 #32 [Verbose] >
00:00:06 #33 [Verbose] >
00:00:06 #34 [Verbose] > nominal std_string = $"std_string_String"
00:00:06 #35 [Verbose] > nominal ref' t = $"Ref<`t>"
00:00:06 #36 [Verbose] > nominal str = $"Str"
00:00:06 #37 [Verbose] >
00:00:06 #38 [Verbose] > inl format_debug forall t. (x : t) : std_string =
00:00:06 #39 [Verbose] > real
00:00:06 #40 [Verbose] > emit_expr `t `std_string x "format!(\"{:?}\", $0)"
00:00:06 #41 [Verbose] >
00:00:06 #42 [Verbose] > inl format_pretty forall t. (x : t) : std_string =
00:00:06 #43 [Verbose] > real
00:00:06 #44 [Verbose] > emit_expr `t `std_string x "format!(\"{:#?}\", $0)"
00:00:06 #45 [Verbose] >
00:00:06 #46 [Verbose] > inl to_std_string (str : ref' str) : std_string =
00:00:06 #47 [Verbose] > // inl str = join str
00:00:06 #48 [Verbose] > // // emit_expr () $"\"!str.to_string()\""
00:00:06 #49 [Verbose] > // // emit_expr () $"\"alloc::string::to_string(!str)\""
00:00:06 #50 [Verbose] > // emit_expr str "($0).to_string()"
00:00:06 #51 [Verbose] > emit_expr str $"\"String::from(core::ops::Deref::deref($0))\""
00:00:06 #52 [Verbose] > // emit_expr str $"\"String::from(*$0)\""
00:00:06 #53 [Verbose] > // emit_expr () $"\"String::from(!str)\""
00:00:06 #54 [Verbose] >
00:00:06 #55 [Verbose] > inl format forall t. (x : t) : std_string =
00:00:06 #56 [Verbose] > real
00:00:06 #57 [Verbose] > inl result : std_string =
00:00:06 #58 [Verbose] > typecase t with
00:00:06 #59 [Verbose] > | string => to_std_string x
00:00:06 #60 [Verbose] > | std_string => x
00:00:06 #61 [Verbose] > | _ => format_pretty `t x
00:00:06 #62 [Verbose] > result
00:00:06 #63 [Verbose] >
00:00:06 #64 [Verbose] > inl raw_string_literal (s : string) : ref' str =
00:00:06 #65 [Verbose] > emit_expr () $"\"r#\\\"\" + !s + \"\\\"#\""
00:00:06 #66 [Verbose] >
00:00:06 #67 [Verbose] > inl (~#) (s : string) : ref' str =
00:00:06 #68 [Verbose] > raw_string_literal s
00:00:07 #69 [Verbose] >
00:00:07 #70 [Verbose] > ╭─[ 260.02ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #71 [Verbose] > │ () │
00:00:07 #72 [Verbose] > │ │
00:00:07 #73 [Verbose] > │ │
00:00:07 #74 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #75 [Verbose] >
00:00:07 #76 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #77 [Verbose] > nominal task_name = string
00:00:07 #78 [Verbose] >
00:00:07 #79 [Verbose] > union manual_scheduling =
00:00:07 #80 [Verbose] > | WithSuggestion
00:00:07 #81 [Verbose] > | WithoutSuggestion
00:00:07 #82 [Verbose] >
00:00:07 #83 [Verbose] > union recurrency_offset =
00:00:07 #84 [Verbose] > | Days : i32
00:00:07 #85 [Verbose] > | Weeks : i32
00:00:07 #86 [Verbose] > | Months : i32
00:00:07 #87 [Verbose] >
00:00:07 #88 [Verbose] > union day_of_week =
00:00:07 #89 [Verbose] > | Sunday
00:00:07 #90 [Verbose] > | Monday
00:00:07 #91 [Verbose] > | Tuesday
00:00:07 #92 [Verbose] > | Wednesday
00:00:07 #93 [Verbose] > | Thursday
00:00:07 #94 [Verbose] > | Friday
00:00:07 #95 [Verbose] > | Saturday
00:00:07 #96 [Verbose] >
00:00:07 #97 [Verbose] > union month =
00:00:07 #98 [Verbose] > | January
00:00:07 #99 [Verbose] > | February
00:00:07 #100 [Verbose] > | March
00:00:07 #101 [Verbose] > | April
00:00:07 #102 [Verbose] > | May
00:00:07 #103 [Verbose] > | June
00:00:07 #104 [Verbose] > | July
00:00:07 #105 [Verbose] > | August
00:00:07 #106 [Verbose] > | September
00:00:07 #107 [Verbose] > | October
00:00:07 #108 [Verbose] > | November
00:00:07 #109 [Verbose] > | December
00:00:07 #110 [Verbose] >
00:00:07 #111 [Verbose] > nominal day = i32
00:00:07 #112 [Verbose] > nominal year = i32
00:00:07 #113 [Verbose] >
00:00:07 #114 [Verbose] > union fixed_recurrency =
00:00:07 #115 [Verbose] > | Weekly : day_of_week
00:00:07 #116 [Verbose] > | Monthly : day
00:00:07 #117 [Verbose] > | Yearly : day * month
00:00:07 #118 [Verbose] >
00:00:07 #119 [Verbose] > union recurrency =
00:00:07 #120 [Verbose] > | Offset : recurrency_offset
00:00:07 #121 [Verbose] > | Fixed : list fixed_recurrency
00:00:07 #122 [Verbose] >
00:00:07 #123 [Verbose] > union scheduling =
00:00:07 #124 [Verbose] > | Manual : manual_scheduling
00:00:07 #125 [Verbose] > | Recurrent : recurrency
00:00:07 #126 [Verbose] >
00:00:07 #127 [Verbose] > type task =
00:00:07 #128 [Verbose] > {
00:00:07 #129 [Verbose] > name : task_name
00:00:07 #130 [Verbose] > scheduling : scheduling
00:00:07 #131 [Verbose] > }
00:00:07 #132 [Verbose] >
00:00:07 #133 [Verbose] > type date =
00:00:07 #134 [Verbose] > {
00:00:07 #135 [Verbose] > year : year
00:00:07 #136 [Verbose] > month : month
00:00:07 #137 [Verbose] > day : day
00:00:07 #138 [Verbose] > }
00:00:07 #139 [Verbose] >
00:00:07 #140 [Verbose] > union status =
00:00:07 #141 [Verbose] > | Postponed : option ()
00:00:07 #142 [Verbose] >
00:00:07 #143 [Verbose] > type event =
00:00:07 #144 [Verbose] > {
00:00:07 #145 [Verbose] > date : date
00:00:07 #146 [Verbose] > status : status
00:00:07 #147 [Verbose] > }
00:00:07 #148 [Verbose] >
00:00:07 #149 [Verbose] > type task_template =
00:00:07 #150 [Verbose] > {
00:00:07 #151 [Verbose] > task : task
00:00:07 #152 [Verbose] > events : list event
00:00:07 #153 [Verbose] > }
00:00:07 #154 [Verbose] >
00:00:07 #155 [Verbose] > ╭─[ 241.92ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #156 [Verbose] > │ () │
00:00:07 #157 [Verbose] > │ │
00:00:07 #158 [Verbose] > │ │
00:00:07 #159 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #160 [Verbose] >
00:00:07 #161 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #162 [Verbose] > // // test
00:00:07 #163 [Verbose] > // // rust=
00:00:07 #164 [Verbose] >
00:00:07 #165 [Verbose] > types ()
00:00:14 #166 [Verbose] >
00:00:14 #167 [Verbose] > ╭─[ 6.88s - return value ]─────────────────────────────────────────────────────╮
00:00:14 #168 [Verbose] > │ .rs output: │
00:00:14 #169 [Verbose] > │ │
00:00:14 #170 [Verbose] > │ │
00:00:14 #171 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #172 [Verbose] >
00:00:14 #173 [Verbose] > ╭─[ 6.89s - stdout ]───────────────────────────────────────────────────────────╮
00:00:14 #174 [Verbose] > │ │
00:00:14 #175 [Verbose] > │ .fsx: │
00:00:14 #176 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type │
00:00:14 #177 [Verbose] > │ std_string_String = class end │
00:00:14 #178 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end │
00:00:14 #179 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end │
00:00:14 #180 [Verbose] > │ let rec method0 () : unit = │
00:00:14 #181 [Verbose] > │ () │
00:00:14 #182 [Verbose] > │ method0() │
00:00:14 #183 [Verbose] > │ │
00:00:14 #184 [Verbose] > │ .rs: │
00:00:14 #185 [Verbose] > │ #![allow(dead_code,)] │
00:00:14 #186 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:14 #187 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:14 #188 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:14 #189 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:14 #190 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:14 #191 [Verbose] > │ #![allow(unused_imports,)] │
00:00:14 #192 [Verbose] > │ #![allow(unused_macros,)] │
00:00:14 #193 [Verbose] > │ #![allow(unused_parens,)] │
00:00:14 #194 [Verbose] > │ #![allow(unused_variables,)] │
00:00:14 #195 [Verbose] > │ mod module_ccfa04bf { │
00:00:14 #196 [Verbose] > │ pub mod Spiral_eval { │
00:00:14 #197 [Verbose] > │ use super::*; │
00:00:14 #198 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:14 #199 [Verbose] > │ pub fn method0() { (); } │
00:00:14 #200 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:14 #201 [Verbose] > │ } │
00:00:14 #202 [Verbose] > │ } │
00:00:14 #203 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:14 #204 [Verbose] > │ │
00:00:14 #205 [Verbose] > │ │
00:00:14 #206 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #207 [Verbose] >
00:00:14 #208 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #209 [Verbose] > // // test
00:00:14 #210 [Verbose] > // // rust=
00:00:14 #211 [Verbose] >
00:00:14 #212 [Verbose] > inl get_tasks () : list task_template =
00:00:14 #213 [Verbose] > [[
00:00:14 #214 [Verbose] > {
00:00:14 #215 [Verbose] > task =
00:00:14 #216 [Verbose] > {
00:00:14 #217 [Verbose] > name = task_name "01"
00:00:14 #218 [Verbose] > scheduling = Manual WithSuggestion
00:00:14 #219 [Verbose] > }
00:00:14 #220 [Verbose] > events = [[]]
00:00:14 #221 [Verbose] > }
00:00:14 #222 [Verbose] > {
00:00:14 #223 [Verbose] > task =
00:00:14 #224 [Verbose] > {
00:00:14 #225 [Verbose] > name = task_name "02"
00:00:14 #226 [Verbose] > scheduling = Manual WithSuggestion
00:00:14 #227 [Verbose] > }
00:00:14 #228 [Verbose] > events = [[]]
00:00:14 #229 [Verbose] > }
00:00:14 #230 [Verbose] > {
00:00:14 #231 [Verbose] > task =
00:00:14 #232 [Verbose] > {
00:00:14 #233 [Verbose] > name = task_name "03"
00:00:14 #234 [Verbose] > scheduling = Manual WithSuggestion
00:00:14 #235 [Verbose] > }
00:00:14 #236 [Verbose] > events = [[]]
00:00:14 #237 [Verbose] > }
00:00:14 #238 [Verbose] > ]]
00:00:14 #239 [Verbose] >
00:00:14 #240 [Verbose] > types ()
00:00:14 #241 [Verbose] > get_tasks () |> format_pretty |> console.write_line
00:00:20 #242 [Verbose] >
00:00:20 #243 [Verbose] > ╭─[ 5.86s - return value ]─────────────────────────────────────────────────────╮
00:00:20 #244 [Verbose] > │ .rs output: │
00:00:20 #245 [Verbose] > │ UH2_0( │
00:00:20 #246 [Verbose] > │ UH0_1, │
00:00:20 #247 [Verbose] > │ "01", │
00:00:20 #248 [Verbose] > │ US4_0( │
00:00:20 #249 [Verbose] > │ US3_0, │
00:00:20 #250 [Verbose] > │ ), │
00:00:20 #251 [Verbose] > │ UH2_0( │
00:00:20 #252 [Verbose] > │ UH0_1, │
00:00:20 #253 [Verbose] > │ "02", │
00:00:20 #254 [Verbose] > │ US4_0( │
00:00:20 #255 [Verbose] > │ US3_0, │
00:00:20 #256 [Verbose] > │ ), │
00:00:20 #257 [Verbose] > │ UH2_0( │
00:00:20 #258 [Verbose] > │ UH0_1, │
00:00:20 #259 [Verbose] > │ "03", │
00:00:20 #260 [Verbose] > │ US4_0( │
00:00:20 #261 [Verbose] > │ US3_0, │
00:00:20 #262 [Verbose] > │ ), │
00:00:20 #263 [Verbose] > │ UH2_1, │
00:00:20 #264 [Verbose] > │ ), │
00:00:20 #265 [Verbose] > │ ), │
00:00:20 #266 [Verbose] > │ ) │
00:00:20 #267 [Verbose] > │ │
00:00:20 #268 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #269 [Verbose] >
00:00:20 #270 [Verbose] > ╭─[ 5.88s - stdout ]───────────────────────────────────────────────────────────╮
00:00:20 #271 [Verbose] > │ │
00:00:20 #272 [Verbose] > │ .fsx: │
00:00:20 #273 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type │
00:00:20 #274 [Verbose] > │ std_string_String = class end │
00:00:20 #275 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end │
00:00:20 #276 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end │
00:00:20 #277 [Verbose] > │ type [<Struct>] US0 = │
00:00:20 #278 [Verbose] > │ | US0_0 │
00:00:20 #279 [Verbose] > │ | US0_1 │
00:00:20 #280 [Verbose] > │ | US0_2 │
00:00:20 #281 [Verbose] > │ | US0_3 │
00:00:20 #282 [Verbose] > │ | US0_4 │
00:00:20 #283 [Verbose] > │ | US0_5 │
00:00:20 #284 [Verbose] > │ | US0_6 │
00:00:20 #285 [Verbose] > │ | US0_7 │
00:00:20 #286 [Verbose] > │ | US0_8 │
00:00:20 #287 [Verbose] > │ | US0_9 │
00:00:20 #288 [Verbose] > │ | US0_10 │
00:00:20 #289 [Verbose] > │ | US0_11 │
00:00:20 #290 [Verbose] > │ and [<Struct>] US2 = │
00:00:20 #291 [Verbose] > │ | US2_0 │
00:00:20 #292 [Verbose] > │ | US2_1 │
00:00:20 #293 [Verbose] > │ and [<Struct>] US1 = │
00:00:20 #294 [Verbose] > │ | US1_0 of f0_0 : US2 │
00:00:20 #295 [Verbose] > │ and UH0 = │
00:00:20 #296 [Verbose] > │ | UH0_0 of int32 * US0 * int32 * US1 * UH0 │
00:00:20 #297 [Verbose] > │ | UH0_1 │
00:00:20 #298 [Verbose] > │ and [<Struct>] US3 = │
00:00:20 #299 [Verbose] > │ | US3_0 │
00:00:20 #300 [Verbose] > │ | US3_1 │
00:00:20 #301 [Verbose] > │ and [<Struct>] US7 = │
00:00:20 #302 [Verbose] > │ | US7_0 │
00:00:20 #303 [Verbose] > │ | US7_1 │
00:00:20 #304 [Verbose] > │ | US7_2 │
00:00:20 #305 [Verbose] > │ | US7_3 │
00:00:20 #306 [Verbose] > │ | US7_4 │
00:00:20 #307 [Verbose] > │ | US7_5 │
00:00:20 #308 [Verbose] > │ | US7_6 │
00:00:20 #309 [Verbose] > │ and [<Struct>] US6 = │
00:00:20 #310 [Verbose] > │ | US6_0 of f0_0 : int32 │
00:00:20 #311 [Verbose] > │ | US6_1 of f1_0 : US7 │
00:00:20 #312 [Verbose] > │ | US6_2 of f2_0 : int32 * f2_1 : US0 │
00:00:20 #313 [Verbose] > │ and UH1 = │
00:00:20 #314 [Verbose] > │ | UH1_0 of US6 * UH1 │
00:00:20 #315 [Verbose] > │ | UH1_1 │
00:00:20 #316 [Verbose] > │ and [<Struct>] US8 = │
00:00:20 #317 [Verbose] > │ | US8_0 of f0_0 : int32 │
00:00:20 #318 [Verbose] > │ | US8_1 of f1_0 : int32 │
00:00:20 #319 [Verbose] > │ | US8_2 of f2_0 : int32 │
00:00:20 #320 [Verbose] > │ and [<Struct>] US5 = │
00:00:20 #321 [Verbose] > │ | US5_0 of f0_0 : UH1 │
00:00:20 #322 [Verbose] > │ | US5_1 of f1_0 : US8 │
00:00:20 #323 [Verbose] > │ and [<Struct>] US4 = │
00:00:20 #324 [Verbose] > │ | US4_0 of f0_0 : US3 │
00:00:20 #325 [Verbose] > │ | US4_1 of f1_0 : US5 │
00:00:20 #326 [Verbose] > │ and UH2 = │
00:00:20 #327 [Verbose] > │ | UH2_0 of UH0 * string * US4 * UH2 │
00:00:20 #328 [Verbose] > │ | UH2_1 │
00:00:20 #329 [Verbose] > │ let rec method0 () : unit = │
00:00:20 #330 [Verbose] > │ let v0 : UH0 = UH0_1 │
00:00:20 #331 [Verbose] > │ let v1 : string = "01" │
00:00:20 #332 [Verbose] > │ let v2 : US3 = US3_0 │
00:00:20 #333 [Verbose] > │ let v3 : US4 = US4_0(v2) │
00:00:20 #334 [Verbose] > │ let v4 : UH0 = UH0_1 │
00:00:20 #335 [Verbose] > │ let v5 : string = "02" │
00:00:20 #336 [Verbose] > │ let v6 : US3 = US3_0 │
00:00:20 #337 [Verbose] > │ let v7 : US4 = US4_0(v6) │
00:00:20 #338 [Verbose] > │ let v8 : UH0 = UH0_1 │
00:00:20 #339 [Verbose] > │ let v9 : string = "03" │
00:00:20 #340 [Verbose] > │ let v10 : US3 = US3_0 │
00:00:20 #341 [Verbose] > │ let v11 : US4 = US4_0(v10) │
00:00:20 #342 [Verbose] > │ let v12 : UH2 = UH2_1 │
00:00:20 #343 [Verbose] > │ let v13 : UH2 = UH2_0(v8, v9, v11, v12) │
00:00:20 #344 [Verbose] > │ let v14 : UH2 = UH2_0(v4, v5, v7, v13) │
00:00:20 #345 [Verbose] > │ let v15 : UH2 = UH2_0(v0, v1, v3, v14) │
00:00:20 #346 [Verbose] > │ let v16 : string = "format!(\"{:#?}\", $0)" │
00:00:20 #347 [Verbose] > │ let v17 : std_string_String = Fable.Core.RustInterop.emitRustExpr v15 │
00:00:20 #348 [Verbose] > │ v16 │
00:00:20 #349 [Verbose] > │ System.Console.WriteLine v17 │
00:00:20 #350 [Verbose] > │ () │
00:00:20 #351 [Verbose] > │ method0() │
00:00:20 #352 [Verbose] > │ │
00:00:20 #353 [Verbose] > │ .rs: │
00:00:20 #354 [Verbose] > │ #![allow(dead_code,)] │
00:00:20 #355 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:20 #356 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:20 #357 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:20 #358 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:20 #359 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:20 #360 [Verbose] > │ #![allow(unused_imports,)] │
00:00:20 #361 [Verbose] > │ #![allow(unused_macros,)] │
00:00:20 #362 [Verbose] > │ #![allow(unused_parens,)] │
00:00:20 #363 [Verbose] > │ #![allow(unused_variables,)] │
00:00:20 #364 [Verbose] > │ mod module_ccfa04bf { │
00:00:20 #365 [Verbose] > │ pub mod Spiral_eval { │
00:00:20 #366 [Verbose] > │ use super::*; │
00:00:20 #367 [Verbose] > │ use fable_library_rust::Native_::LrcPtr; │
00:00:20 #368 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:20 #369 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:20 #370 [Verbose] > │ use fable_library_rust::String_::printfn; │
00:00:20 #371 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:20 #372 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #373 [Verbose] > │ pub enum US0 { │
00:00:20 #374 [Verbose] > │ US0_0, │
00:00:20 #375 [Verbose] > │ US0_1, │
00:00:20 #376 [Verbose] > │ US0_2, │
00:00:20 #377 [Verbose] > │ US0_3, │
00:00:20 #378 [Verbose] > │ US0_4, │
00:00:20 #379 [Verbose] > │ US0_5, │
00:00:20 #380 [Verbose] > │ US0_6, │
00:00:20 #381 [Verbose] > │ US0_7, │
00:00:20 #382 [Verbose] > │ US0_8, │
00:00:20 #383 [Verbose] > │ US0_9, │
00:00:20 #384 [Verbose] > │ US0_10, │
00:00:20 #385 [Verbose] > │ US0_11, │
00:00:20 #386 [Verbose] > │ } │
00:00:20 #387 [Verbose] > │ impl Spiral_eval::US0 { │
00:00:20 #388 [Verbose] > │ pub fn get_IsUS0_0(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #389 [Verbose] > │ ()) │
00:00:20 #390 [Verbose] > │ -> bool { │
00:00:20 #391 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #392 [Verbose] > │ } │
00:00:20 #393 [Verbose] > │ pub fn get_IsUS0_1(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #394 [Verbose] > │ ()) │
00:00:20 #395 [Verbose] > │ -> bool { │
00:00:20 #396 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #397 [Verbose] > │ } │
00:00:20 #398 [Verbose] > │ pub fn get_IsUS0_2(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #399 [Verbose] > │ ()) │
00:00:20 #400 [Verbose] > │ -> bool { │
00:00:20 #401 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #402 [Verbose] > │ } │
00:00:20 #403 [Verbose] > │ pub fn get_IsUS0_3(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #404 [Verbose] > │ ()) │
00:00:20 #405 [Verbose] > │ -> bool { │
00:00:20 #406 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #407 [Verbose] > │ } │
00:00:20 #408 [Verbose] > │ pub fn get_IsUS0_4(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #409 [Verbose] > │ ()) │
00:00:20 #410 [Verbose] > │ -> bool { │
00:00:20 #411 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #412 [Verbose] > │ } │
00:00:20 #413 [Verbose] > │ pub fn get_IsUS0_5(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #414 [Verbose] > │ ()) │
00:00:20 #415 [Verbose] > │ -> bool { │
00:00:20 #416 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #417 [Verbose] > │ } │
00:00:20 #418 [Verbose] > │ pub fn get_IsUS0_6(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #419 [Verbose] > │ ()) │
00:00:20 #420 [Verbose] > │ -> bool { │
00:00:20 #421 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #422 [Verbose] > │ } │
00:00:20 #423 [Verbose] > │ pub fn get_IsUS0_7(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #424 [Verbose] > │ ()) │
00:00:20 #425 [Verbose] > │ -> bool { │
00:00:20 #426 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #427 [Verbose] > │ } │
00:00:20 #428 [Verbose] > │ pub fn get_IsUS0_8(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #429 [Verbose] > │ ()) │
00:00:20 #430 [Verbose] > │ -> bool { │
00:00:20 #431 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #432 [Verbose] > │ } │
00:00:20 #433 [Verbose] > │ pub fn get_IsUS0_9(this_: &MutCell<Spiral_eval::US0>, unitArg: │
00:00:20 #434 [Verbose] > │ ()) │
00:00:20 #435 [Verbose] > │ -> bool { │
00:00:20 #436 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #437 [Verbose] > │ } │
00:00:20 #438 [Verbose] > │ pub fn get_IsUS0_10(this_: &MutCell<Spiral_eval::US0>, │
00:00:20 #439 [Verbose] > │ unitArg: ()) -> bool { │
00:00:20 #440 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #441 [Verbose] > │ } │
00:00:20 #442 [Verbose] > │ pub fn get_IsUS0_11(this_: &MutCell<Spiral_eval::US0>, │
00:00:20 #443 [Verbose] > │ unitArg: ()) -> bool { │
00:00:20 #444 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #445 [Verbose] > │ } │
00:00:20 #446 [Verbose] > │ } │
00:00:20 #447 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US0 { │
00:00:20 #448 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #449 [Verbose] > │ { │
00:00:20 #450 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #451 [Verbose] > │ } │
00:00:20 #452 [Verbose] > │ } │
00:00:20 #453 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #454 [Verbose] > │ pub enum US2 { US2_0, US2_1, } │
00:00:20 #455 [Verbose] > │ impl Spiral_eval::US2 { │
00:00:20 #456 [Verbose] > │ pub fn get_IsUS2_0(this_: &MutCell<Spiral_eval::US2>, unitArg: │
00:00:20 #457 [Verbose] > │ ()) │
00:00:20 #458 [Verbose] > │ -> bool { │
00:00:20 #459 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #460 [Verbose] > │ } │
00:00:20 #461 [Verbose] > │ pub fn get_IsUS2_1(this_: &MutCell<Spiral_eval::US2>, unitArg: │
00:00:20 #462 [Verbose] > │ ()) │
00:00:20 #463 [Verbose] > │ -> bool { │
00:00:20 #464 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #465 [Verbose] > │ } │
00:00:20 #466 [Verbose] > │ } │
00:00:20 #467 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US2 { │
00:00:20 #468 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #469 [Verbose] > │ { │
00:00:20 #470 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #471 [Verbose] > │ } │
00:00:20 #472 [Verbose] > │ } │
00:00:20 #473 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #474 [Verbose] > │ pub enum US1 { US1_0(Spiral_eval::US2), } │
00:00:20 #475 [Verbose] > │ impl Spiral_eval::US1 { │
00:00:20 #476 [Verbose] > │ pub fn get_IsUS1_0(this_: &MutCell<Spiral_eval::US1>, unitArg: │
00:00:20 #477 [Verbose] > │ ()) │
00:00:20 #478 [Verbose] > │ -> bool { │
00:00:20 #479 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #480 [Verbose] > │ } │
00:00:20 #481 [Verbose] > │ } │
00:00:20 #482 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US1 { │
00:00:20 #483 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #484 [Verbose] > │ { │
00:00:20 #485 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #486 [Verbose] > │ } │
00:00:20 #487 [Verbose] > │ } │
00:00:20 #488 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #489 [Verbose] > │ pub enum UH0 { │
00:00:20 #490 [Verbose] > │ UH0_0(i32, Spiral_eval::US0, i32, Spiral_eval::US1, │
00:00:20 #491 [Verbose] > │ LrcPtr<Spiral_eval::UH0>), │
00:00:20 #492 [Verbose] > │ UH0_1, │
00:00:20 #493 [Verbose] > │ } │
00:00:20 #494 [Verbose] > │ impl Spiral_eval::UH0 { │
00:00:20 #495 [Verbose] > │ pub fn get_IsUH0_0(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:20 #496 [Verbose] > │ -> bool { │
00:00:20 #497 [Verbose] > │ if let Spiral_eval::UH0::UH0_0(this__0_0, this__0_1, │
00:00:20 #498 [Verbose] > │ this__0_2, this__0_3, │
00:00:20 #499 [Verbose] > │ this__0_4) = this_.as_ref() { │
00:00:20 #500 [Verbose] > │ true │
00:00:20 #501 [Verbose] > │ } else { false } │
00:00:20 #502 [Verbose] > │ } │
00:00:20 #503 [Verbose] > │ pub fn get_IsUH0_1(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:20 #504 [Verbose] > │ -> bool { │
00:00:20 #505 [Verbose] > │ if let Spiral_eval::UH0::UH0_1 = this_.as_ref() { │
00:00:20 #506 [Verbose] > │ true │
00:00:20 #507 [Verbose] > │ } else { false } │
00:00:20 #508 [Verbose] > │ } │
00:00:20 #509 [Verbose] > │ } │
00:00:20 #510 [Verbose] > │ impl core::fmt::Display for Spiral_eval::UH0 { │
00:00:20 #511 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #512 [Verbose] > │ { │
00:00:20 #513 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #514 [Verbose] > │ } │
00:00:20 #515 [Verbose] > │ } │
00:00:20 #516 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #517 [Verbose] > │ pub enum US3 { US3_0, US3_1, } │
00:00:20 #518 [Verbose] > │ impl Spiral_eval::US3 { │
00:00:20 #519 [Verbose] > │ pub fn get_IsUS3_0(this_: &MutCell<Spiral_eval::US3>, unitArg: │
00:00:20 #520 [Verbose] > │ ()) │
00:00:20 #521 [Verbose] > │ -> bool { │
00:00:20 #522 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #523 [Verbose] > │ } │
00:00:20 #524 [Verbose] > │ pub fn get_IsUS3_1(this_: &MutCell<Spiral_eval::US3>, unitArg: │
00:00:20 #525 [Verbose] > │ ()) │
00:00:20 #526 [Verbose] > │ -> bool { │
00:00:20 #527 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #528 [Verbose] > │ } │
00:00:20 #529 [Verbose] > │ } │
00:00:20 #530 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US3 { │
00:00:20 #531 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #532 [Verbose] > │ { │
00:00:20 #533 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #534 [Verbose] > │ } │
00:00:20 #535 [Verbose] > │ } │
00:00:20 #536 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #537 [Verbose] > │ pub enum US7 { US7_0, US7_1, US7_2, US7_3, US7_4, US7_5, US7_6, } │
00:00:20 #538 [Verbose] > │ impl Spiral_eval::US7 { │
00:00:20 #539 [Verbose] > │ pub fn get_IsUS7_0(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #540 [Verbose] > │ ()) │
00:00:20 #541 [Verbose] > │ -> bool { │
00:00:20 #542 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #543 [Verbose] > │ } │
00:00:20 #544 [Verbose] > │ pub fn get_IsUS7_1(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #545 [Verbose] > │ ()) │
00:00:20 #546 [Verbose] > │ -> bool { │
00:00:20 #547 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #548 [Verbose] > │ } │
00:00:20 #549 [Verbose] > │ pub fn get_IsUS7_2(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #550 [Verbose] > │ ()) │
00:00:20 #551 [Verbose] > │ -> bool { │
00:00:20 #552 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #553 [Verbose] > │ } │
00:00:20 #554 [Verbose] > │ pub fn get_IsUS7_3(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #555 [Verbose] > │ ()) │
00:00:20 #556 [Verbose] > │ -> bool { │
00:00:20 #557 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #558 [Verbose] > │ } │
00:00:20 #559 [Verbose] > │ pub fn get_IsUS7_4(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #560 [Verbose] > │ ()) │
00:00:20 #561 [Verbose] > │ -> bool { │
00:00:20 #562 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #563 [Verbose] > │ } │
00:00:20 #564 [Verbose] > │ pub fn get_IsUS7_5(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #565 [Verbose] > │ ()) │
00:00:20 #566 [Verbose] > │ -> bool { │
00:00:20 #567 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #568 [Verbose] > │ } │
00:00:20 #569 [Verbose] > │ pub fn get_IsUS7_6(this_: &MutCell<Spiral_eval::US7>, unitArg: │
00:00:20 #570 [Verbose] > │ ()) │
00:00:20 #571 [Verbose] > │ -> bool { │
00:00:20 #572 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #573 [Verbose] > │ } │
00:00:20 #574 [Verbose] > │ } │
00:00:20 #575 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US7 { │
00:00:20 #576 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #577 [Verbose] > │ { │
00:00:20 #578 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #579 [Verbose] > │ } │
00:00:20 #580 [Verbose] > │ } │
00:00:20 #581 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #582 [Verbose] > │ pub enum US6 { │
00:00:20 #583 [Verbose] > │ US6_0(i32), │
00:00:20 #584 [Verbose] > │ US6_1(Spiral_eval::US7), │
00:00:20 #585 [Verbose] > │ US6_2(i32, Spiral_eval::US0), │
00:00:20 #586 [Verbose] > │ } │
00:00:20 #587 [Verbose] > │ impl Spiral_eval::US6 { │
00:00:20 #588 [Verbose] > │ pub fn get_IsUS6_0(this_: &MutCell<Spiral_eval::US6>, unitArg: │
00:00:20 #589 [Verbose] > │ ()) │
00:00:20 #590 [Verbose] > │ -> bool { │
00:00:20 #591 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #592 [Verbose] > │ } │
00:00:20 #593 [Verbose] > │ pub fn get_IsUS6_1(this_: &MutCell<Spiral_eval::US6>, unitArg: │
00:00:20 #594 [Verbose] > │ ()) │
00:00:20 #595 [Verbose] > │ -> bool { │
00:00:20 #596 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #597 [Verbose] > │ } │
00:00:20 #598 [Verbose] > │ pub fn get_IsUS6_2(this_: &MutCell<Spiral_eval::US6>, unitArg: │
00:00:20 #599 [Verbose] > │ ()) │
00:00:20 #600 [Verbose] > │ -> bool { │
00:00:20 #601 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #602 [Verbose] > │ } │
00:00:20 #603 [Verbose] > │ } │
00:00:20 #604 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US6 { │
00:00:20 #605 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #606 [Verbose] > │ { │
00:00:20 #607 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #608 [Verbose] > │ } │
00:00:20 #609 [Verbose] > │ } │
00:00:20 #610 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #611 [Verbose] > │ pub enum UH1 { │
00:00:20 #612 [Verbose] > │ UH1_0(Spiral_eval::US6, LrcPtr<Spiral_eval::UH1>), │
00:00:20 #613 [Verbose] > │ UH1_1, │
00:00:20 #614 [Verbose] > │ } │
00:00:20 #615 [Verbose] > │ impl Spiral_eval::UH1 { │
00:00:20 #616 [Verbose] > │ pub fn get_IsUH1_0(this_: LrcPtr<Spiral_eval::UH1>, unitArg: ()) │
00:00:20 #617 [Verbose] > │ -> bool { │
00:00:20 #618 [Verbose] > │ if let Spiral_eval::UH1::UH1_0(this__0_0, this__0_1) = │
00:00:20 #619 [Verbose] > │ this_.as_ref() { │
00:00:20 #620 [Verbose] > │ true │
00:00:20 #621 [Verbose] > │ } else { false } │
00:00:20 #622 [Verbose] > │ } │
00:00:20 #623 [Verbose] > │ pub fn get_IsUH1_1(this_: LrcPtr<Spiral_eval::UH1>, unitArg: ()) │
00:00:20 #624 [Verbose] > │ -> bool { │
00:00:20 #625 [Verbose] > │ if let Spiral_eval::UH1::UH1_1 = this_.as_ref() { │
00:00:20 #626 [Verbose] > │ true │
00:00:20 #627 [Verbose] > │ } else { false } │
00:00:20 #628 [Verbose] > │ } │
00:00:20 #629 [Verbose] > │ } │
00:00:20 #630 [Verbose] > │ impl core::fmt::Display for Spiral_eval::UH1 { │
00:00:20 #631 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #632 [Verbose] > │ { │
00:00:20 #633 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #634 [Verbose] > │ } │
00:00:20 #635 [Verbose] > │ } │
00:00:20 #636 [Verbose] > │ #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #637 [Verbose] > │ pub enum US8 { US8_0(i32), US8_1(i32), US8_2(i32), } │
00:00:20 #638 [Verbose] > │ impl Spiral_eval::US8 { │
00:00:20 #639 [Verbose] > │ pub fn get_IsUS8_0(this_: &MutCell<Spiral_eval::US8>, unitArg: │
00:00:20 #640 [Verbose] > │ ()) │
00:00:20 #641 [Verbose] > │ -> bool { │
00:00:20 #642 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #643 [Verbose] > │ } │
00:00:20 #644 [Verbose] > │ pub fn get_IsUS8_1(this_: &MutCell<Spiral_eval::US8>, unitArg: │
00:00:20 #645 [Verbose] > │ ()) │
00:00:20 #646 [Verbose] > │ -> bool { │
00:00:20 #647 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #648 [Verbose] > │ } │
00:00:20 #649 [Verbose] > │ pub fn get_IsUS8_2(this_: &MutCell<Spiral_eval::US8>, unitArg: │
00:00:20 #650 [Verbose] > │ ()) │
00:00:20 #651 [Verbose] > │ -> bool { │
00:00:20 #652 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #653 [Verbose] > │ } │
00:00:20 #654 [Verbose] > │ } │
00:00:20 #655 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US8 { │
00:00:20 #656 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #657 [Verbose] > │ { │
00:00:20 #658 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #659 [Verbose] > │ } │
00:00:20 #660 [Verbose] > │ } │
00:00:20 #661 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #662 [Verbose] > │ pub enum US5 { │
00:00:20 #663 [Verbose] > │ US5_0(LrcPtr<Spiral_eval::UH1>), │
00:00:20 #664 [Verbose] > │ US5_1(Spiral_eval::US8), │
00:00:20 #665 [Verbose] > │ } │
00:00:20 #666 [Verbose] > │ impl Spiral_eval::US5 { │
00:00:20 #667 [Verbose] > │ pub fn get_IsUS5_0(this_: &MutCell<Spiral_eval::US5>, unitArg: │
00:00:20 #668 [Verbose] > │ ()) │
00:00:20 #669 [Verbose] > │ -> bool { │
00:00:20 #670 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #671 [Verbose] > │ } │
00:00:20 #672 [Verbose] > │ pub fn get_IsUS5_1(this_: &MutCell<Spiral_eval::US5>, unitArg: │
00:00:20 #673 [Verbose] > │ ()) │
00:00:20 #674 [Verbose] > │ -> bool { │
00:00:20 #675 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #676 [Verbose] > │ } │
00:00:20 #677 [Verbose] > │ } │
00:00:20 #678 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US5 { │
00:00:20 #679 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #680 [Verbose] > │ { │
00:00:20 #681 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #682 [Verbose] > │ } │
00:00:20 #683 [Verbose] > │ } │
00:00:20 #684 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #685 [Verbose] > │ pub enum US4 { US4_0(Spiral_eval::US3), US4_1(Spiral_eval::US5), } │
00:00:20 #686 [Verbose] > │ impl Spiral_eval::US4 { │
00:00:20 #687 [Verbose] > │ pub fn get_IsUS4_0(this_: &MutCell<Spiral_eval::US4>, unitArg: │
00:00:20 #688 [Verbose] > │ ()) │
00:00:20 #689 [Verbose] > │ -> bool { │
00:00:20 #690 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #691 [Verbose] > │ } │
00:00:20 #692 [Verbose] > │ pub fn get_IsUS4_1(this_: &MutCell<Spiral_eval::US4>, unitArg: │
00:00:20 #693 [Verbose] > │ ()) │
00:00:20 #694 [Verbose] > │ -> bool { │
00:00:20 #695 [Verbose] > │ if unreachable!() { true } else { false } │
00:00:20 #696 [Verbose] > │ } │
00:00:20 #697 [Verbose] > │ } │
00:00:20 #698 [Verbose] > │ impl core::fmt::Display for Spiral_eval::US4 { │
00:00:20 #699 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #700 [Verbose] > │ { │
00:00:20 #701 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #702 [Verbose] > │ } │
00:00:20 #703 [Verbose] > │ } │
00:00:20 #704 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:20 #705 [Verbose] > │ pub enum UH2 { │
00:00:20 #706 [Verbose] > │ UH2_0(LrcPtr<Spiral_eval::UH0>, string, Spiral_eval::US4, │
00:00:20 #707 [Verbose] > │ LrcPtr<Spiral_eval::UH2>), │
00:00:20 #708 [Verbose] > │ UH2_1, │
00:00:20 #709 [Verbose] > │ } │
00:00:20 #710 [Verbose] > │ impl Spiral_eval::UH2 { │
00:00:20 #711 [Verbose] > │ pub fn get_IsUH2_0(this_: LrcPtr<Spiral_eval::UH2>, unitArg: ()) │
00:00:20 #712 [Verbose] > │ -> bool { │
00:00:20 #713 [Verbose] > │ if let Spiral_eval::UH2::UH2_0(this__0_0, this__0_1, │
00:00:20 #714 [Verbose] > │ this__0_2, this__0_3) = │
00:00:20 #715 [Verbose] > │ this_.as_ref() { │
00:00:20 #716 [Verbose] > │ true │
00:00:20 #717 [Verbose] > │ } else { false } │
00:00:20 #718 [Verbose] > │ } │
00:00:20 #719 [Verbose] > │ pub fn get_IsUH2_1(this_: LrcPtr<Spiral_eval::UH2>, unitArg: ()) │
00:00:20 #720 [Verbose] > │ -> bool { │
00:00:20 #721 [Verbose] > │ if let Spiral_eval::UH2::UH2_1 = this_.as_ref() { │
00:00:20 #722 [Verbose] > │ true │
00:00:20 #723 [Verbose] > │ } else { false } │
00:00:20 #724 [Verbose] > │ } │
00:00:20 #725 [Verbose] > │ } │
00:00:20 #726 [Verbose] > │ impl core::fmt::Display for Spiral_eval::UH2 { │
00:00:20 #727 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:20 #728 [Verbose] > │ { │
00:00:20 #729 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:20 #730 [Verbose] > │ } │
00:00:20 #731 [Verbose] > │ } │
00:00:20 #732 [Verbose] > │ pub fn method0() { │
00:00:20 #733 [Verbose] > │ let v17: std::string::String = │
00:00:20 #734 [Verbose] > │ format!("{:#?}", │
00:00:20 #735 [Verbose] > │ LrcPtr::new(Spiral_eval::UH2::UH2_0(LrcPtr::new(Spiral_eval::UH0::UH0_1), │
00:00:20 #736 [Verbose] > │ │
00:00:20 #737 [Verbose] > │ string("01"), │
00:00:20 #738 [Verbose] > │ │
00:00:20 #739 [Verbose] > │ Spiral_eval::US4::US4_0(Spiral_eval::US3::US3_0), │
00:00:20 #740 [Verbose] > │ │
00:00:20 #741 [Verbose] > │ LrcPtr::new(Spiral_eval::UH2::UH2_0(LrcPtr::new(Spiral_eval::UH0::UH0_1), │
00:00:20 #742 [Verbose] > │ │
00:00:20 #743 [Verbose] > │ string("02"), │
00:00:20 #744 [Verbose] > │ │
00:00:20 #745 [Verbose] > │ Spiral_eval::US4::US4_0(Spiral_eval::US3::US3_0), │
00:00:20 #746 [Verbose] > │ │
00:00:20 #747 [Verbose] > │ LrcPtr::new(Spiral_eval::UH2::UH2_0(LrcPtr::new(Spiral_eval::UH0::UH0_1), │
00:00:20 #748 [Verbose] > │ │
00:00:20 #749 [Verbose] > │ string("03"), │
00:00:20 #750 [Verbose] > │ │
00:00:20 #751 [Verbose] > │ Spiral_eval::US4::US4_0(Spiral_eval::US3::US3_0), │
00:00:20 #752 [Verbose] > │ │
00:00:20 #753 [Verbose] > │ LrcPtr::new(Spiral_eval::UH2::UH2_1)))))))); │
00:00:20 #754 [Verbose] > │ printfn!("{0}", v17); │
00:00:20 #755 [Verbose] > │ () │
00:00:20 #756 [Verbose] > │ } │
00:00:20 #757 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:20 #758 [Verbose] > │ } │
00:00:20 #759 [Verbose] > │ } │
00:00:20 #760 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:20 #761 [Verbose] > │ │
00:00:20 #762 [Verbose] > │ │
00:00:20 #763 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #764 [Verbose] >
00:00:20 #765 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #766 [Verbose] > // // test
00:00:20 #767 [Verbose] > // // rust=
00:00:20 #768 [Verbose] >
00:00:20 #769 [Verbose] > get_tasks ()
00:00:20 #770 [Verbose] > |> listm'.try_item 0i32
00:00:20 #771 [Verbose] > |> fun (Some task) => task.task.name
00:00:20 #772 [Verbose] > |> _assert_eq (task_name "01")
00:00:24 #773 [Verbose] >
00:00:24 #774 [Verbose] > ╭─[ 3.99s - return value ]─────────────────────────────────────────────────────╮
00:00:24 #775 [Verbose] > │ .rs output: │
00:00:24 #776 [Verbose] > │ │
00:00:24 #777 [Verbose] > │ │
00:00:24 #778 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #779 [Verbose] >
00:00:24 #780 [Verbose] > ╭─[ 3.99s - stdout ]───────────────────────────────────────────────────────────╮
00:00:24 #781 [Verbose] > │ │
00:00:24 #782 [Verbose] > │ .fsx: │
00:00:24 #783 [Verbose] > │ let rec method1 () : bool = │
00:00:24 #784 [Verbose] > │ true │
00:00:24 #785 [Verbose] > │ and method0 () : unit = │
00:00:24 #786 [Verbose] > │ let v3 : bool = method1() │
00:00:24 #787 [Verbose] > │ let v4 : string = "01" │
00:00:24 #788 [Verbose] > │ let v5 : string = $"__expect / actual: %A{v4} / expected: %A{v4}" │
00:00:24 #789 [Verbose] > │ let v6 : bool = v3 = false │
00:00:24 #790 [Verbose] > │ if v6 then │
00:00:24 #791 [Verbose] > │ failwith<unit> v5 │
00:00:24 #792 [Verbose] > │ method0() │
00:00:24 #793 [Verbose] > │ │
00:00:24 #794 [Verbose] > │ .rs: │
00:00:24 #795 [Verbose] > │ #![allow(dead_code,)] │
00:00:24 #796 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:24 #797 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:24 #798 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:24 #799 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:24 #800 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:24 #801 [Verbose] > │ #![allow(unused_imports,)] │
00:00:24 #802 [Verbose] > │ #![allow(unused_macros,)] │
00:00:24 #803 [Verbose] > │ #![allow(unused_parens,)] │
00:00:24 #804 [Verbose] > │ #![allow(unused_variables,)] │
00:00:24 #805 [Verbose] > │ mod module_ccfa04bf { │
00:00:24 #806 [Verbose] > │ pub mod Spiral_eval { │
00:00:24 #807 [Verbose] > │ use super::*; │
00:00:24 #808 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:24 #809 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:24 #810 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:24 #811 [Verbose] > │ pub fn method1() -> bool { true } │
00:00:24 #812 [Verbose] > │ pub fn method0() { │
00:00:24 #813 [Verbose] > │ if Spiral_eval::method1() == false { │
00:00:24 #814 [Verbose] > │ panic!("{}", │
00:00:24 #815 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: {:?}", │
00:00:24 #816 [Verbose] > │ string("01"), │
00:00:24 #817 [Verbose] > │ string("01"))); │
00:00:24 #818 [Verbose] > │ }; │
00:00:24 #819 [Verbose] > │ } │
00:00:24 #820 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:24 #821 [Verbose] > │ } │
00:00:24 #822 [Verbose] > │ } │
00:00:24 #823 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:24 #824 [Verbose] > │ │
00:00:24 #825 [Verbose] > │ │
00:00:24 #826 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #827 [Verbose] >
00:00:24 #828 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 #829 [Verbose] > // // test
00:00:24 #830 [Verbose] >
00:00:24 #831 [Verbose] > ()
00:00:25 #832 [Verbose] >
00:00:25 #833 [Verbose] > ╭─[ 819.42ms - stdout ]────────────────────────────────────────────────────────╮
00:00:25 #834 [Verbose] > │ let rec method0 () : unit = │
00:00:25 #835 [Verbose] > │ () │
00:00:25 #836 [Verbose] > │ method0() │
00:00:25 #837 [Verbose] > │ │
00:00:25 #838 [Verbose] > │ │
00:00:25 #839 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #840 [Verbose] > [NbConvertApp] Converting notebook Tasks.dib.ipynb to html
00:00:27 #841 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:27 #842 [Verbose] > validate(nb)
00:00:27 #843 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:27 #844 [Verbose] > return _pygments_highlight(
00:00:28 #845 [Verbose] > [NbConvertApp] Writing 313935 bytes to Tasks.dib.html
00:00:29 #846 [Debug] executeAsync / exitCode: 0 / output.Length: 56550
00:00:29 #847 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: Tasks.dib
00:00:00 #2 [Debug] parseDibCode / output: Spi / file: Tasks.dib
In [ ]:
{ . "$ScriptDir/../apps/spiral/temp/test/build.ps1" } | Invoke-Block
── pwsh ────────────────────────────────────────────────────────────────────────
. ../../../../scripts/nbs_header.ps1
. ../../../../scripts/core.ps1
── pwsh ────────────────────────────────────────────────────────────────────────
{ . ../../../../apps/spiral/dist/Supervisor$(GetExecutableSuffix) --build-file
test.spi test.fsx --timeout 10000 } | Invoke-Block
╭─[ 1.35s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60 │
│ 00:00:00 #2 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:00 #3 [Debug] buildFile / takeWhileInclusive / fsxContent: / errors: │
│ [] / typeErrorCount: 0 │
│ 00:00:00 #4 [Debug] sendJson / port: 13805 / json: │
│ {"FileOpen":{"spiText":"inl app () =\r\n \u0022test\u0022 |\u003E │
│ console.write_line\r\n 0i32\r\n\r\ninl main () =\r\n print_static │
│ \u0022\u003Ctest\u003E\u0022\r\n\r\n app\r\n |\u003E dyn\r\n │
│ |\u003E ignore\r\n\r\n print_static │
│ \u0022\u003C/test\u003E\u0022\r\n","uri":"file:///c:/home/git/polyglot/apps/ │
│ spiral/temp/test/test.spi"}} / result.Length: │
│ 00:00:00 #5 [Debug] sendJson / port: 13805 / json: │
│ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/sp │
│ iral/temp/test/test.spi"}} / result.Length: │
│ 00:00:00 #6 [Debug] buildFile / takeWhileInclusive / fsxContent: let rec │
│ closure0 () () : int32 = │
│ let v0 : string = "test" │
│ System.Console.WriteLine v0 │
│ 0 │
│ let v0 : (unit -> int32) = closure0() │
│ () │
│ / errors: [] / typeErrorCount: 0 │
│ 00:00:00 #7 [Debug] watchWithFilter / Disposing watch stream / filter: │
│ FileName, LastWrite │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── pwsh ────────────────────────────────────────────────────────────────────────
dotnet fable --optimize --lang rs --extension .rs
╭─[ 3.28s - stdout ]───────────────────────────────────────────────────────────╮
│ Fable 4.14.0: F# to Rust compiler (status: alpha) │
│ │
│ Thanks to the contributor! @johannesegger │
│ Stand with Ukraine! https://standwithukraine.com.ua/ │
│ │
│ Parsing test.fsproj... │
│ Retrieving project options from cache, in case of issues run `dotnet fable │
│ clean` or try `--noCache` option. │
│ Project and references (1 source files) parsed in 190ms │
│ │
│ Started Fable compilation... │
│ │
│ Fable compilation finished in 1410ms │
│ │
│ .\test.fsx(6,0): (6,2) warning FABLE: For Rust, support for F# static and │
│ module do bindings is disabled by default. It can be enabled with the │
│ 'static_do_bindings' feature. Use at your own risk! │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── pwsh ────────────────────────────────────────────────────────────────────────
(Get-Content test.rs) `
-replace [[regex]]::Escape("),);"), "));" `
| Set-Content test.rs
── pwsh ────────────────────────────────────────────────────────────────────────
cargo fmt --
── pwsh ────────────────────────────────────────────────────────────────────────
cargo build --release
╭─[ 12.74s - stdout ]──────────────────────────────────────────────────────────╮
│ Compiling spiral_temp_test v0.0.1 │
│ (C:\home\git\polyglot\apps\spiral\temp\test) │
│ warning: the item `any` is imported redundantly │
│ --> apps\spiral\temp\test\./main.rs:11:27 │
│ | │
│ 11 | use proptest::arbitrary::{any, Arbitrary}; │
│ | ^^^ │
│ 12 | use proptest::prelude::*; │
│ | -------------------- the item `any` is already imported here │
│ | │
│ = note: `#[warn(unused_imports)]` on by default │
│ │
│ warning: the item `Arbitrary` is imported redundantly │
│ --> apps\spiral\temp\test\./main.rs:11:32 │
│ | │
│ 11 | use proptest::arbitrary::{any, Arbitrary}; │
│ | ^^^^^^^^^ │
│ 12 | use proptest::prelude::*; │
│ | -------------------- the item `Arbitrary` is already imported │
│ here │
│ │
│ warning: unused import: `info` │
│ --> apps\spiral\temp\test\./main.rs:190:15 │
│ | │
│ 190 | use tracing::{info, Level}; │
│ | ^^^^ │
│ │
│ warning: associated items `new`, `add_item`, and `remove_item` are │
│ never used │
│ --> apps\spiral\temp\test\./main.rs:46:8 │
│ | │
│ 45 | impl Cart { │
│ | --------- associated items in this implementation │
│ 46 | fn new() -> Cart { │
│ | ^^^ │
│ ... │
│ 50 | fn add_item(&mut self, item: Item) { │
│ | ^^^^^^^^ │
│ ... │
│ 56 | fn remove_item(&mut self, item: &Item) { │
│ | ^^^^^^^^^^^ │
│ | │
│ = note: `#[warn(dead_code)]` on by default │
│ │
│ warning: function `parse_comment` is never used │
│ --> apps\spiral\temp\test\./main.rs:124:4 │
│ | │
│ 124 | fn parse_comment(input: &str) -> IResult<&str, SpiralToken> { │
│ | ^^^^^^^^^^^^^ │
│ │
│ warning: function `parse_string` is never used │
│ --> apps\spiral\temp\test\./main.rs:130:4 │
│ | │
│ 130 | fn parse_string(input: &str) -> IResult<&str, SpiralToken> { │
│ | ^^^^^^^^^^^^ │
│ │
│ warning: function `parse_identifier` is never used │
│ --> apps\spiral\temp\test\./main.rs:145:4 │
│ | │
│ 145 | fn parse_identifier(input: &str) -> IResult<&str, SpiralToken> {[ │
│ 0m │
│ | ^^^^^^^^^^^^^^^^ │
│ │
│ warning: function `parse_integer` is never used │
│ --> apps\spiral\temp\test\./main.rs:157:4 │
│ | │
│ 157 | fn parse_integer(input: &str) -> IResult<&str, SpiralToken> { │
│ | ^^^^^^^^^^^^^ │
│ │
│ warning: function `parse_operator` is never used │
│ --> apps\spiral\temp\test\./main.rs:165:4 │
│ | │
│ 165 | fn parse_operator(input: &str) -> IResult<&str, SpiralToken> { │
│ | ^^^^^^^^^^^^^^ │
│ │
│ warning: function `parse_token` is never used │
│ --> apps\spiral\temp\test\./main.rs:170:4 │
│ | │
│ 170 | fn parse_token(input: &str) -> IResult<&str, SpiralToken> { │
│ | ^^^^^^^^^^^ │
│ │
│ warning: function `format_token` is never used │
│ --> apps\spiral\temp\test\./main.rs:180:4 │
│ | │
│ 180 | fn format_token(token: &SpiralToken) -> String { │
│ | ^^^^^^^^^^^^ │
│ │
│ warning: function `parse_expression` is never used │
│ --> apps\spiral\temp\test\./main.rs:213:4 │
│ | │
│ 213 | fn parse_expression(input: &str) -> IResult<&str, SpiralToken> {[ │
│ 0m │
│ | ^^^^^^^^^^^^^^^^ │
│ │
│ warning: `spiral_temp_test` (bin "spiral_temp_test") generated 12 │
│ warnings (run `cargo fix --bin "spiral_temp_test"` to apply 1 suggestion) │
│ Finished `release` profile [optimized] target(s) in 12.53s │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── pwsh ────────────────────────────────────────────────────────────────────────
$env:RUST_LOG="info"
{ cargo test --release } | Invoke-Block
╭─[ 26.93s - stdout ]──────────────────────────────────────────────────────────╮
│ Compiling spiral_temp_test v0.0.1 │
│ (C:\home\git\polyglot\apps\spiral\temp\test) │
│ warning: the item `any` is imported redundantly │
│ --> apps\spiral\temp\test\./main.rs:11:27 │
│ | │
│ 11 | use proptest::arbitrary::{any, Arbitrary}; │
│ | ^^^ │
│ 12 | use proptest::prelude::*; │
│ | -------------------- the item `any` is already imported here │
│ | │
│ = note: `#[warn(unused_imports)]` on by default │
│ │
│ warning: the item `Arbitrary` is imported redundantly │
│ --> apps\spiral\temp\test\./main.rs:11:32 │
│ | │
│ 11 | use proptest::arbitrary::{any, Arbitrary}; │
│ | ^^^^^^^^^ │
│ 12 | use proptest::prelude::*; │
│ | -------------------- the item `Arbitrary` is already imported │
│ here │
│ │
│ warning: `spiral_temp_test` (bin "spiral_temp_test" test) generated 2 │
│ warnings │
│ Finished `release` profile [optimized] target(s) in 26.35s │
│ Running unittests main.rs │
│ (C:\home\git\polyglot\target\release\deps\spiral_temp_test-b035f1bd4eb25d0e. │
│ exe) │
│ │
│ running 3 tests │
│ test test_parse_number ... ok │
│ 2024-03-18T10:56:28.828394Z INFO spiral_temp_test: │
│ input=Integer(-3790664577244857790) │
│ 2024-03-18T10:56:28.828536Z INFO spiral_temp_test: │
│ input=Comment(".l'H.?\\`/inA8x=o{<\\3 LH*~\\4nX") │
│ 2024-03-18T10:56:28.828649Z INFO spiral_temp_test: │
│ input=Comment("{&xH*c") │
│ 2024-03-18T10:56:28.828774Z INFO spiral_temp_test: │
│ input=StringLiteral("bPqG@t{:&j.=") │
│ 2024-03-18T10:56:28.828856Z INFO spiral_temp_test: │
│ input=Comment("t<Pax<0`-b(R") │
│ 2024-03-18T10:56:28.828977Z INFO spiral_temp_test: │
│ input=Comment("{Jq") │
│ 2024-03-18T10:56:28.829119Z INFO spiral_temp_test: │
│ input=Comment("'q''B<**K{FAI*\"nH ?{G':Q&s\\7") │
│ 2024-03-18T10:56:28.829205Z INFO spiral_temp_test: │
│ input=Identifier("B") │
│ 2024-03-18T10:56:28.829342Z INFO spiral_temp_test: │
│ input=StringLiteral("b&gaWQI3") │
│ 2024-03-18T10:56:28.829416Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.829462Z INFO spiral_temp_test: │
│ input=Integer(2925338840335767903) │
│ 2024-03-18T10:56:28.829522Z INFO spiral_temp_test: │
│ input=Comment("{%Ik<X\"\\J1$&_T<`*2'Va&q'&l=.+k") │
│ 2024-03-18T10:56:28.829601Z INFO spiral_temp_test: │
│ input=StringLiteral("2=?,P}?'<7DWs:8n+|C%~vE'9$p6") │
│ 2024-03-18T10:56:28.829658Z INFO spiral_temp_test: │
│ input=Integer(-8030854305217450194) │
│ 2024-03-18T10:56:28.829719Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.829785Z INFO spiral_temp_test: │
│ input=StringLiteral("Z*=p'JEt=%") │
│ 2024-03-18T10:56:28.829833Z INFO spiral_temp_test: │
│ input=Integer(-5411062872841861003) │
│ 2024-03-18T10:56:28.829883Z INFO spiral_temp_test: │
│ input=Identifier("wEEE14") │
│ 2024-03-18T10:56:28.829928Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.829994Z INFO spiral_temp_test: │
│ input=Identifier("tNt3qV2OB14sgZip") │
│ 2024-03-18T10:56:28.830043Z INFO spiral_temp_test: │
│ input=Integer(4019044472056569416) │
│ 2024-03-18T10:56:28.830109Z INFO spiral_temp_test: │
│ input=Comment("Xr<&f<A%hfU") │
│ 2024-03-18T10:56:28.830173Z INFO spiral_temp_test: │
│ input=Comment("]*@\"`Vk[%]^w{{}N\\&Nzq") │
│ 2024-03-18T10:56:28.830250Z INFO spiral_temp_test: │
│ input=Integer(3868569346407242645) │
│ 2024-03-18T10:56:28.830302Z INFO spiral_temp_test: │
│ input=Integer(-4253738363015690056) │
│ 2024-03-18T10:56:28.830346Z INFO spiral_temp_test: │
│ input=Integer(-7355604133694559454) │
│ 2024-03-18T10:56:28.830415Z INFO spiral_temp_test: │
│ input=Comment("s{ah92@}1<PQ:K&,Ngn9R") │
│ 2024-03-18T10:56:28.830476Z INFO spiral_temp_test: │
│ input=Identifier("CSrSX2hxUe1spI") │
│ 2024-03-18T10:56:28.830556Z INFO spiral_temp_test: │
│ input=Comment("*{&7^wtC%h<[}{j'*>\\%Sfp/.t47t.GD") │
│ 2024-03-18T10:56:28.830617Z INFO spiral_temp_test: │
│ input=Integer(6633018429446184859) │
│ 2024-03-18T10:56:28.830739Z INFO spiral_temp_test: │
│ input=Comment("1l<G=NQ*y}fY\\S%9_qQ=;a/W:[/u`Z$") │
│ 2024-03-18T10:56:28.830826Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.830889Z INFO spiral_temp_test: │
│ input=Comment("h1|Pe0X*UVHB\"`<OkZ\\%@X4]<") │
│ 2024-03-18T10:56:28.830930Z INFO spiral_temp_test: │
│ input=Integer(-2472380693368061) │
│ 2024-03-18T10:56:28.830963Z INFO spiral_temp_test: │
│ input=Identifier("yj") │
│ 2024-03-18T10:56:28.831009Z INFO spiral_temp_test: │
│ input=Identifier("fGYHotjT32Yd2Dif0mRfWz") │
│ 2024-03-18T10:56:28.831052Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.831113Z INFO spiral_temp_test: │
│ input=StringLiteral("=d{={DT<6.T,hnbRqYwX`&f4_y.s>M") │
│ 2024-03-18T10:56:28.831161Z INFO spiral_temp_test: │
│ input=Operator(")") │
│ 2024-03-18T10:56:28.831191Z INFO spiral_temp_test: │
│ input=Integer(2442497290890005231) │
│ 2024-03-18T10:56:28.831239Z INFO spiral_temp_test: │
│ input=Comment(".Pql=.N`J$Me?<&$N$") │
│ 2024-03-18T10:56:28.831282Z INFO spiral_temp_test: │
│ input=Comment("*YUU&dR\"]vf/") │
│ 2024-03-18T10:56:28.831344Z INFO spiral_temp_test: │
│ input=Integer(4459242496992134436) │
│ 2024-03-18T10:56:28.831387Z INFO spiral_temp_test: │
│ input=StringLiteral("h/:I?]<'$##x") │
│ 2024-03-18T10:56:28.831429Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.831463Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.831505Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.831542Z INFO spiral_temp_test: │
│ input=StringLiteral("*") │
│ 2024-03-18T10:56:28.831582Z INFO spiral_temp_test: │
│ input=Integer(7678766098757153204) │
│ 2024-03-18T10:56:28.831688Z INFO spiral_temp_test: │
│ input=StringLiteral("[*6:Twc{?(r%*.K+GnagKpkR3{f") │
│ 2024-03-18T10:56:28.831774Z INFO spiral_temp_test: │
│ input=Integer(5499461026380042962) │
│ 2024-03-18T10:56:28.831821Z INFO spiral_temp_test: │
│ input=Integer(1335857261094129463) │
│ 2024-03-18T10:56:28.831871Z INFO spiral_temp_test: │
│ input=Identifier("QaH85LlRJ3") │
│ 2024-03-18T10:56:28.831934Z INFO spiral_temp_test: │
│ input=Comment("w$2&'=I=:W'?/\"%]}M7l!i") │
│ 2024-03-18T10:56:28.831989Z INFO spiral_temp_test: │
│ input=Integer(3219423384091828629) │
│ 2024-03-18T10:56:28.832046Z INFO spiral_temp_test: │
│ input=Comment("n\"@1") │
│ 2024-03-18T10:56:28.832095Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.832129Z INFO spiral_temp_test: │
│ input=Integer(4983473529381779517) │
│ 2024-03-18T10:56:28.832172Z INFO spiral_temp_test: │
│ input=Operator("(") │
│ 2024-03-18T10:56:28.832230Z INFO spiral_temp_test: │
│ input=StringLiteral("bpWA,:x0kH=$`P$!4A'Ez$w0bZu") │
│ 2024-03-18T10:56:28.832295Z INFO spiral_temp_test: │
│ input=StringLiteral("e>=*UL[=l%YFz0?&G({`)AgJ+") │
│ 2024-03-18T10:56:28.832346Z INFO spiral_temp_test: │
│ input=Operator(")") │
│ 2024-03-18T10:56:28.832381Z INFO spiral_temp_test: │
│ input=Integer(-5794026037829531116) │
│ 2024-03-18T10:56:28.832431Z INFO spiral_temp_test: │
│ input=Identifier("b3kM9g02w5b411BM") │
│ 2024-03-18T10:56:28.832481Z INFO spiral_temp_test: │
│ input=StringLiteral("nx@f*/VpsU7{w*A<?|?z") │
│ 2024-03-18T10:56:28.832544Z INFO spiral_temp_test: │
│ input=Identifier("YmcJ1S46S8RsTQ6Whvi51Z85C21gO") │
│ 2024-03-18T10:56:28.832593Z INFO spiral_temp_test: │
│ input=StringLiteral("s`4v!X") │
│ 2024-03-18T10:56:28.832629Z INFO spiral_temp_test: │
│ input=Integer(-7845445804583708277) │
│ 2024-03-18T10:56:28.832684Z INFO spiral_temp_test: │
│ input=Identifier("x8eNk") │
│ 2024-03-18T10:56:28.832717Z INFO spiral_temp_test: │
│ input=Integer(1706475965943915453) │
│ 2024-03-18T10:56:28.832756Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.832789Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.832823Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.832856Z INFO spiral_temp_test: │
│ input=StringLiteral("") │
│ 2024-03-18T10:56:28.832901Z INFO spiral_temp_test: │
│ input=Comment(",\":>TH^b") │
│ 2024-03-18T10:56:28.832944Z INFO spiral_temp_test: │
│ input=Integer(7830668501589954489) │
│ 2024-03-18T10:56:28.832989Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.833022Z INFO spiral_temp_test: │
│ input=Integer(-2994158716372641864) │
│ 2024-03-18T10:56:28.833063Z INFO spiral_temp_test: │
│ input=Identifier("wDv5V") │
│ 2024-03-18T10:56:28.833095Z INFO spiral_temp_test: │
│ input=Integer(-7602839729599156146) │
│ 2024-03-18T10:56:28.833146Z INFO spiral_temp_test: │
│ input=Comment("Y:R'`\"&|_|{*\"9kJNDR=q2u'`&/{W") │
│ 2024-03-18T10:56:28.833191Z INFO spiral_temp_test: │
│ input=Comment("]Ot") │
│ 2024-03-18T10:56:28.833240Z INFO spiral_temp_test: │
│ input=Comment("c%=${}\"{\\Q<%:^<mz*U8F3&s") │
│ 2024-03-18T10:56:28.833299Z INFO spiral_temp_test: │
│ input=StringLiteral("AV~$S+.*dmYB%'kb*8") │
│ 2024-03-18T10:56:28.833364Z INFO spiral_temp_test: │
│ input=StringLiteral("'=wM!PSz7B)b./.${.U!]S<%_1") │
│ 2024-03-18T10:56:28.833421Z INFO spiral_temp_test: │
│ input=Comment("E\"v&=_>[&J(>(}") │
│ 2024-03-18T10:56:28.833460Z INFO spiral_temp_test: │
│ input=Identifier("XsFk") │
│ 2024-03-18T10:56:28.833495Z INFO spiral_temp_test: │
│ input=Integer(4650747425858279088) │
│ 2024-03-18T10:56:28.833588Z INFO spiral_temp_test: │
│ input=StringLiteral("{20&*'?>h4r8'{+02p/7h%]zbI>vU~") │
│ 2024-03-18T10:56:28.833683Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.833734Z INFO spiral_temp_test: │
│ input=Identifier("v1IYb7qSZ2tFrU") │
│ 2024-03-18T10:56:28.833789Z INFO spiral_temp_test: │
│ input=Comment("y*%fI.M<6Mu#X{uxh&:St*`UCtyb($cK") │
│ 2024-03-18T10:56:28.833834Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.833882Z INFO spiral_temp_test: │
│ input=Integer(-7543771540703347578) │
│ 2024-03-18T10:56:28.833949Z INFO spiral_temp_test: │
│ input=Comment(".s|'>kB,/%&") │
│ 2024-03-18T10:56:28.834027Z INFO spiral_temp_test: │
│ input=Identifier("u7hMm9PKdt4v1jXtPAR0ZIS25ZC8ZPb") │
│ 2024-03-18T10:56:28.834104Z INFO spiral_temp_test: │
│ input=Identifier("OqidOnRK") │
│ 2024-03-18T10:56:28.834150Z INFO spiral_temp_test: │
│ input=Operator("(") │
│ 2024-03-18T10:56:28.834213Z INFO spiral_temp_test: │
│ input=Identifier("R6qDOe78UGHIL3yQN5m4qdr1") │
│ 2024-03-18T10:56:28.834259Z INFO spiral_temp_test: │
│ input=Integer(1862843887593450478) │
│ 2024-03-18T10:56:28.834296Z INFO spiral_temp_test: │
│ input=Integer(-2799283812687899172) │
│ 2024-03-18T10:56:28.834337Z INFO spiral_temp_test: │
│ input=Integer(-8692262242287291567) │
│ 2024-03-18T10:56:28.834378Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.834420Z INFO spiral_temp_test: │
│ input=Integer(3802702273988559846) │
│ 2024-03-18T10:56:28.834473Z INFO spiral_temp_test: │
│ input=Comment(">]\\;<,0*X)T'M:@:jkE]B") │
│ 2024-03-18T10:56:28.834535Z INFO spiral_temp_test: │
│ input=Identifier("XG49368uRlKd") │
│ 2024-03-18T10:56:28.834593Z INFO spiral_temp_test: │
│ input=Comment("A\"R6\"m.r$ty") │
│ 2024-03-18T10:56:28.834634Z INFO spiral_temp_test: │
│ input=Integer(-8777813269904503866) │
│ 2024-03-18T10:56:28.834680Z INFO spiral_temp_test: │
│ input=Comment("*\\wW") │
│ 2024-03-18T10:56:28.834727Z INFO spiral_temp_test: │
│ input=Identifier("dehp1LRy6GC") │
│ 2024-03-18T10:56:28.834784Z INFO spiral_temp_test: │
│ input=Identifier("IRdeT3hnMFTRUq8xTVk2AWF") │
│ 2024-03-18T10:56:28.834837Z INFO spiral_temp_test: │
│ input=Operator(")") │
│ 2024-03-18T10:56:28.834878Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.834929Z INFO spiral_temp_test: │
│ input=Comment("1xas|S4%bc\\O^p") │
│ 2024-03-18T10:56:28.834999Z INFO spiral_temp_test: │
│ input=Identifier("E2iRDj3JhBfe9SgVwSazM75I3E6tDb4F") │
│ 2024-03-18T10:56:28.835064Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.835116Z INFO spiral_temp_test: │
│ input=Comment("v@%:MSOjnx") │
│ 2024-03-18T10:56:28.835166Z INFO spiral_temp_test: │
│ input=Identifier("pzYKA") │
│ 2024-03-18T10:56:28.835207Z INFO spiral_temp_test: │
│ input=Operator("(") │
│ 2024-03-18T10:56:28.835248Z INFO spiral_temp_test: │
│ input=Integer(3498931791657830809) │
│ 2024-03-18T10:56:28.835284Z INFO spiral_temp_test: │
│ input=Integer(753602514313204461) │
│ 2024-03-18T10:56:28.835331Z INFO spiral_temp_test: │
│ input=Identifier("T2") │
│ 2024-03-18T10:56:28.835397Z INFO spiral_temp_test: │
│ input=StringLiteral("$(m@/&b^&]HR/`*'<Nm") │
│ 2024-03-18T10:56:28.835451Z INFO spiral_temp_test: │
│ input=Integer(-5075455143102166782) │
│ 2024-03-18T10:56:28.835533Z INFO spiral_temp_test: │
│ input=Integer(-3170030296078172605) │
│ 2024-03-18T10:56:28.835616Z INFO spiral_temp_test: │
│ input=Integer(8720849493119033784) │
│ 2024-03-18T10:56:28.835676Z INFO spiral_temp_test: │
│ input=Comment(">k2V:/OeKW%Xu`Ppn^X.CdD") │
│ 2024-03-18T10:56:28.835740Z INFO spiral_temp_test: │
│ input=Identifier("q53yrD0LJb40U7z52bL3REs") │
│ 2024-03-18T10:56:28.835791Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.835839Z INFO spiral_temp_test: │
│ input=Comment("}(^8^$]Q1?") │
│ 2024-03-18T10:56:28.835929Z INFO spiral_temp_test: │
│ input=Identifier("L4YGZB8EL04he2NEvygJ91nfh519VySf") │
│ 2024-03-18T10:56:28.836006Z INFO spiral_temp_test: │
│ input=Identifier("dat3HIqRViwbHa41W8220kurscJllJsO0") │
│ 2024-03-18T10:56:28.836075Z INFO spiral_temp_test: │
│ input=Integer(2843194599290735125) │
│ 2024-03-18T10:56:28.836146Z INFO spiral_temp_test: │
│ input=Comment("*{I<$`^:<$r.xy.B&gE!me{F&a\"D") │
│ 2024-03-18T10:56:28.836219Z INFO spiral_temp_test: │
│ input=Comment(".:;^jEmc`?$.G\"<M\"9DXO\"`fOc=") │
│ 2024-03-18T10:56:28.836280Z INFO spiral_temp_test: │
│ input=Comment("sq") │
│ 2024-03-18T10:56:28.836322Z INFO spiral_temp_test: │
│ input=Integer(4008024028774902296) │
│ 2024-03-18T10:56:28.836376Z INFO spiral_temp_test: │
│ input=StringLiteral("'M{:&:ru=_}W&3$Kh$'>xB") │
│ 2024-03-18T10:56:28.836430Z INFO spiral_temp_test: │
│ input=Operator("(") │
│ 2024-03-18T10:56:28.836468Z INFO spiral_temp_test: │
│ input=Integer(-2968158755264354907) │
│ 2024-03-18T10:56:28.836504Z INFO spiral_temp_test: │
│ input=Integer(5907911411548461059) │
│ 2024-03-18T10:56:28.836548Z INFO spiral_temp_test: │
│ input=Identifier("HkV") │
│ 2024-03-18T10:56:28.836595Z INFO spiral_temp_test: │
│ input=Identifier("Y9auI43") │
│ 2024-03-18T10:56:28.836653Z INFO spiral_temp_test: │
│ input=Identifier("l6E2vj2QlUEhemzYxs5vEjV39bWht1emj") │
│ 2024-03-18T10:56:28.836718Z INFO spiral_temp_test: │
│ input=Identifier("H13BLegVhs9eI1") │
│ 2024-03-18T10:56:28.836763Z INFO spiral_temp_test: │
│ input=StringLiteral("") │
│ 2024-03-18T10:56:28.836822Z INFO spiral_temp_test: │
│ input=StringLiteral("&vI<P9:hSP*.$y% eI_l.") │
│ 2024-03-18T10:56:28.836922Z INFO spiral_temp_test: │
│ input=Comment("") │
│ 2024-03-18T10:56:28.837012Z INFO spiral_temp_test: │
│ input=StringLiteral("'") │
│ 2024-03-18T10:56:28.837119Z INFO spiral_temp_test: │
│ input=Comment("\\`F&`3%.:I:mYIJO/Yw 6<gMA5") │
│ 2024-03-18T10:56:28.837183Z INFO spiral_temp_test: │
│ input=StringLiteral("78'cta") │
│ 2024-03-18T10:56:28.837253Z INFO spiral_temp_test: │
│ input=StringLiteral("M*=9@>:*.e.i8TXf*&z/KFtU',$c") │
│ 2024-03-18T10:56:28.837303Z INFO spiral_temp_test: │
│ input=Integer(2409285640058524846) │
│ 2024-03-18T10:56:28.837344Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.837408Z INFO spiral_temp_test: │
│ input=Comment("XO=`h[C]#m.Q&($:',jl{:*M/&=j") │
│ 2024-03-18T10:56:28.837466Z INFO spiral_temp_test: │
│ input=StringLiteral("lO>p2d${Q") │
│ 2024-03-18T10:56:28.837515Z INFO spiral_temp_test: │
│ input=Operator(")") │
│ 2024-03-18T10:56:28.837577Z INFO spiral_temp_test: │
│ input=Identifier("H10dc8astCFQgdDKO03d8kb0oy") │
│ 2024-03-18T10:56:28.837624Z INFO spiral_temp_test: │
│ input=Integer(-2884065269498480428) │
│ 2024-03-18T10:56:28.837660Z INFO spiral_temp_test: │
│ input=Integer(-5666201480621734080) │
│ 2024-03-18T10:56:28.837726Z INFO spiral_temp_test: │
│ input=StringLiteral("^_~!+)Ike@=Jw!EHC`{Ut7l@L c*") │
│ 2024-03-18T10:56:28.837796Z INFO spiral_temp_test: │
│ input=StringLiteral("C<sXI%nN,Q:/$$`O}{?m7#h:/") │
│ 2024-03-18T10:56:28.837848Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.837911Z INFO spiral_temp_test: │
│ input=Identifier("JOIQq3zc3SIy7575L56K7fM6mB0") │
│ 2024-03-18T10:56:28.838005Z INFO spiral_temp_test: │
│ input=Integer(1171951073174255996) │
│ 2024-03-18T10:56:28.838119Z INFO spiral_temp_test: │
│ input=Identifier("tIdk0I9Aux8LyhEr3EB") │
│ 2024-03-18T10:56:28.838172Z INFO spiral_temp_test: │
│ input=Integer(8875362413266353191) │
│ 2024-03-18T10:56:28.838213Z INFO spiral_temp_test: │
│ input=Operator("=") │
│ 2024-03-18T10:56:28.838312Z INFO spiral_temp_test: │
│ input=StringLiteral("<Y`3~MqG.-<%~P%$AV$uiAq$*>") │
│ 2024-03-18T10:56:28.838394Z INFO spiral_temp_test: │
│ input=Comment(".5t&1b<%g:") │
│ 2024-03-18T10:56:28.838455Z INFO spiral_temp_test: │
│ input=Comment("$<i!'/i`[u2{%Zo;=?**`:ssV`") │
│ 2024-03-18T10:56:28.838525Z INFO spiral_temp_test: │
│ input=Identifier("gJe027248D6rnt9ylkdH73lLX0RlOt") │
│ 2024-03-18T10:56:28.838579Z INFO spiral_temp_test: │
│ input=StringLiteral("=s,+ (S!EnGF'") │
│ 2024-03-18T10:56:28.838615Z INFO spiral_temp_test: │
│ input=Integer(-7912919569377869167) │
│ 2024-03-18T10:56:28.838662Z INFO spiral_temp_test: │
│ input=Identifier("lyssTXpi2982wRy1U") │
│ 2024-03-18T10:56:28.838697Z INFO spiral_temp_test: │
│ input=Identifier("N6e") │
│ 2024-03-18T10:56:28.838732Z INFO spiral_temp_test: │
│ input=Integer(-6187098440491367039) │
│ 2024-03-18T10:56:28.838788Z INFO spiral_temp_test: │
│ input=StringLiteral("/uO'&*}") │
│ 2024-03-18T10:56:28.838839Z INFO spiral_temp_test: │
│ input=StringLiteral("]?TfTX;<u") │
│ 2024-03-18T10:56:28.838893Z INFO spiral_temp_test: │
│ input=StringLiteral(" {i^BlZg<x,,:mI$'fl:zs&/") │
│ 2024-03-18T10:56:28.838954Z INFO spiral_temp_test: │
│ input=Comment("seI3z*L.B&&T") │
│ 2024-03-18T10:56:28.839016Z INFO spiral_temp_test: │
│ input=StringLiteral("11<#t%/wc?B6490b9f/Z{FI") │
│ 2024-03-18T10:56:28.839065Z INFO spiral_temp_test: │
│ input=Operator("-") │
│ 2024-03-18T10:56:28.839099Z INFO spiral_temp_test: │
│ input=Integer(-9192961183448264595) │
│ 2024-03-18T10:56:28.839146Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.839179Z INFO spiral_temp_test: │
│ input=Integer(-6712312885211328281) │
│ 2024-03-18T10:56:28.839221Z INFO spiral_temp_test: │
│ input=StringLiteral("") │
│ 2024-03-18T10:56:28.839260Z INFO spiral_temp_test: │
│ input=Operator(")") │
│ 2024-03-18T10:56:28.839308Z INFO spiral_temp_test: │
│ input=Identifier("n4UpiN") │
│ 2024-03-18T10:56:28.839342Z INFO spiral_temp_test: │
│ input=Integer(-4146113902487316173) │
│ 2024-03-18T10:56:28.839392Z INFO spiral_temp_test: │
│ input=Identifier("GgV6d1ISlju") │
│ 2024-03-18T10:56:28.839449Z INFO spiral_temp_test: │
│ input=StringLiteral("lNcy%Os)b.j.Y=|q@%$< $!9~L^=") │
│ 2024-03-18T10:56:28.839491Z INFO spiral_temp_test: │
│ input=Integer(1818892464877141489) │
│ 2024-03-18T10:56:28.839698Z INFO spiral_temp_test: │
│ input=Identifier("jTOR2") │
│ 2024-03-18T10:56:28.839770Z INFO spiral_temp_test: │
│ input=Identifier("aA9I") │
│ 2024-03-18T10:56:28.839839Z INFO spiral_temp_test: │
│ input=StringLiteral("*WoxIFlccP=&,%$|2@%?=vyp=K") │
│ 2024-03-18T10:56:28.839888Z INFO spiral_temp_test: │
│ input=Integer(-3805044305238109364) │
│ 2024-03-18T10:56:28.839923Z INFO spiral_temp_test: │
│ input=Integer(6773589188528856666) │
│ 2024-03-18T10:56:28.840015Z INFO spiral_temp_test: │
│ input=Identifier("ZsbdmltqSfPUe6HV5C") │
│ 2024-03-18T10:56:28.840104Z INFO spiral_temp_test: │
│ input=StringLiteral("QR<|Hb9lP[g<U7o5#") │
│ 2024-03-18T10:56:28.840150Z INFO spiral_temp_test: │
│ input=Integer(5248688400604230629) │
│ 2024-03-18T10:56:28.840195Z INFO spiral_temp_test: │
│ input=Comment("~:$g\"NZ'q/-\"A{f3sh") │
│ 2024-03-18T10:56:28.840256Z INFO spiral_temp_test: │
│ input=Comment("*/a{y=Si9$3`*rrbI'&&\\\\9ru%") │
│ 2024-03-18T10:56:28.840302Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.840345Z INFO spiral_temp_test: │
│ input=StringLiteral("1&(0N.O;$bu|:5f$") │
│ 2024-03-18T10:56:28.840396Z INFO spiral_temp_test: │
│ input=Comment("*MD2'pMy>`R<W") │
│ 2024-03-18T10:56:28.840434Z INFO spiral_temp_test: │
│ input=Integer(-2606369825957732747) │
│ 2024-03-18T10:56:28.840468Z INFO spiral_temp_test: │
│ input=Operator("(") │
│ 2024-03-18T10:56:28.840495Z INFO spiral_temp_test: │
│ input=Integer(-6273633174408873747) │
│ 2024-03-18T10:56:28.840526Z INFO spiral_temp_test: │
│ input=Integer(6439223201253820011) │
│ 2024-03-18T10:56:28.840582Z INFO spiral_temp_test: │
│ input=StringLiteral("?k/3{Ic$_A") │
│ 2024-03-18T10:56:28.840624Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.840670Z INFO spiral_temp_test: │
│ input=Identifier("M00W4sZxnmbYdw6Y") │
│ 2024-03-18T10:56:28.840712Z INFO spiral_temp_test: │
│ input=Operator("=") │
│ 2024-03-18T10:56:28.840766Z INFO spiral_temp_test: │
│ input=Identifier("h5g") │
│ 2024-03-18T10:56:28.840817Z INFO spiral_temp_test: │
│ input=StringLiteral("rUPGN7V/E~avP[?']C{") │
│ 2024-03-18T10:56:28.840859Z INFO spiral_temp_test: │
│ input=Integer(-2251315335914109216) │
│ 2024-03-18T10:56:28.840908Z INFO spiral_temp_test: │
│ input=StringLiteral("m~=TdTZZV&?NM$Ne0&jvY9{'{R") │
│ 2024-03-18T10:56:28.840962Z INFO spiral_temp_test: │
│ input=Comment("K%v$M<") │
│ 2024-03-18T10:56:28.841036Z INFO spiral_temp_test: │
│ input=StringLiteral("$H<P8e{QVr*<b<v(:D<$z?'#G") │
│ 2024-03-18T10:56:28.841111Z INFO spiral_temp_test: │
│ input=Identifier("oaCW62tAxJ4QQ62O4kiofYL7oMM") │
│ 2024-03-18T10:56:28.841151Z INFO spiral_temp_test: │
│ input=Integer(1788050954698536935) │
│ 2024-03-18T10:56:28.841195Z INFO spiral_temp_test: │
│ input=StringLiteral("<(:.C|{eU:%ALCYt") │
│ 2024-03-18T10:56:28.841249Z INFO spiral_temp_test: │
│ input=Comment("[{Z?G'%F\"A&<-r5'v/n\"(jz\\$") │
│ 2024-03-18T10:56:28.841295Z INFO spiral_temp_test: │
│ input=StringLiteral("=%6q") │
│ 2024-03-18T10:56:28.841344Z INFO spiral_temp_test: │
│ input=Comment("k\"+{$$o4[ppk?T:-/p`qj>J}Kw") │
│ 2024-03-18T10:56:28.841386Z INFO spiral_temp_test: │
│ input=Integer(263833259453250746) │
│ 2024-03-18T10:56:28.841438Z INFO spiral_temp_test: │
│ input=Comment("G\"[.%`, %=&2?\\`F\"?e`H kj7iK") │
│ 2024-03-18T10:56:28.841480Z INFO spiral_temp_test: │
│ input=Integer(-8200894931359329405) │
│ 2024-03-18T10:56:28.841523Z INFO spiral_temp_test: │
│ input=StringLiteral("=&#@C'&XOt&v&;S") │
│ 2024-03-18T10:56:28.841562Z INFO spiral_temp_test: │
│ input=Integer(-8021403473068000567) │
│ 2024-03-18T10:56:28.841609Z INFO spiral_temp_test: │
│ input=StringLiteral("iV]:x`yPZ1z}& yt*]cl*$") │
│ 2024-03-18T10:56:28.841666Z INFO spiral_temp_test: │
│ input=Comment("FOElN`uwN,~7% .V9Ax`q?q") │
│ 2024-03-18T10:56:28.841718Z INFO spiral_temp_test: │
│ input=Identifier("B3tibF0HAR6SS39HBh") │
│ 2024-03-18T10:56:28.841770Z INFO spiral_temp_test: │
│ input=Integer(-7185982801849873297) │
│ 2024-03-18T10:56:28.841803Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.841843Z INFO spiral_temp_test: │
│ input=Identifier("i76wXyikgu") │
│ 2024-03-18T10:56:28.841897Z INFO spiral_temp_test: │
│ input=Identifier("zrvSh5K4dQ6U0lrxxMW8lw610o") │
│ 2024-03-18T10:56:28.841946Z INFO spiral_temp_test: │
│ input=Comment("&Uap%l{Gh<,:PT") │
│ 2024-03-18T10:56:28.841984Z INFO spiral_temp_test: │
│ input=Integer(2862769325075121316) │
│ 2024-03-18T10:56:28.842046Z INFO spiral_temp_test: │
│ input=StringLiteral("o ;./s3vXYd4*W)'PX2'lb") │
│ 2024-03-18T10:56:28.842090Z INFO spiral_temp_test: │
│ input=Identifier("i8arl1f") │
│ 2024-03-18T10:56:28.842131Z INFO spiral_temp_test: │
│ input=StringLiteral("{9_") │
│ 2024-03-18T10:56:28.842167Z INFO spiral_temp_test: │
│ input=Operator("+") │
│ 2024-03-18T10:56:28.842231Z INFO spiral_temp_test: │
│ input=Identifier("Ov6nGReFn4Hc1PyncJmMuVse7oEz2cG") │
│ 2024-03-18T10:56:28.842284Z INFO spiral_temp_test: │
│ input=StringLiteral(";!Rl'#CU") │
│ 2024-03-18T10:56:28.842331Z INFO spiral_temp_test: │
│ input=StringLiteral("?%W($yB:") │
│ 2024-03-18T10:56:28.842379Z INFO spiral_temp_test: │
│ input=Operator("/") │
│ 2024-03-18T10:56:28.842437Z INFO spiral_temp_test: │
│ input=Comment("'?:6<cD%pXRR=6\\@ePr9imd!\\E") │
│ 2024-03-18T10:56:28.842508Z INFO spiral_temp_test: │
│ input=Comment("55;.<)\\'FzBj\"*\"{b.AiP?$={*'") │
│ 2024-03-18T10:56:28.842607Z INFO spiral_temp_test: │
│ input=Operator("*") │
│ 2024-03-18T10:56:28.842684Z INFO spiral_temp_test: │
│ input=Comment("`!1ek~\\") │
│ 2024-03-18T10:56:28.842765Z INFO spiral_temp_test: │
│ input=Identifier("KznAN0AiF") │
│ 2024-03-18T10:56:28.842840Z INFO spiral_temp_test: │
│ input=Identifier("x4xXARZ58BQkxlJXJr00yXXjh6P") │
│ 2024-03-18T10:56:28.842892Z INFO spiral_temp_test: │
│ input=StringLiteral("Iy=:`)E~*~/:4am") │
│ 2024-03-18T10:56:28.842936Z INFO spiral_temp_test: │
│ input=Integer(3877640491728271950) │
│ test prop_parse_format_idempotent ... ok │
│ test │
│ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged ... │
│ ok │
│ │
│ test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │
│ finished in 0.18s │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── pwsh ────────────────────────────────────────────────────────────────────────
{ . $ScriptDir/../../../../target/release/spiral_temp_test$(GetExecutableSuffix)
} | Invoke-Block
╭─[ 91.62ms - stdout ]─────────────────────────────────────────────────────────╮
│ app=test │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook build.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 322748 bytes to build.dib.html
In [ ]:
{ . "$ScriptDir/../apps/plot/build.ps1" } | Invoke-Block
Finished `release` profile [optimized] target(s) in 0.62s
In [ ]:
{ . "$ScriptDir/../lib/spiral/build.ps1" } | Invoke-Block
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 testing.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:03 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:03 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:03 #6 [Verbose] > │ # testing │
00:00:03 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:03 #8 [Verbose] >
00:00:03 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:03 #10 [Verbose] > inl __expect fn log b a =
00:00:03 #11 [Verbose] > inl result = fn a b
00:00:03 #12 [Verbose] > inl result =
00:00:03 #13 [Verbose] > if result
00:00:03 #14 [Verbose] > then result
00:00:03 #15 [Verbose] > else join result
00:00:03 #16 [Verbose] > if log
00:00:03 #17 [Verbose] > then $"$\"__expect / actual: %A{!a} / expected: %A{!b}\""
00:00:03 #18 [Verbose] > else "__expect"
00:00:03 #19 [Verbose] > |> assert result
00:00:03 #20 [Verbose] >
00:00:03 #21 [Verbose] > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |>
00:00:03 #22 [Verbose] > optionm.defaultWith 0.00000001)) log b a
00:00:03 #23 [Verbose] > inl _assert_approx_eq e b a = __assert_approx_eq true e b a
00:00:03 #24 [Verbose] >
00:00:03 #25 [Verbose] > inl __assert_eq log b a = __expect (=) log b a
00:00:03 #26 [Verbose] > inl _assert_eq b a = __assert_eq true b a
00:00:03 #27 [Verbose] >
00:00:03 #28 [Verbose] > inl __assert_ne log b a = __expect (fun a b => a = b |> fun x => join x |> not)
00:00:03 #29 [Verbose] > log b a
00:00:03 #30 [Verbose] > inl _assert_ne b a = __assert_ne true b a
00:00:03 #31 [Verbose] >
00:00:03 #32 [Verbose] > inl __assert_gt log b a = __expect (>) log b a
00:00:03 #33 [Verbose] > inl _assert_gt b a = __assert_gt true b a
00:00:03 #34 [Verbose] >
00:00:03 #35 [Verbose] > inl __assert_ge log b a = __expect (>=) log b a
00:00:03 #36 [Verbose] > inl _assert_ge b a = __assert_ge true b a
00:00:03 #37 [Verbose] >
00:00:03 #38 [Verbose] > inl __assert_lt log b a = __expect (<) log b a
00:00:03 #39 [Verbose] > inl _assert_lt b a = __assert_lt true b a
00:00:03 #40 [Verbose] >
00:00:03 #41 [Verbose] > inl __assert_le log b a = __expect (<=) log b a
00:00:03 #42 [Verbose] > inl _assert_le b a = __assert_le true b a
00:00:03 #43 [Verbose] >
00:00:03 #44 [Verbose] > inl _throws (fn : () -> ()) : option string =
00:00:03 #45 [Verbose] > inl none = None : option string
00:00:03 #46 [Verbose] > inl some (s : string) = Some s
00:00:03 #47 [Verbose] > $"try !fn (); !none with ex -> !some ex.Message"
00:00:07 #48 [Verbose] >
00:00:07 #49 [Verbose] > ╭─[ 4.60s - stdout ]───────────────────────────────────────────────────────────╮
00:00:07 #50 [Verbose] > │ () │
00:00:07 #51 [Verbose] > │ │
00:00:07 #52 [Verbose] > │ │
00:00:07 #53 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #54 [Verbose] >
00:00:07 #55 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #56 [Verbose] > inl print_and_return x =
00:00:07 #57 [Verbose] > $"printfn $\"print_and_return / x: {!x}\""
00:00:07 #58 [Verbose] > x
00:00:07 #59 [Verbose] >
00:00:07 #60 [Verbose] > ╭─[ 263.15ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #61 [Verbose] > │ () │
00:00:07 #62 [Verbose] > │ │
00:00:07 #63 [Verbose] > │ │
00:00:07 #64 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #65 [Verbose] > [NbConvertApp] Converting notebook testing.dib.ipynb to html
00:00:09 #66 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:09 #67 [Verbose] > validate(nb)
00:00:10 #68 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:10 #69 [Verbose] > return _pygments_highlight(
00:00:10 #70 [Verbose] > [NbConvertApp] Writing 279765 bytes to testing.dib.html
00:00:11 #71 [Debug] executeAsync / exitCode: 0 / output.Length: 3300
00:00:11 #72 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 common.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # common │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:03 #8 [Verbose] >
00:00:03 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:03 #10 [Verbose] > // // test
00:00:03 #11 [Verbose] >
00:00:03 #12 [Verbose] > open testing
00:00:07 #13 [Verbose] >
00:00:07 #14 [Verbose] > ╭─[ 4.44s - stdout ]───────────────────────────────────────────────────────────╮
00:00:07 #15 [Verbose] > │ () │
00:00:07 #16 [Verbose] > │ │
00:00:07 #17 [Verbose] > │ │
00:00:07 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #19 [Verbose] >
00:00:07 #20 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #21 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #22 [Verbose] > │ ## types │
00:00:07 #23 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #24 [Verbose] >
00:00:07 #25 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #26 [Verbose] > nominal any = $"obj"
00:00:07 #27 [Verbose] > nominal disposable = $"System.IDisposable"
00:00:07 #28 [Verbose] > nominal exn = $"exn"
00:00:07 #29 [Verbose] > nominal guid = $"System.Guid"
00:00:07 #30 [Verbose] > nominal unativeint = $"unativeint"
00:00:07 #31 [Verbose] >
00:00:07 #32 [Verbose] > let array x = x
00:00:07 #33 [Verbose] >
00:00:07 #34 [Verbose] > inl unativeint forall t {int}. (n : t) : unativeint =
00:00:07 #35 [Verbose] > $"unativeint !n"
00:00:07 #36 [Verbose] >
00:00:07 #37 [Verbose] > ╭─[ 232.95ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #38 [Verbose] > │ () │
00:00:07 #39 [Verbose] > │ │
00:00:07 #40 [Verbose] > │ │
00:00:07 #41 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #42 [Verbose] >
00:00:07 #43 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #44 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #45 [Verbose] > │ ## prototype │
00:00:07 #46 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #47 [Verbose] >
00:00:07 #48 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #49 [Verbose] > prototype (~:>) r : forall t. t -> r
00:00:07 #50 [Verbose] > prototype append t : t -> t -> t
00:00:07 #51 [Verbose] > prototype of_string t : string -> t
00:00:07 #52 [Verbose] > prototype to_string t : t -> string
00:00:07 #53 [Verbose] >
00:00:07 #54 [Verbose] > ╭─[ 180.18ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #55 [Verbose] > │ () │
00:00:07 #56 [Verbose] > │ │
00:00:07 #57 [Verbose] > │ │
00:00:07 #58 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #59 [Verbose] >
00:00:07 #60 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #61 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #62 [Verbose] > │ ## null │
00:00:07 #63 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #64 [Verbose] >
00:00:07 #65 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #66 [Verbose] > inl null forall t. () : t =
00:00:07 #67 [Verbose] > $"null |> unbox<`t>"
00:00:08 #68 [Verbose] >
00:00:08 #69 [Verbose] > ╭─[ 227.81ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #70 [Verbose] > │ () │
00:00:08 #71 [Verbose] > │ │
00:00:08 #72 [Verbose] > │ │
00:00:08 #73 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #74 [Verbose] >
00:00:08 #75 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #76 [Verbose] > inl i64 forall t. (x : t) : i64 =
00:00:08 #77 [Verbose] > $"int64 !x"
00:00:08 #78 [Verbose] >
00:00:08 #79 [Verbose] > ╭─[ 199.80ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #80 [Verbose] > │ () │
00:00:08 #81 [Verbose] > │ │
00:00:08 #82 [Verbose] > │ │
00:00:08 #83 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #84 [Verbose] >
00:00:08 #85 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #86 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #87 [Verbose] > │ ## pair │
00:00:08 #88 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #89 [Verbose] >
00:00:08 #90 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #91 [Verbose] > type pair a b = $"(`a * `b)"
00:00:08 #92 [Verbose] >
00:00:08 #93 [Verbose] > inl pair x y =
00:00:08 #94 [Verbose] > x, y
00:00:08 #95 [Verbose] >
00:00:08 #96 [Verbose] > ╭─[ 200.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #97 [Verbose] > │ () │
00:00:08 #98 [Verbose] > │ │
00:00:08 #99 [Verbose] > │ │
00:00:08 #100 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #101 [Verbose] >
00:00:08 #102 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #103 [Verbose] > // // test
00:00:08 #104 [Verbose] >
00:00:08 #105 [Verbose] > pair 1i32 2i32
00:00:08 #106 [Verbose] > |> _assert_eq (1, 2)
00:00:09 #107 [Verbose] >
00:00:09 #108 [Verbose] > ╭─[ 807.31ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #109 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #110 [Verbose] > │ true │
00:00:09 #111 [Verbose] > │ and method0 () : unit = │
00:00:09 #112 [Verbose] > │ let v0 : bool = method1() │
00:00:09 #113 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (1, 2)} / expected: │
00:00:09 #114 [Verbose] > │ %A{struct (1, 2)}" │
00:00:09 #115 [Verbose] > │ let v2 : bool = v0 = false │
00:00:09 #116 [Verbose] > │ if v2 then │
00:00:09 #117 [Verbose] > │ failwith<unit> v1 │
00:00:09 #118 [Verbose] > │ method0() │
00:00:09 #119 [Verbose] > │ │
00:00:09 #120 [Verbose] > │ │
00:00:09 #121 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #122 [Verbose] >
00:00:09 #123 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #124 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #125 [Verbose] > │ ## new_pair │
00:00:09 #126 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #127 [Verbose] >
00:00:09 #128 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #129 [Verbose] > inl new_pair forall a b. (a : a) (b : b) : pair a b =
00:00:09 #130 [Verbose] > $"!a, !b"
00:00:09 #131 [Verbose] >
00:00:09 #132 [Verbose] > ╭─[ 256.26ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #133 [Verbose] > │ () │
00:00:09 #134 [Verbose] > │ │
00:00:09 #135 [Verbose] > │ │
00:00:09 #136 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #137 [Verbose] >
00:00:09 #138 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #139 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #140 [Verbose] > │ ## from_pair │
00:00:09 #141 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #142 [Verbose] >
00:00:09 #143 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #144 [Verbose] > inl from_pair forall a b. (pair : pair a b) : a * b =
00:00:09 #145 [Verbose] > $"let (a, b) = !pair"
00:00:09 #146 [Verbose] > $"a", $"b"
00:00:09 #147 [Verbose] >
00:00:09 #148 [Verbose] > ╭─[ 246.58ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #149 [Verbose] > │ () │
00:00:09 #150 [Verbose] > │ │
00:00:09 #151 [Verbose] > │ │
00:00:09 #152 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #153 [Verbose] >
00:00:09 #154 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #155 [Verbose] > // // test
00:00:09 #156 [Verbose] >
00:00:09 #157 [Verbose] > new_pair "a" 1i32
00:00:09 #158 [Verbose] > |> from_pair
00:00:09 #159 [Verbose] > |> _assert_eq ("a", 1i32)
00:00:10 #160 [Verbose] >
00:00:10 #161 [Verbose] > ╭─[ 319.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #162 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:10 #163 [Verbose] > │ v0 │
00:00:10 #164 [Verbose] > │ and method0 () : unit = │
00:00:10 #165 [Verbose] > │ let v0 : string = "a" │
00:00:10 #166 [Verbose] > │ let v1 : (string * int32) = v0, 1 │
00:00:10 #167 [Verbose] > │ let (a, b) = v1 │
00:00:10 #168 [Verbose] > │ let v2 : string = a │
00:00:10 #169 [Verbose] > │ let v3 : int32 = b │
00:00:10 #170 [Verbose] > │ let v4 : bool = v2 = "a" │
00:00:10 #171 [Verbose] > │ let v6 : bool = │
00:00:10 #172 [Verbose] > │ if v4 then │
00:00:10 #173 [Verbose] > │ let v5 : bool = v3 = 1 │
00:00:10 #174 [Verbose] > │ v5 │
00:00:10 #175 [Verbose] > │ else │
00:00:10 #176 [Verbose] > │ false │
00:00:10 #177 [Verbose] > │ let v7 : bool = method1(v6) │
00:00:10 #178 [Verbose] > │ let v8 : string = $"__expect / actual: %A{struct (v2, v3)} / expected: │
00:00:10 #179 [Verbose] > │ %A{struct (v0, 1)}" │
00:00:10 #180 [Verbose] > │ let v9 : bool = v7 = false │
00:00:10 #181 [Verbose] > │ if v9 then │
00:00:10 #182 [Verbose] > │ failwith<unit> v8 │
00:00:10 #183 [Verbose] > │ method0() │
00:00:10 #184 [Verbose] > │ │
00:00:10 #185 [Verbose] > │ │
00:00:10 #186 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #187 [Verbose] >
00:00:10 #188 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #189 [Verbose] > // // test
00:00:10 #190 [Verbose] >
00:00:10 #191 [Verbose] > new_pair "a" (new_pair 1i32 "b")
00:00:10 #192 [Verbose] > |> from_pair
00:00:10 #193 [Verbose] >
00:00:10 #194 [Verbose] > ╭─[ 357.49ms - return value ]──────────────────────────────────────────────────╮
00:00:10 #195 [Verbose] > │ <details open="open" class="dni-treeview"><summary><span │
00:00:10 #196 [Verbose] > │ class="dni-code-hint"><code>(a, (1, │
00:00:10 #197 [Verbose] > │ b))</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │
00:00:10 #198 [Verbose] > │ d>Item1</td><td><div │
00:00:10 #199 [Verbose] > │ class="dni-plaintext"><pre>a</pre></div></td></tr><tr><td>Item2</td><td><det │
00:00:10 #200 [Verbose] > │ ails class="dni-treeview"><summary><span class="dni-code-hint"><code>(1, │
00:00:10 #201 [Verbose] > │ b)</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │
00:00:10 #202 [Verbose] > │ >Item1</td><td><div │
00:00:10 #203 [Verbose] > │ class="dni-plaintext"><pre>1</pre></div></td></tr><tr><td>Item2</td><td><div │
00:00:10 #204 [Verbose] > │ class="dni-plaintext"><pre>b</pre></div></td></tr></tbody></table></div></de │
00:00:10 #205 [Verbose] > │ tails></td></tr></tbody></table></div></details><style> │
00:00:10 #206 [Verbose] > │ .dni-code-hint { │
00:00:10 #207 [Verbose] > │ font-style: italic; │
00:00:10 #208 [Verbose] > │ overflow: hidden; │
00:00:10 #209 [Verbose] > │ white-space: nowrap; │
00:00:10 #210 [Verbose] > │ } │
00:00:10 #211 [Verbose] > │ .dni-treev... │
00:00:10 #212 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #213 [Verbose] >
00:00:10 #214 [Verbose] > ╭─[ 376.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #215 [Verbose] > │ let rec method0 () : struct (string * (int32 * string)) = │
00:00:10 #216 [Verbose] > │ let v0 : string = "b" │
00:00:10 #217 [Verbose] > │ let v1 : (int32 * string) = 1, v0 │
00:00:10 #218 [Verbose] > │ let v2 : string = "a" │
00:00:10 #219 [Verbose] > │ let v3 : (string * (int32 * string)) = v2, v1 │
00:00:10 #220 [Verbose] > │ let (a, b) = v3 │
00:00:10 #221 [Verbose] > │ let v4 : string = a │
00:00:10 #222 [Verbose] > │ let v5 : (int32 * string) = b │
00:00:10 #223 [Verbose] > │ struct (v4, v5) │
00:00:10 #224 [Verbose] > │ method0() │
00:00:10 #225 [Verbose] > │ │
00:00:10 #226 [Verbose] > │ │
00:00:10 #227 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #228 [Verbose] >
00:00:10 #229 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #230 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #231 [Verbose] > │ ## log_level_type │
00:00:10 #232 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #233 [Verbose] >
00:00:10 #234 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #235 [Verbose] > union log_level_type =
00:00:10 #236 [Verbose] > | Verbose
00:00:10 #237 [Verbose] > | Debug
00:00:10 #238 [Verbose] > | Info
00:00:10 #239 [Verbose] > | Warning
00:00:10 #240 [Verbose] > | Critical
00:00:10 #241 [Verbose] >
00:00:10 #242 [Verbose] > instance to_string log_level_type = function
00:00:10 #243 [Verbose] > | Verbose => "Verbose"
00:00:10 #244 [Verbose] > | Debug => "Debug"
00:00:10 #245 [Verbose] > | Info => "Info"
00:00:10 #246 [Verbose] > | Warning => "Warning"
00:00:10 #247 [Verbose] > | Critical => "Critical"
00:00:10 #248 [Verbose] >
00:00:10 #249 [Verbose] > instance of_string log_level_type = function
00:00:10 #250 [Verbose] > | "Verbose" => Verbose
00:00:10 #251 [Verbose] > | "Debug" => Debug
00:00:10 #252 [Verbose] > | "Info" => Info
00:00:10 #253 [Verbose] > | "Warning" => Warning
00:00:10 #254 [Verbose] > | "Critical" => Critical
00:00:10 #255 [Verbose] >
00:00:10 #256 [Verbose] > ╭─[ 298.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #257 [Verbose] > │ () │
00:00:10 #258 [Verbose] > │ │
00:00:10 #259 [Verbose] > │ │
00:00:10 #260 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #261 [Verbose] >
00:00:10 #262 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #263 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #264 [Verbose] > │ ## to_any │
00:00:10 #265 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #266 [Verbose] >
00:00:10 #267 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #268 [Verbose] > inl to_any forall t. (obj : t) : any =
00:00:10 #269 [Verbose] > $"!obj"
00:00:10 #270 [Verbose] >
00:00:10 #271 [Verbose] > instance (~:>) any = to_any
00:00:11 #272 [Verbose] >
00:00:11 #273 [Verbose] > ╭─[ 260.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #274 [Verbose] > │ () │
00:00:11 #275 [Verbose] > │ │
00:00:11 #276 [Verbose] > │ │
00:00:11 #277 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #278 [Verbose] >
00:00:11 #279 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #280 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #281 [Verbose] > │ ## (/@) │
00:00:11 #282 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #283 [Verbose] >
00:00:11 #284 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #285 [Verbose] > inl (/@) a b =
00:00:11 #286 [Verbose] > b |> append a
00:00:11 #287 [Verbose] >
00:00:11 #288 [Verbose] > ╭─[ 418.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #289 [Verbose] > │ () │
00:00:11 #290 [Verbose] > │ │
00:00:11 #291 [Verbose] > │ │
00:00:11 #292 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #293 [Verbose] >
00:00:11 #294 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #295 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #296 [Verbose] > │ ## unbox │
00:00:11 #297 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #298 [Verbose] >
00:00:11 #299 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #300 [Verbose] > inl unbox forall t u. (x : t) : u =
00:00:11 #301 [Verbose] > $"!x |> unbox<`u>"
00:00:11 #302 [Verbose] >
00:00:11 #303 [Verbose] > ╭─[ 208.30ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #304 [Verbose] > │ () │
00:00:11 #305 [Verbose] > │ │
00:00:11 #306 [Verbose] > │ │
00:00:11 #307 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #308 [Verbose] >
00:00:11 #309 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #310 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #311 [Verbose] > │ ## (/+) │
00:00:11 #312 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #313 [Verbose] >
00:00:11 #314 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #315 [Verbose] > inl (/+) forall t. (a : t) (b : t) : t =
00:00:11 #316 [Verbose] > $"!a + !b"
00:00:11 #317 [Verbose] >
00:00:11 #318 [Verbose] > ╭─[ 181.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #319 [Verbose] > │ () │
00:00:11 #320 [Verbose] > │ │
00:00:11 #321 [Verbose] > │ │
00:00:11 #322 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #323 [Verbose] >
00:00:11 #324 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #325 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #326 [Verbose] > │ ## (||>) │
00:00:11 #327 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #328 [Verbose] >
00:00:11 #329 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #330 [Verbose] > inl (||>) (arg1, arg2) fn =
00:00:11 #331 [Verbose] > arg2 |> fn arg1
00:00:12 #332 [Verbose] >
00:00:12 #333 [Verbose] > ╭─[ 181.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #334 [Verbose] > │ () │
00:00:12 #335 [Verbose] > │ │
00:00:12 #336 [Verbose] > │ │
00:00:12 #337 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #338 [Verbose] >
00:00:12 #339 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #340 [Verbose] > // // test
00:00:12 #341 [Verbose] >
00:00:12 #342 [Verbose] > (3i32, 2i32)
00:00:12 #343 [Verbose] > ||> fun a b => a - b
00:00:12 #344 [Verbose] > |> _assert_eq 1
00:00:12 #345 [Verbose] >
00:00:12 #346 [Verbose] > ╭─[ 225.04ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #347 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #348 [Verbose] > │ true │
00:00:12 #349 [Verbose] > │ and method0 () : unit = │
00:00:12 #350 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #351 [Verbose] > │ let v1 : string = $"__expect / actual: %A{1} / expected: %A{1}" │
00:00:12 #352 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #353 [Verbose] > │ if v2 then │
00:00:12 #354 [Verbose] > │ failwith<unit> v1 │
00:00:12 #355 [Verbose] > │ method0() │
00:00:12 #356 [Verbose] > │ │
00:00:12 #357 [Verbose] > │ │
00:00:12 #358 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #359 [Verbose] >
00:00:12 #360 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #361 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #362 [Verbose] > │ ## flip │
00:00:12 #363 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #364 [Verbose] >
00:00:12 #365 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #366 [Verbose] > inl flip fn a b =
00:00:12 #367 [Verbose] > fn b a
00:00:12 #368 [Verbose] >
00:00:12 #369 [Verbose] > ╭─[ 204.67ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #370 [Verbose] > │ () │
00:00:12 #371 [Verbose] > │ │
00:00:12 #372 [Verbose] > │ │
00:00:12 #373 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #374 [Verbose] >
00:00:12 #375 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #376 [Verbose] > // // test
00:00:12 #377 [Verbose] >
00:00:12 #378 [Verbose] > (1i32, 2i32)
00:00:12 #379 [Verbose] > ||> flip pair
00:00:12 #380 [Verbose] > |> _assert_eq (2, 1)
00:00:12 #381 [Verbose] >
00:00:12 #382 [Verbose] > ╭─[ 207.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #383 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #384 [Verbose] > │ true │
00:00:12 #385 [Verbose] > │ and method0 () : unit = │
00:00:12 #386 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #387 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (2, 1)} / expected: │
00:00:12 #388 [Verbose] > │ %A{struct (2, 1)}" │
00:00:12 #389 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #390 [Verbose] > │ if v2 then │
00:00:12 #391 [Verbose] > │ failwith<unit> v1 │
00:00:12 #392 [Verbose] > │ method0() │
00:00:12 #393 [Verbose] > │ │
00:00:12 #394 [Verbose] > │ │
00:00:12 #395 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #396 [Verbose] >
00:00:12 #397 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #398 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #399 [Verbose] > │ ## join_body │
00:00:12 #400 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #401 [Verbose] >
00:00:12 #402 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #403 [Verbose] > inl join_body body acc x =
00:00:12 #404 [Verbose] > if var_is x |> not
00:00:12 #405 [Verbose] > then body acc x
00:00:12 #406 [Verbose] > else
00:00:12 #407 [Verbose] > inl acc = dyn acc
00:00:12 #408 [Verbose] > join body acc x
00:00:12 #409 [Verbose] >
00:00:12 #410 [Verbose] > ╭─[ 183.45ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #411 [Verbose] > │ () │
00:00:12 #412 [Verbose] > │ │
00:00:12 #413 [Verbose] > │ │
00:00:12 #414 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #415 [Verbose] >
00:00:12 #416 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #417 [Verbose] > // // test
00:00:12 #418 [Verbose] >
00:00:12 #419 [Verbose] > inl rec fold_list f s = function
00:00:12 #420 [Verbose] > | Cons (x, x') => fold_list f (f s x) x'
00:00:12 #421 [Verbose] > | Nil => s
00:00:13 #422 [Verbose] >
00:00:13 #423 [Verbose] > ╭─[ 232.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #424 [Verbose] > │ () │
00:00:13 #425 [Verbose] > │ │
00:00:13 #426 [Verbose] > │ │
00:00:13 #427 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #428 [Verbose] >
00:00:13 #429 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #430 [Verbose] > // // test
00:00:13 #431 [Verbose] >
00:00:13 #432 [Verbose] > [[5i32; 4; join 3; 2; 1]]
00:00:13 #433 [Verbose] > |> fold_list (+) 0
00:00:13 #434 [Verbose] > |> _assert_eq 15
00:00:13 #435 [Verbose] >
00:00:13 #436 [Verbose] > ╭─[ 300.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #437 [Verbose] > │ let rec method1 () : int32 = │
00:00:13 #438 [Verbose] > │ 3 │
00:00:13 #439 [Verbose] > │ and method2 (v0 : bool) : bool = │
00:00:13 #440 [Verbose] > │ v0 │
00:00:13 #441 [Verbose] > │ and method0 () : unit = │
00:00:13 #442 [Verbose] > │ let v0 : int32 = method1() │
00:00:13 #443 [Verbose] > │ let v1 : int32 = 9 + v0 │
00:00:13 #444 [Verbose] > │ let v2 : int32 = v1 + 2 │
00:00:13 #445 [Verbose] > │ let v3 : int32 = v2 + 1 │
00:00:13 #446 [Verbose] > │ let v4 : bool = v3 = 15 │
00:00:13 #447 [Verbose] > │ let v5 : bool = method2(v4) │
00:00:13 #448 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v3} / expected: %A{15}" │
00:00:13 #449 [Verbose] > │ let v7 : bool = v5 = false │
00:00:13 #450 [Verbose] > │ if v7 then │
00:00:13 #451 [Verbose] > │ failwith<unit> v6 │
00:00:13 #452 [Verbose] > │ method0() │
00:00:13 #453 [Verbose] > │ │
00:00:13 #454 [Verbose] > │ │
00:00:13 #455 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #456 [Verbose] >
00:00:13 #457 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #458 [Verbose] > // // test
00:00:13 #459 [Verbose] >
00:00:13 #460 [Verbose] > [[5i32; 4; join 3; 2; 1]]
00:00:13 #461 [Verbose] > |> fold_list (join_body (+)) 0
00:00:13 #462 [Verbose] > |> _assert_eq 15
00:00:13 #463 [Verbose] >
00:00:13 #464 [Verbose] > ╭─[ 222.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #465 [Verbose] > │ let rec method1 () : int32 = │
00:00:13 #466 [Verbose] > │ 3 │
00:00:13 #467 [Verbose] > │ and method2 (v0 : int32, v1 : int32) : int32 = │
00:00:13 #468 [Verbose] > │ let v2 : int32 = v1 + v0 │
00:00:13 #469 [Verbose] > │ v2 │
00:00:13 #470 [Verbose] > │ and method3 (v0 : bool) : bool = │
00:00:13 #471 [Verbose] > │ v0 │
00:00:13 #472 [Verbose] > │ and method0 () : unit = │
00:00:13 #473 [Verbose] > │ let v0 : int32 = method1() │
00:00:13 #474 [Verbose] > │ let v1 : int32 = 9 │
00:00:13 #475 [Verbose] > │ let v2 : int32 = method2(v0, v1) │
00:00:13 #476 [Verbose] > │ let v3 : int32 = v2 + 2 │
00:00:13 #477 [Verbose] > │ let v4 : int32 = v3 + 1 │
00:00:13 #478 [Verbose] > │ let v5 : bool = v4 = 15 │
00:00:13 #479 [Verbose] > │ let v6 : bool = method3(v5) │
00:00:13 #480 [Verbose] > │ let v7 : string = $"__expect / actual: %A{v4} / expected: %A{15}" │
00:00:13 #481 [Verbose] > │ let v8 : bool = v6 = false │
00:00:13 #482 [Verbose] > │ if v8 then │
00:00:13 #483 [Verbose] > │ failwith<unit> v7 │
00:00:13 #484 [Verbose] > │ method0() │
00:00:13 #485 [Verbose] > │ │
00:00:13 #486 [Verbose] > │ │
00:00:13 #487 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #488 [Verbose] >
00:00:13 #489 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #490 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #491 [Verbose] > │ ## join_body_unit │
00:00:13 #492 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #493 [Verbose] >
00:00:13 #494 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #495 [Verbose] > inl join_body_unit body d x =
00:00:13 #496 [Verbose] > if var_is d |> not
00:00:13 #497 [Verbose] > then body x
00:00:13 #498 [Verbose] > else
00:00:13 #499 [Verbose] > inl x = dyn x
00:00:13 #500 [Verbose] > join body x
00:00:13 #501 [Verbose] >
00:00:13 #502 [Verbose] > ╭─[ 220.37ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #503 [Verbose] > │ () │
00:00:13 #504 [Verbose] > │ │
00:00:13 #505 [Verbose] > │ │
00:00:13 #506 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #507 [Verbose] >
00:00:13 #508 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #509 [Verbose] > // // test
00:00:13 #510 [Verbose] >
00:00:13 #511 [Verbose] > [[5i32; 4; join 3; 2; 1]]
00:00:13 #512 [Verbose] > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0
00:00:13 #513 [Verbose] > |> _assert_eq 15
00:00:14 #514 [Verbose] >
00:00:14 #515 [Verbose] > ╭─[ 259.68ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #516 [Verbose] > │ let rec method1 () : int32 = │
00:00:14 #517 [Verbose] > │ 3 │
00:00:14 #518 [Verbose] > │ and method2 (v0 : int32) : int32 = │
00:00:14 #519 [Verbose] > │ let v1 : int32 = 9 + v0 │
00:00:14 #520 [Verbose] > │ v1 │
00:00:14 #521 [Verbose] > │ and method3 (v0 : bool) : bool = │
00:00:14 #522 [Verbose] > │ v0 │
00:00:14 #523 [Verbose] > │ and method0 () : unit = │
00:00:14 #524 [Verbose] > │ let v0 : int32 = method1() │
00:00:14 #525 [Verbose] > │ let v1 : int32 = method2(v0) │
00:00:14 #526 [Verbose] > │ let v2 : int32 = v1 + 2 │
00:00:14 #527 [Verbose] > │ let v3 : int32 = v2 + 1 │
00:00:14 #528 [Verbose] > │ let v4 : bool = v3 = 15 │
00:00:14 #529 [Verbose] > │ let v5 : bool = method3(v4) │
00:00:14 #530 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v3} / expected: %A{15}" │
00:00:14 #531 [Verbose] > │ let v7 : bool = v5 = false │
00:00:14 #532 [Verbose] > │ if v7 then │
00:00:14 #533 [Verbose] > │ failwith<unit> v6 │
00:00:14 #534 [Verbose] > │ method0() │
00:00:14 #535 [Verbose] > │ │
00:00:14 #536 [Verbose] > │ │
00:00:14 #537 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #538 [Verbose] >
00:00:14 #539 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #540 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #541 [Verbose] > │ ## run_target │
00:00:14 #542 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #543 [Verbose] >
00:00:14 #544 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #545 [Verbose] > union target_runtime =
00:00:14 #546 [Verbose] > | Native
00:00:14 #547 [Verbose] > | Wasm
00:00:14 #548 [Verbose] >
00:00:14 #549 [Verbose] > union target =
00:00:14 #550 [Verbose] > | Rust : target_runtime
00:00:14 #551 [Verbose] > | Fsharp
00:00:14 #552 [Verbose] >
00:00:14 #553 [Verbose] > inl run_target forall t. (fn : target -> (() -> t)) : t =
00:00:14 #554 [Verbose] > $"let mutable result = None"
00:00:14 #555 [Verbose] > $"#if FABLE_COMPILER_RUST"
00:00:14 #556 [Verbose] > $"#if \!WASM"
00:00:14 #557 [Verbose] > fn (Rust Native) () |> fun x => $"!x"
00:00:14 #558 [Verbose] > $"#else"
00:00:14 #559 [Verbose] > fn (Rust Wasm) () |> fun x => $"!x"
00:00:14 #560 [Verbose] > $"#endif"
00:00:14 #561 [Verbose] > $"#else"
00:00:14 #562 [Verbose] > fn Fsharp () |> fun x => $"!x"
00:00:14 #563 [Verbose] > $"#endif"
00:00:14 #564 [Verbose] > $"|> fun x -> result <- Some x"
00:00:14 #565 [Verbose] > $"result |> Option.get"
00:00:14 #566 [Verbose] >
00:00:14 #567 [Verbose] > ╭─[ 241.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #568 [Verbose] > │ () │
00:00:14 #569 [Verbose] > │ │
00:00:14 #570 [Verbose] > │ │
00:00:14 #571 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #572 [Verbose] >
00:00:14 #573 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #574 [Verbose] > // // test
00:00:14 #575 [Verbose] >
00:00:14 #576 [Verbose] > run_target function
00:00:14 #577 [Verbose] > | Fsharp => fun () => $"1uy"
00:00:14 #578 [Verbose] > | Rust (Native) => fun () => $"2uy"
00:00:14 #579 [Verbose] > | Rust (Wasm) => fun () => $"3uy"
00:00:14 #580 [Verbose] > |> _assert_eq 1u8
00:00:14 #581 [Verbose] >
00:00:14 #582 [Verbose] > ╭─[ 292.33ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #583 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:14 #584 [Verbose] > │ v0 │
00:00:14 #585 [Verbose] > │ and method0 () : unit = │
00:00:14 #586 [Verbose] > │ let mutable result = None │
00:00:14 #587 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:14 #588 [Verbose] > │ #if !WASM │
00:00:14 #589 [Verbose] > │ let v0 : uint8 = 2uy │
00:00:14 #590 [Verbose] > │ v0 │
00:00:14 #591 [Verbose] > │ #else │
00:00:14 #592 [Verbose] > │ let v1 : uint8 = 3uy │
00:00:14 #593 [Verbose] > │ v1 │
00:00:14 #594 [Verbose] > │ #endif │
00:00:14 #595 [Verbose] > │ #else │
00:00:14 #596 [Verbose] > │ let v2 : uint8 = 1uy │
00:00:14 #597 [Verbose] > │ v2 │
00:00:14 #598 [Verbose] > │ #endif │
00:00:14 #599 [Verbose] > │ |> fun x -> result <- Some x │
00:00:14 #600 [Verbose] > │ let v3 : uint8 = result |> Option.get │
00:00:14 #601 [Verbose] > │ let v4 : bool = v3 = 1uy │
00:00:14 #602 [Verbose] > │ let v5 : bool = method1(v4) │
00:00:14 #603 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v3} / expected: %A{1uy}" │
00:00:14 #604 [Verbose] > │ let v7 : bool = v5 = false │
00:00:14 #605 [Verbose] > │ if v7 then │
00:00:14 #606 [Verbose] > │ failwith<unit> v6 │
00:00:14 #607 [Verbose] > │ method0() │
00:00:14 #608 [Verbose] > │ │
00:00:14 #609 [Verbose] > │ │
00:00:14 #610 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #611 [Verbose] >
00:00:14 #612 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #613 [Verbose] > // // test
00:00:14 #614 [Verbose] > // // rust=
00:00:14 #615 [Verbose] >
00:00:14 #616 [Verbose] > run_target function
00:00:14 #617 [Verbose] > | Fsharp => fun () => $"1uy"
00:00:14 #618 [Verbose] > | Rust (Native) => fun () => $"2uy"
00:00:14 #619 [Verbose] > | Rust (Wasm) => fun () => $"3uy"
00:00:14 #620 [Verbose] > |> (=) 2u8
00:00:14 #621 [Verbose] > |> _assert_eq true
00:00:20 #622 [Verbose] >
00:00:20 #623 [Verbose] > ╭─[ 5.41s - return value ]─────────────────────────────────────────────────────╮
00:00:20 #624 [Verbose] > │ .rs output: │
00:00:20 #625 [Verbose] > │ │
00:00:20 #626 [Verbose] > │ │
00:00:20 #627 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #628 [Verbose] >
00:00:20 #629 [Verbose] > ╭─[ 5.41s - stdout ]───────────────────────────────────────────────────────────╮
00:00:20 #630 [Verbose] > │ │
00:00:20 #631 [Verbose] > │ .fsx: │
00:00:20 #632 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:20 #633 [Verbose] > │ v0 │
00:00:20 #634 [Verbose] > │ and method0 () : unit = │
00:00:20 #635 [Verbose] > │ let mutable result = None │
00:00:20 #636 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:20 #637 [Verbose] > │ #if !WASM │
00:00:20 #638 [Verbose] > │ let v0 : uint8 = 2uy │
00:00:20 #639 [Verbose] > │ v0 │
00:00:20 #640 [Verbose] > │ #else │
00:00:20 #641 [Verbose] > │ let v1 : uint8 = 3uy │
00:00:20 #642 [Verbose] > │ v1 │
00:00:20 #643 [Verbose] > │ #endif │
00:00:20 #644 [Verbose] > │ #else │
00:00:20 #645 [Verbose] > │ let v2 : uint8 = 1uy │
00:00:20 #646 [Verbose] > │ v2 │
00:00:20 #647 [Verbose] > │ #endif │
00:00:20 #648 [Verbose] > │ |> fun x -> result <- Some x │
00:00:20 #649 [Verbose] > │ let v3 : uint8 = result |> Option.get │
00:00:20 #650 [Verbose] > │ let v4 : bool = 2uy = v3 │
00:00:20 #651 [Verbose] > │ let v5 : bool = method1(v4) │
00:00:20 #652 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{true}" │
00:00:20 #653 [Verbose] > │ let v7 : bool = v5 = false │
00:00:20 #654 [Verbose] > │ if v7 then │
00:00:20 #655 [Verbose] > │ failwith<unit> v6 │
00:00:20 #656 [Verbose] > │ method0() │
00:00:20 #657 [Verbose] > │ │
00:00:20 #658 [Verbose] > │ .rs: │
00:00:20 #659 [Verbose] > │ #![allow(dead_code,)] │
00:00:20 #660 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:20 #661 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:20 #662 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:20 #663 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:20 #664 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:20 #665 [Verbose] > │ #![allow(unused_imports,)] │
00:00:20 #666 [Verbose] > │ #![allow(unused_macros,)] │
00:00:20 #667 [Verbose] > │ #![allow(unused_parens,)] │
00:00:20 #668 [Verbose] > │ #![allow(unused_variables,)] │
00:00:20 #669 [Verbose] > │ mod module_ccfa04bf { │
00:00:20 #670 [Verbose] > │ pub mod Spiral_eval { │
00:00:20 #671 [Verbose] > │ use super::*; │
00:00:20 #672 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:20 #673 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:20 #674 [Verbose] > │ use fable_library_rust::Option_::getValue; │
00:00:20 #675 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:20 #676 [Verbose] > │ pub fn method1(v0: bool) -> bool { v0 } │
00:00:20 #677 [Verbose] > │ pub fn method0() { │
00:00:20 #678 [Verbose] > │ let result: MutCell<Option<u8>> = MutCell::new(None::<u8>); │
00:00:20 #679 [Verbose] > │ result.set(Some(2_u8)); │
00:00:20 #680 [Verbose] > │ { │
00:00:20 #681 [Verbose] > │ let v4: bool = 2_u8 == getValue(result.get().clone()); │
00:00:20 #682 [Verbose] > │ if Spiral_eval::method1(v4) == false { │
00:00:20 #683 [Verbose] > │ panic!("{}", │
00:00:20 #684 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: │
00:00:20 #685 [Verbose] > │ {:?}", v4, true)); │
00:00:20 #686 [Verbose] > │ } │
00:00:20 #687 [Verbose] > │ } │
00:00:20 #688 [Verbose] > │ } │
00:00:20 #689 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:20 #690 [Verbose] > │ } │
00:00:20 #691 [Verbose] > │ } │
00:00:20 #692 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:20 #693 [Verbose] > │ │
00:00:20 #694 [Verbose] > │ │
00:00:20 #695 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #696 [Verbose] >
00:00:20 #697 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 #698 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 #699 [Verbose] > │ ## nameof │
00:00:20 #700 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #701 [Verbose] >
00:00:20 #702 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #703 [Verbose] > inl nameof x : string =
00:00:20 #704 [Verbose] > $"nameof !x"
00:00:20 #705 [Verbose] >
00:00:20 #706 [Verbose] > ╭─[ 202.09ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #707 [Verbose] > │ () │
00:00:20 #708 [Verbose] > │ │
00:00:20 #709 [Verbose] > │ │
00:00:20 #710 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #711 [Verbose] >
00:00:20 #712 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 #713 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 #714 [Verbose] > │ ## get_environment_variable │
00:00:20 #715 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #716 [Verbose] >
00:00:20 #717 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #718 [Verbose] > inl get_environment_variable (var : string) : string =
00:00:20 #719 [Verbose] > $"System.Environment.GetEnvironmentVariable !var"
00:00:20 #720 [Verbose] >
00:00:20 #721 [Verbose] > ╭─[ 276.71ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #722 [Verbose] > │ () │
00:00:20 #723 [Verbose] > │ │
00:00:20 #724 [Verbose] > │ │
00:00:20 #725 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #726 [Verbose] >
00:00:20 #727 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 #728 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 #729 [Verbose] > │ ## new_raw_guid │
00:00:20 #730 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #731 [Verbose] >
00:00:20 #732 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #733 [Verbose] > inl new_raw_guid () : guid =
00:00:20 #734 [Verbose] > $"`guid.NewGuid ()"
00:00:20 #735 [Verbose] >
00:00:20 #736 [Verbose] > ╭─[ 246.66ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #737 [Verbose] > │ () │
00:00:20 #738 [Verbose] > │ │
00:00:20 #739 [Verbose] > │ │
00:00:20 #740 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 #741 [Verbose] > [NbConvertApp] Converting notebook common.dib.ipynb to html
00:00:23 #742 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:23 #743 [Verbose] > validate(nb)
00:00:23 #744 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:23 #745 [Verbose] > return _pygments_highlight(
00:00:24 #746 [Verbose] > [NbConvertApp] Writing 338104 bytes to common.dib.html
00:00:25 #747 [Debug] executeAsync / exitCode: 0 / output.Length: 43941
00:00:25 #748 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 console.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # console │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.15s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 #22 [Verbose] > │ ## write_line │
00:00:06 #23 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #24 [Verbose] >
00:00:06 #25 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #26 [Verbose] > inl write_line obj : () =
00:00:06 #27 [Verbose] > $"System.Console.WriteLine !obj"
00:00:07 #28 [Verbose] >
00:00:07 #29 [Verbose] > ╭─[ 263.90ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #30 [Verbose] > │ () │
00:00:07 #31 [Verbose] > │ │
00:00:07 #32 [Verbose] > │ │
00:00:07 #33 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #34 [Verbose] >
00:00:07 #35 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #36 [Verbose] > inl write_line_ ~obj : () =
00:00:07 #37 [Verbose] > $"System.Console.WriteLine !obj"
00:00:07 #38 [Verbose] >
00:00:07 #39 [Verbose] > ╭─[ 465.42ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #40 [Verbose] > │ () │
00:00:07 #41 [Verbose] > │ │
00:00:07 #42 [Verbose] > │ │
00:00:07 #43 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #44 [Verbose] >
00:00:07 #45 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #46 [Verbose] > nominal console_color = $"System.ConsoleColor"
00:00:07 #47 [Verbose] >
00:00:07 #48 [Verbose] > inl reset_color () : () =
00:00:07 #49 [Verbose] > run_target function
00:00:07 #50 [Verbose] > | Fsharp => fun () => $"System.Console.ResetColor ()"
00:00:07 #51 [Verbose] > | _ => fun () => ()
00:00:07 #52 [Verbose] >
00:00:07 #53 [Verbose] > inl set_foreground_color (color : console_color) : () =
00:00:07 #54 [Verbose] > run_target function
00:00:07 #55 [Verbose] > | Fsharp => fun () => $"System.Console.ForegroundColor <- !color"
00:00:07 #56 [Verbose] > | _ => fun () => ()
00:00:07 #57 [Verbose] >
00:00:07 #58 [Verbose] > ╭─[ 227.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #59 [Verbose] > │ () │
00:00:07 #60 [Verbose] > │ │
00:00:07 #61 [Verbose] > │ │
00:00:07 #62 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #63 [Verbose] > [NbConvertApp] Converting notebook console.dib.ipynb to html
00:00:09 #64 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:09 #65 [Verbose] > validate(nb)
00:00:10 #66 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:10 #67 [Verbose] > return _pygments_highlight(
00:00:10 #68 [Verbose] > [NbConvertApp] Writing 276933 bytes to console.dib.html
00:00:11 #69 [Debug] executeAsync / exitCode: 0 / output.Length: 3869
00:00:11 #70 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 math.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # math │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.14s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > // // test
00:00:06 #22 [Verbose] >
00:00:06 #23 [Verbose] > 2 * 2 / 0.4f64 |> sqrt
00:00:06 #24 [Verbose] > |> _assert_approx_eq None 3.1622776601683795
00:00:07 #25 [Verbose] >
00:00:07 #26 [Verbose] > ╭─[ 763.82ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #27 [Verbose] > │ let rec method1 () : bool = │
00:00:07 #28 [Verbose] > │ true │
00:00:07 #29 [Verbose] > │ and method0 () : unit = │
00:00:07 #30 [Verbose] > │ let v0 : bool = method1() │
00:00:07 #31 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3.1622776601683795} / │
00:00:07 #32 [Verbose] > │ expected: %A{3.1622776601683795}" │
00:00:07 #33 [Verbose] > │ let v2 : bool = v0 = false │
00:00:07 #34 [Verbose] > │ if v2 then │
00:00:07 #35 [Verbose] > │ failwith<unit> v1 │
00:00:07 #36 [Verbose] > │ method0() │
00:00:07 #37 [Verbose] > │ │
00:00:07 #38 [Verbose] > │ │
00:00:07 #39 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #40 [Verbose] >
00:00:07 #41 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #42 [Verbose] > // // test
00:00:07 #43 [Verbose] >
00:00:07 #44 [Verbose] > 2f64 / 3
00:00:07 #45 [Verbose] > |> _assert_approx_eq None 0.6666666666666666
00:00:07 #46 [Verbose] >
00:00:07 #47 [Verbose] > ╭─[ 219.45ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #48 [Verbose] > │ let rec method1 () : bool = │
00:00:07 #49 [Verbose] > │ true │
00:00:07 #50 [Verbose] > │ and method0 () : unit = │
00:00:07 #51 [Verbose] > │ let v0 : bool = method1() │
00:00:07 #52 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.6666666666666666} / │
00:00:07 #53 [Verbose] > │ expected: %A{0.6666666666666666}" │
00:00:07 #54 [Verbose] > │ let v2 : bool = v0 = false │
00:00:07 #55 [Verbose] > │ if v2 then │
00:00:07 #56 [Verbose] > │ failwith<unit> v1 │
00:00:07 #57 [Verbose] > │ method0() │
00:00:07 #58 [Verbose] > │ │
00:00:07 #59 [Verbose] > │ │
00:00:07 #60 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #61 [Verbose] >
00:00:07 #62 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #63 [Verbose] > // // test
00:00:07 #64 [Verbose] >
00:00:07 #65 [Verbose] > 2f64 |> log
00:00:07 #66 [Verbose] > |> _assert_approx_eq None 0.6931471805599453
00:00:07 #67 [Verbose] >
00:00:07 #68 [Verbose] > ╭─[ 212.57ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #69 [Verbose] > │ let rec method1 () : bool = │
00:00:07 #70 [Verbose] > │ true │
00:00:07 #71 [Verbose] > │ and method0 () : unit = │
00:00:07 #72 [Verbose] > │ let v0 : bool = method1() │
00:00:07 #73 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.6931471805599453} / │
00:00:07 #74 [Verbose] > │ expected: %A{0.6931471805599453}" │
00:00:07 #75 [Verbose] > │ let v2 : bool = v0 = false │
00:00:07 #76 [Verbose] > │ if v2 then │
00:00:07 #77 [Verbose] > │ failwith<unit> v1 │
00:00:07 #78 [Verbose] > │ method0() │
00:00:07 #79 [Verbose] > │ │
00:00:07 #80 [Verbose] > │ │
00:00:07 #81 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #82 [Verbose] >
00:00:07 #83 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #84 [Verbose] > // // test
00:00:07 #85 [Verbose] >
00:00:07 #86 [Verbose] > pi
00:00:07 #87 [Verbose] > |> _assert_approx_eq None 3.141592653589793f64
00:00:08 #88 [Verbose] >
00:00:08 #89 [Verbose] > ╭─[ 228.05ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #90 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #91 [Verbose] > │ true │
00:00:08 #92 [Verbose] > │ and method0 () : unit = │
00:00:08 #93 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #94 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3.141592653589793} / expected: │
00:00:08 #95 [Verbose] > │ %A{3.141592653589793}" │
00:00:08 #96 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #97 [Verbose] > │ if v2 then │
00:00:08 #98 [Verbose] > │ failwith<unit> v1 │
00:00:08 #99 [Verbose] > │ method0() │
00:00:08 #100 [Verbose] > │ │
00:00:08 #101 [Verbose] > │ │
00:00:08 #102 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #103 [Verbose] >
00:00:08 #104 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #105 [Verbose] > // // test
00:00:08 #106 [Verbose] >
00:00:08 #107 [Verbose] > pi |> cos
00:00:08 #108 [Verbose] > |> _assert_eq -1f64
00:00:08 #109 [Verbose] >
00:00:08 #110 [Verbose] > ╭─[ 225.89ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #111 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #112 [Verbose] > │ true │
00:00:08 #113 [Verbose] > │ and method0 () : unit = │
00:00:08 #114 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #115 [Verbose] > │ let v1 : string = $"__expect / actual: %A{-1.0} / expected: %A{-1.0}" │
00:00:08 #116 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #117 [Verbose] > │ if v2 then │
00:00:08 #118 [Verbose] > │ failwith<unit> v1 │
00:00:08 #119 [Verbose] > │ method0() │
00:00:08 #120 [Verbose] > │ │
00:00:08 #121 [Verbose] > │ │
00:00:08 #122 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #123 [Verbose] >
00:00:08 #124 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #125 [Verbose] > // // test
00:00:08 #126 [Verbose] >
00:00:08 #127 [Verbose] > pi
00:00:08 #128 [Verbose] > |> cos
00:00:08 #129 [Verbose] > |> fun n => n / 2f64
00:00:08 #130 [Verbose] > |> _assert_approx_eq None -0.5
00:00:08 #131 [Verbose] >
00:00:08 #132 [Verbose] > ╭─[ 317.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #133 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #134 [Verbose] > │ true │
00:00:08 #135 [Verbose] > │ and method0 () : unit = │
00:00:08 #136 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #137 [Verbose] > │ let v1 : string = $"__expect / actual: %A{-0.5} / expected: %A{-0.5}" │
00:00:08 #138 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #139 [Verbose] > │ if v2 then │
00:00:08 #140 [Verbose] > │ failwith<unit> v1 │
00:00:08 #141 [Verbose] > │ method0() │
00:00:08 #142 [Verbose] > │ │
00:00:08 #143 [Verbose] > │ │
00:00:08 #144 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #145 [Verbose] >
00:00:08 #146 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #147 [Verbose] > // // test
00:00:08 #148 [Verbose] >
00:00:08 #149 [Verbose] > pi / 2 |> cos
00:00:08 #150 [Verbose] > |> _assert_approx_eq None 0.00000000000000006123233995736766f64
00:00:08 #151 [Verbose] >
00:00:08 #152 [Verbose] > ╭─[ 206.26ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #153 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #154 [Verbose] > │ true │
00:00:08 #155 [Verbose] > │ and method0 () : unit = │
00:00:08 #156 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #157 [Verbose] > │ let v1 : string = $"__expect / actual: %A{6.123233995736766E-17} / │
00:00:08 #158 [Verbose] > │ expected: %A{6.123233995736766E-17}" │
00:00:08 #159 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #160 [Verbose] > │ if v2 then │
00:00:08 #161 [Verbose] > │ failwith<unit> v1 │
00:00:08 #162 [Verbose] > │ method0() │
00:00:08 #163 [Verbose] > │ │
00:00:08 #164 [Verbose] > │ │
00:00:08 #165 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #166 [Verbose] >
00:00:08 #167 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #168 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #169 [Verbose] > │ ## atan2 │
00:00:08 #170 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #171 [Verbose] >
00:00:08 #172 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #173 [Verbose] > inl atan2 (y : f64) (x : f64) =
00:00:08 #174 [Verbose] > $"System.Math.Atan2 (!y, !x)" : f64
00:00:09 #175 [Verbose] >
00:00:09 #176 [Verbose] > ╭─[ 248.49ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #177 [Verbose] > │ () │
00:00:09 #178 [Verbose] > │ │
00:00:09 #179 [Verbose] > │ │
00:00:09 #180 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #181 [Verbose] >
00:00:09 #182 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #183 [Verbose] > // // test
00:00:09 #184 [Verbose] >
00:00:09 #185 [Verbose] > 0 |> atan2 1
00:00:09 #186 [Verbose] > |> _assert_eq 1.5707963267948966
00:00:09 #187 [Verbose] >
00:00:09 #188 [Verbose] > ╭─[ 507.41ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #189 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:09 #190 [Verbose] > │ v0 │
00:00:09 #191 [Verbose] > │ and method0 () : unit = │
00:00:09 #192 [Verbose] > │ let v0 : float = System.Math.Atan2 (1.0, 0.0) │
00:00:09 #193 [Verbose] > │ let v1 : bool = v0 = 1.5707963267948966 │
00:00:09 #194 [Verbose] > │ let v2 : bool = method1(v1) │
00:00:09 #195 [Verbose] > │ let v3 : string = $"__expect / actual: %A{v0} / expected: │
00:00:09 #196 [Verbose] > │ %A{1.5707963267948966}" │
00:00:09 #197 [Verbose] > │ let v4 : bool = v2 = false │
00:00:09 #198 [Verbose] > │ if v4 then │
00:00:09 #199 [Verbose] > │ failwith<unit> v3 │
00:00:09 #200 [Verbose] > │ method0() │
00:00:09 #201 [Verbose] > │ │
00:00:09 #202 [Verbose] > │ │
00:00:09 #203 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #204 [Verbose] >
00:00:09 #205 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #206 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #207 [Verbose] > │ ## e │
00:00:09 #208 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #209 [Verbose] >
00:00:09 #210 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #211 [Verbose] > inl e () =
00:00:09 #212 [Verbose] > exp 1f64
00:00:09 #213 [Verbose] >
00:00:09 #214 [Verbose] > ╭─[ 196.71ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #215 [Verbose] > │ () │
00:00:09 #216 [Verbose] > │ │
00:00:09 #217 [Verbose] > │ │
00:00:09 #218 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #219 [Verbose] >
00:00:09 #220 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #221 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #222 [Verbose] > │ ## floor │
00:00:09 #223 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #224 [Verbose] >
00:00:09 #225 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #226 [Verbose] > inl floor forall t {float}. (x : t) : t =
00:00:09 #227 [Verbose] > $"floor !x"
00:00:10 #228 [Verbose] >
00:00:10 #229 [Verbose] > ╭─[ 197.07ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #230 [Verbose] > │ () │
00:00:10 #231 [Verbose] > │ │
00:00:10 #232 [Verbose] > │ │
00:00:10 #233 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #234 [Verbose] >
00:00:10 #235 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #236 [Verbose] > // // test
00:00:10 #237 [Verbose] >
00:00:10 #238 [Verbose] > 0.6 |> floor
00:00:10 #239 [Verbose] > |> _assert_eq 0f64
00:00:10 #240 [Verbose] >
00:00:10 #241 [Verbose] > ╭─[ 628.62ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #242 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:10 #243 [Verbose] > │ v0 │
00:00:10 #244 [Verbose] > │ and method0 () : unit = │
00:00:10 #245 [Verbose] > │ let v0 : float = floor 0.6 │
00:00:10 #246 [Verbose] > │ let v1 : bool = v0 = 0.0 │
00:00:10 #247 [Verbose] > │ let v2 : bool = method1(v1) │
00:00:10 #248 [Verbose] > │ let v3 : string = $"__expect / actual: %A{v0} / expected: %A{0.0}" │
00:00:10 #249 [Verbose] > │ let v4 : bool = v2 = false │
00:00:10 #250 [Verbose] > │ if v4 then │
00:00:10 #251 [Verbose] > │ failwith<unit> v3 │
00:00:10 #252 [Verbose] > │ method0() │
00:00:10 #253 [Verbose] > │ │
00:00:10 #254 [Verbose] > │ │
00:00:10 #255 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #256 [Verbose] >
00:00:10 #257 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #258 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #259 [Verbose] > │ ## log_base │
00:00:10 #260 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #261 [Verbose] >
00:00:10 #262 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #263 [Verbose] > inl log_base (new_base : f64) (a : f64) =
00:00:10 #264 [Verbose] > $"System.Math.Log (!a, !new_base)" : f64
00:00:10 #265 [Verbose] >
00:00:10 #266 [Verbose] > ╭─[ 203.73ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #267 [Verbose] > │ () │
00:00:10 #268 [Verbose] > │ │
00:00:10 #269 [Verbose] > │ │
00:00:10 #270 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #271 [Verbose] >
00:00:10 #272 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #273 [Verbose] > // // test
00:00:11 #274 [Verbose] >
00:00:11 #275 [Verbose] > 100 |> log_base 10
00:00:11 #276 [Verbose] > |> _assert_eq 2
00:00:11 #277 [Verbose] >
00:00:11 #278 [Verbose] > ╭─[ 220.03ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #279 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:11 #280 [Verbose] > │ v0 │
00:00:11 #281 [Verbose] > │ and method0 () : unit = │
00:00:11 #282 [Verbose] > │ let v0 : float = System.Math.Log (100.0, 10.0) │
00:00:11 #283 [Verbose] > │ let v1 : bool = v0 = 2.0 │
00:00:11 #284 [Verbose] > │ let v2 : bool = method1(v1) │
00:00:11 #285 [Verbose] > │ let v3 : string = $"__expect / actual: %A{v0} / expected: %A{2.0}" │
00:00:11 #286 [Verbose] > │ let v4 : bool = v2 = false │
00:00:11 #287 [Verbose] > │ if v4 then │
00:00:11 #288 [Verbose] > │ failwith<unit> v3 │
00:00:11 #289 [Verbose] > │ method0() │
00:00:11 #290 [Verbose] > │ │
00:00:11 #291 [Verbose] > │ │
00:00:11 #292 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #293 [Verbose] >
00:00:11 #294 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #295 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #296 [Verbose] > │ ## round │
00:00:11 #297 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #298 [Verbose] >
00:00:11 #299 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #300 [Verbose] > inl round forall t {float}. (x : t) : t =
00:00:11 #301 [Verbose] > $"round !x"
00:00:11 #302 [Verbose] >
00:00:11 #303 [Verbose] > ╭─[ 182.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #304 [Verbose] > │ () │
00:00:11 #305 [Verbose] > │ │
00:00:11 #306 [Verbose] > │ │
00:00:11 #307 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #308 [Verbose] >
00:00:11 #309 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #310 [Verbose] > // // test
00:00:11 #311 [Verbose] >
00:00:11 #312 [Verbose] > 0.5 |> round
00:00:11 #313 [Verbose] > |> _assert_eq 0f64
00:00:11 #314 [Verbose] >
00:00:11 #315 [Verbose] > ╭─[ 206.41ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #316 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:11 #317 [Verbose] > │ v0 │
00:00:11 #318 [Verbose] > │ and method0 () : unit = │
00:00:11 #319 [Verbose] > │ let v0 : float = round 0.5 │
00:00:11 #320 [Verbose] > │ let v1 : bool = v0 = 0.0 │
00:00:11 #321 [Verbose] > │ let v2 : bool = method1(v1) │
00:00:11 #322 [Verbose] > │ let v3 : string = $"__expect / actual: %A{v0} / expected: %A{0.0}" │
00:00:11 #323 [Verbose] > │ let v4 : bool = v2 = false │
00:00:11 #324 [Verbose] > │ if v4 then │
00:00:11 #325 [Verbose] > │ failwith<unit> v3 │
00:00:11 #326 [Verbose] > │ method0() │
00:00:11 #327 [Verbose] > │ │
00:00:11 #328 [Verbose] > │ │
00:00:11 #329 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #330 [Verbose] >
00:00:11 #331 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #332 [Verbose] > // // test
00:00:11 #333 [Verbose] >
00:00:11 #334 [Verbose] > 0.6 |> round
00:00:11 #335 [Verbose] > |> _assert_eq 1f64
00:00:11 #336 [Verbose] >
00:00:11 #337 [Verbose] > ╭─[ 197.67ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #338 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:11 #339 [Verbose] > │ v0 │
00:00:11 #340 [Verbose] > │ and method0 () : unit = │
00:00:11 #341 [Verbose] > │ let v0 : float = round 0.6 │
00:00:11 #342 [Verbose] > │ let v1 : bool = v0 = 1.0 │
00:00:11 #343 [Verbose] > │ let v2 : bool = method1(v1) │
00:00:11 #344 [Verbose] > │ let v3 : string = $"__expect / actual: %A{v0} / expected: %A{1.0}" │
00:00:11 #345 [Verbose] > │ let v4 : bool = v2 = false │
00:00:11 #346 [Verbose] > │ if v4 then │
00:00:11 #347 [Verbose] > │ failwith<unit> v3 │
00:00:11 #348 [Verbose] > │ method0() │
00:00:11 #349 [Verbose] > │ │
00:00:11 #350 [Verbose] > │ │
00:00:11 #351 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #352 [Verbose] >
00:00:11 #353 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #354 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #355 [Verbose] > │ ## square │
00:00:11 #356 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #357 [Verbose] >
00:00:11 #358 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #359 [Verbose] > inl square x =
00:00:11 #360 [Verbose] > x ** 2
00:00:12 #361 [Verbose] >
00:00:12 #362 [Verbose] > ╭─[ 199.35ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #363 [Verbose] > │ () │
00:00:12 #364 [Verbose] > │ │
00:00:12 #365 [Verbose] > │ │
00:00:12 #366 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #367 [Verbose] >
00:00:12 #368 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #369 [Verbose] > // // test
00:00:12 #370 [Verbose] >
00:00:12 #371 [Verbose] > 5f64
00:00:12 #372 [Verbose] > |> sqrt
00:00:12 #373 [Verbose] > |> square
00:00:12 #374 [Verbose] > |> _assert_approx_eq None 5
00:00:12 #375 [Verbose] >
00:00:12 #376 [Verbose] > ╭─[ 239.22ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #377 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #378 [Verbose] > │ true │
00:00:12 #379 [Verbose] > │ and method0 () : unit = │
00:00:12 #380 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #381 [Verbose] > │ let v1 : string = $"__expect / actual: %A{5.000000000000001} / expected: │
00:00:12 #382 [Verbose] > │ %A{5.0}" │
00:00:12 #383 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #384 [Verbose] > │ if v2 then │
00:00:12 #385 [Verbose] > │ failwith<unit> v1 │
00:00:12 #386 [Verbose] > │ method0() │
00:00:12 #387 [Verbose] > │ │
00:00:12 #388 [Verbose] > │ │
00:00:12 #389 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #390 [Verbose] >
00:00:12 #391 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #392 [Verbose] > // // test
00:00:12 #393 [Verbose] >
00:00:12 #394 [Verbose] > e () |> square
00:00:12 #395 [Verbose] > |> _assert_approx_eq None 7.3890560989306495
00:00:12 #396 [Verbose] >
00:00:12 #397 [Verbose] > ╭─[ 216.20ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #398 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #399 [Verbose] > │ true │
00:00:12 #400 [Verbose] > │ and method0 () : unit = │
00:00:12 #401 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #402 [Verbose] > │ let v1 : string = $"__expect / actual: %A{7.3890560989306495} / │
00:00:12 #403 [Verbose] > │ expected: %A{7.3890560989306495}" │
00:00:12 #404 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #405 [Verbose] > │ if v2 then │
00:00:12 #406 [Verbose] > │ failwith<unit> v1 │
00:00:12 #407 [Verbose] > │ method0() │
00:00:12 #408 [Verbose] > │ │
00:00:12 #409 [Verbose] > │ │
00:00:12 #410 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #411 [Verbose] > [NbConvertApp] Converting notebook math.dib.ipynb to html
00:00:14 #412 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:14 #413 [Verbose] > validate(nb)
00:00:14 #414 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:14 #415 [Verbose] > return _pygments_highlight(
00:00:15 #416 [Verbose] > [NbConvertApp] Writing 303784 bytes to math.dib.html
00:00:15 #417 [Debug] executeAsync / exitCode: 0 / output.Length: 24995
00:00:15 #418 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 \"optionm'.dib\"""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # optionm │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.08s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > open rust_operators
00:00:07 #22 [Verbose] >
00:00:07 #23 [Verbose] > ╭─[ 241.44ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #24 [Verbose] > │ () │
00:00:07 #25 [Verbose] > │ │
00:00:07 #26 [Verbose] > │ │
00:00:07 #27 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #28 [Verbose] >
00:00:07 #29 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #30 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #31 [Verbose] > │ ## default_value │
00:00:07 #32 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #33 [Verbose] >
00:00:07 #34 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #35 [Verbose] > inl default_value d =
00:00:07 #36 [Verbose] > optionm.defaultWith d
00:00:07 #37 [Verbose] >
00:00:07 #38 [Verbose] > ╭─[ 212.89ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #39 [Verbose] > │ () │
00:00:07 #40 [Verbose] > │ │
00:00:07 #41 [Verbose] > │ │
00:00:07 #42 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #43 [Verbose] >
00:00:07 #44 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #45 [Verbose] > // // test
00:00:07 #46 [Verbose] >
00:00:07 #47 [Verbose] > None
00:00:07 #48 [Verbose] > |> default_value 3i32
00:00:07 #49 [Verbose] > |> _assert_eq 3i32
00:00:07 #50 [Verbose] >
00:00:07 #51 [Verbose] > ╭─[ 673.03ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #52 [Verbose] > │ let rec method1 () : bool = │
00:00:07 #53 [Verbose] > │ true │
00:00:07 #54 [Verbose] > │ and method0 () : unit = │
00:00:07 #55 [Verbose] > │ let v0 : bool = method1() │
00:00:07 #56 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3} / expected: %A{3}" │
00:00:07 #57 [Verbose] > │ let v2 : bool = v0 = false │
00:00:07 #58 [Verbose] > │ if v2 then │
00:00:07 #59 [Verbose] > │ failwith<unit> v1 │
00:00:07 #60 [Verbose] > │ method0() │
00:00:07 #61 [Verbose] > │ │
00:00:07 #62 [Verbose] > │ │
00:00:07 #63 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #64 [Verbose] >
00:00:07 #65 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #66 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #67 [Verbose] > │ ## (/??) │
00:00:07 #68 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #69 [Verbose] >
00:00:07 #70 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #71 [Verbose] > inl (/??) a b =
00:00:07 #72 [Verbose] > a |> default_value b
00:00:08 #73 [Verbose] >
00:00:08 #74 [Verbose] > ╭─[ 190.86ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #75 [Verbose] > │ () │
00:00:08 #76 [Verbose] > │ │
00:00:08 #77 [Verbose] > │ │
00:00:08 #78 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #79 [Verbose] >
00:00:08 #80 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #81 [Verbose] > // // test
00:00:08 #82 [Verbose] >
00:00:08 #83 [Verbose] > None /?? 3i32
00:00:08 #84 [Verbose] > |> _assert_eq 3i32
00:00:08 #85 [Verbose] >
00:00:08 #86 [Verbose] > ╭─[ 227.28ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #87 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #88 [Verbose] > │ true │
00:00:08 #89 [Verbose] > │ and method0 () : unit = │
00:00:08 #90 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #91 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3} / expected: %A{3}" │
00:00:08 #92 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #93 [Verbose] > │ if v2 then │
00:00:08 #94 [Verbose] > │ failwith<unit> v1 │
00:00:08 #95 [Verbose] > │ method0() │
00:00:08 #96 [Verbose] > │ │
00:00:08 #97 [Verbose] > │ │
00:00:08 #98 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #99 [Verbose] >
00:00:08 #100 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #101 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #102 [Verbose] > │ ## default_with │
00:00:08 #103 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #104 [Verbose] >
00:00:08 #105 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #106 [Verbose] > inl default_with fn =
00:00:08 #107 [Verbose] > function Some x => x | None => fn ()
00:00:08 #108 [Verbose] >
00:00:08 #109 [Verbose] > ╭─[ 201.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #110 [Verbose] > │ () │
00:00:08 #111 [Verbose] > │ │
00:00:08 #112 [Verbose] > │ │
00:00:08 #113 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #114 [Verbose] >
00:00:08 #115 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #116 [Verbose] > // // test
00:00:08 #117 [Verbose] >
00:00:08 #118 [Verbose] > None
00:00:08 #119 [Verbose] > |> default_with (fun () => 3i32)
00:00:08 #120 [Verbose] > |> _assert_eq 3i32
00:00:08 #121 [Verbose] >
00:00:08 #122 [Verbose] > ╭─[ 232.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #123 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #124 [Verbose] > │ true │
00:00:08 #125 [Verbose] > │ and method0 () : unit = │
00:00:08 #126 [Verbose] > │ let v0 : bool = method1() │
00:00:08 #127 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3} / expected: %A{3}" │
00:00:08 #128 [Verbose] > │ let v2 : bool = v0 = false │
00:00:08 #129 [Verbose] > │ if v2 then │
00:00:08 #130 [Verbose] > │ failwith<unit> v1 │
00:00:08 #131 [Verbose] > │ method0() │
00:00:08 #132 [Verbose] > │ │
00:00:08 #133 [Verbose] > │ │
00:00:08 #134 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #135 [Verbose] >
00:00:08 #136 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #137 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #138 [Verbose] > │ ## choose │
00:00:08 #139 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #140 [Verbose] >
00:00:08 #141 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #142 [Verbose] > inl choose fn a b =
00:00:08 #143 [Verbose] > match a, b with
00:00:08 #144 [Verbose] > | Some x, Some y => fn x y |> Some
00:00:08 #145 [Verbose] > | _ => None
00:00:09 #146 [Verbose] >
00:00:09 #147 [Verbose] > ╭─[ 210.63ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #148 [Verbose] > │ () │
00:00:09 #149 [Verbose] > │ │
00:00:09 #150 [Verbose] > │ │
00:00:09 #151 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #152 [Verbose] >
00:00:09 #153 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #154 [Verbose] > // // test
00:00:09 #155 [Verbose] >
00:00:09 #156 [Verbose] > (Some 2i32, Some 3)
00:00:09 #157 [Verbose] > ||> choose (+)
00:00:09 #158 [Verbose] > |> _assert_eq (Some 5)
00:00:09 #159 [Verbose] >
00:00:09 #160 [Verbose] > ╭─[ 800.85ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #161 [Verbose] > │ type [<Struct>] US0 = │
00:00:09 #162 [Verbose] > │ | US0_0 │
00:00:09 #163 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:09 #164 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #165 [Verbose] > │ true │
00:00:09 #166 [Verbose] > │ and method0 () : unit = │
00:00:09 #167 [Verbose] > │ let v3 : bool = method1() │
00:00:09 #168 [Verbose] > │ let v4 : US0 = US0_1(5) │
00:00:09 #169 [Verbose] > │ let v5 : US0 = US0_1(5) │
00:00:09 #170 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:09 #171 [Verbose] > │ let v7 : bool = v3 = false │
00:00:09 #172 [Verbose] > │ if v7 then │
00:00:09 #173 [Verbose] > │ failwith<unit> v6 │
00:00:09 #174 [Verbose] > │ method0() │
00:00:09 #175 [Verbose] > │ │
00:00:09 #176 [Verbose] > │ │
00:00:09 #177 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #178 [Verbose] >
00:00:09 #179 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #180 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #181 [Verbose] > │ ## iter │
00:00:09 #182 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #183 [Verbose] >
00:00:09 #184 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #185 [Verbose] > inl iter fn = function
00:00:09 #186 [Verbose] > | Some x => fn x
00:00:09 #187 [Verbose] > | None => ()
00:00:10 #188 [Verbose] >
00:00:10 #189 [Verbose] > ╭─[ 204.87ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #190 [Verbose] > │ () │
00:00:10 #191 [Verbose] > │ │
00:00:10 #192 [Verbose] > │ │
00:00:10 #193 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #194 [Verbose] >
00:00:10 #195 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #196 [Verbose] > // // test
00:00:10 #197 [Verbose] >
00:00:10 #198 [Verbose] > inl n = mut 1i32
00:00:10 #199 [Verbose] > inl fn =
00:00:10 #200 [Verbose] > fun n' =>
00:00:10 #201 [Verbose] > n <- *n + n'
00:00:10 #202 [Verbose] > Some 1i32 |> iter fn
00:00:10 #203 [Verbose] > None |> iter fn
00:00:10 #204 [Verbose] > *n
00:00:10 #205 [Verbose] > |> _assert_eq 2i32
00:00:10 #206 [Verbose] >
00:00:10 #207 [Verbose] > ╭─[ 359.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #208 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:10 #209 [Verbose] > │ let rec method1 (v0 : bool) : bool = │
00:00:10 #210 [Verbose] > │ v0 │
00:00:10 #211 [Verbose] > │ and method0 () : unit = │
00:00:10 #212 [Verbose] > │ let v0 : Mut0 = {l0 = 1} : Mut0 │
00:00:10 #213 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:10 #214 [Verbose] > │ let v2 : int32 = v1 + 1 │
00:00:10 #215 [Verbose] > │ v0.l0 <- v2 │
00:00:10 #216 [Verbose] > │ let v3 : int32 = v0.l0 │
00:00:10 #217 [Verbose] > │ let v4 : bool = v3 = 2 │
00:00:10 #218 [Verbose] > │ let v5 : bool = method1(v4) │
00:00:10 #219 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v3} / expected: %A{2}" │
00:00:10 #220 [Verbose] > │ let v7 : bool = v5 = false │
00:00:10 #221 [Verbose] > │ if v7 then │
00:00:10 #222 [Verbose] > │ failwith<unit> v6 │
00:00:10 #223 [Verbose] > │ method0() │
00:00:10 #224 [Verbose] > │ │
00:00:10 #225 [Verbose] > │ │
00:00:10 #226 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #227 [Verbose] >
00:00:10 #228 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #229 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #230 [Verbose] > │ ## option' │
00:00:10 #231 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #232 [Verbose] >
00:00:10 #233 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #234 [Verbose] > nominal option' t = $"`t option"
00:00:10 #235 [Verbose] >
00:00:10 #236 [Verbose] > inl unbox forall t. (x : option' t) : option t =
00:00:10 #237 [Verbose] > inl some x : option t = Some x
00:00:10 #238 [Verbose] > inl none : option t = None
00:00:10 #239 [Verbose] > $"!x |> Option.map !some |> Option.defaultValue !none"
00:00:10 #240 [Verbose] >
00:00:10 #241 [Verbose] > inl box forall t. (x : option t) : option' t =
00:00:10 #242 [Verbose] > match x with
00:00:10 #243 [Verbose] > | Some x => $"Some !x"
00:00:10 #244 [Verbose] > | None => $"None"
00:00:10 #245 [Verbose] >
00:00:10 #246 [Verbose] > ╭─[ 263.01ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #247 [Verbose] > │ () │
00:00:10 #248 [Verbose] > │ │
00:00:10 #249 [Verbose] > │ │
00:00:10 #250 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #251 [Verbose] >
00:00:10 #252 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #253 [Verbose] > // // test
00:00:10 #254 [Verbose] >
00:00:10 #255 [Verbose] > inl x = Some 3i32
00:00:10 #256 [Verbose] > inl y : option i32 = None
00:00:10 #257 [Verbose] > inl x' = x |> box |> unbox
00:00:10 #258 [Verbose] > inl y' = y |> box |> unbox
00:00:10 #259 [Verbose] > (x', y') |> _assert_eq (x, y)
00:00:11 #260 [Verbose] >
00:00:11 #261 [Verbose] > ╭─[ 404.52ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #262 [Verbose] > │ type [<Struct>] US0 = │
00:00:11 #263 [Verbose] > │ | US0_0 │
00:00:11 #264 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:11 #265 [Verbose] > │ let rec closure0 () (v0 : int32) : US0 = │
00:00:11 #266 [Verbose] > │ US0_1(v0) │
00:00:11 #267 [Verbose] > │ and method1 (v0 : bool) : bool = │
00:00:11 #268 [Verbose] > │ v0 │
00:00:11 #269 [Verbose] > │ and method0 () : unit = │
00:00:11 #270 [Verbose] > │ let v0 : int32 option = Some 3 │
00:00:11 #271 [Verbose] > │ let v1 : (int32 -> US0) = closure0() │
00:00:11 #272 [Verbose] > │ let v2 : US0 = US0_0 │
00:00:11 #273 [Verbose] > │ let v3 : US0 = v0 |> Option.map v1 |> Option.defaultValue v2 │
00:00:11 #274 [Verbose] > │ let v4 : int32 option = None │
00:00:11 #275 [Verbose] > │ let v5 : US0 = US0_0 │
00:00:11 #276 [Verbose] > │ let v6 : US0 = v4 |> Option.map v1 |> Option.defaultValue v5 │
00:00:11 #277 [Verbose] > │ let v11 : bool = │
00:00:11 #278 [Verbose] > │ match v3 with │
00:00:11 #279 [Verbose] > │ | US0_1(v9) -> (* Some *) │
00:00:11 #280 [Verbose] > │ let v10 : bool = v9 = 3 │
00:00:11 #281 [Verbose] > │ v10 │
00:00:11 #282 [Verbose] > │ | _ -> │
00:00:11 #283 [Verbose] > │ false │
00:00:11 #284 [Verbose] > │ let v13 : bool = │
00:00:11 #285 [Verbose] > │ if v11 then │
00:00:11 #286 [Verbose] > │ match v6 with │
00:00:11 #287 [Verbose] > │ | US0_0 -> (* None *) │
00:00:11 #288 [Verbose] > │ true │
00:00:11 #289 [Verbose] > │ | _ -> │
00:00:11 #290 [Verbose] > │ false │
00:00:11 #291 [Verbose] > │ else │
00:00:11 #292 [Verbose] > │ false │
00:00:11 #293 [Verbose] > │ let v14 : bool = method1(v13) │
00:00:11 #294 [Verbose] > │ let v15 : US0 = US0_1(3) │
00:00:11 #295 [Verbose] > │ let v16 : US0 = US0_0 │
00:00:11 #296 [Verbose] > │ let v17 : string = $"__expect / actual: %A{struct (v3, v6)} / expected: │
00:00:11 #297 [Verbose] > │ %A{struct (v15, v16)}" │
00:00:11 #298 [Verbose] > │ let v18 : bool = v14 = false │
00:00:11 #299 [Verbose] > │ if v18 then │
00:00:11 #300 [Verbose] > │ failwith<unit> v17 │
00:00:11 #301 [Verbose] > │ method0() │
00:00:11 #302 [Verbose] > │ │
00:00:11 #303 [Verbose] > │ │
00:00:11 #304 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #305 [Verbose] >
00:00:11 #306 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #307 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #308 [Verbose] > │ ## map │
00:00:11 #309 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #310 [Verbose] >
00:00:11 #311 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #312 [Verbose] > inl map forall t u. (fn : t -> u) (x : option' t) : option' u =
00:00:11 #313 [Verbose] > inl x = join x
00:00:11 #314 [Verbose] > inl fn = join fn
00:00:11 #315 [Verbose] > !\($'"!x.map(|x| !fn(x))"')
00:00:11 #316 [Verbose] >
00:00:11 #317 [Verbose] > ╭─[ 293.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #318 [Verbose] > │ () │
00:00:11 #319 [Verbose] > │ │
00:00:11 #320 [Verbose] > │ │
00:00:11 #321 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #322 [Verbose] >
00:00:11 #323 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #324 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #325 [Verbose] > │ ## flatten │
00:00:11 #326 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #327 [Verbose] >
00:00:11 #328 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #329 [Verbose] > inl flatten x =
00:00:11 #330 [Verbose] > match x with
00:00:11 #331 [Verbose] > | Some (Some x) => Some x
00:00:11 #332 [Verbose] > | _ => None
00:00:11 #333 [Verbose] >
00:00:11 #334 [Verbose] > ╭─[ 199.14ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #335 [Verbose] > │ () │
00:00:11 #336 [Verbose] > │ │
00:00:11 #337 [Verbose] > │ │
00:00:11 #338 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #339 [Verbose] >
00:00:11 #340 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #341 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #342 [Verbose] > │ ## unwrap │
00:00:11 #343 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #344 [Verbose] >
00:00:11 #345 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #346 [Verbose] > inl unwrap forall t. (x : option' t) : t =
00:00:11 #347 [Verbose] > !\($'"!x.unwrap()"')
00:00:11 #348 [Verbose] >
00:00:11 #349 [Verbose] > ╭─[ 211.54ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #350 [Verbose] > │ () │
00:00:11 #351 [Verbose] > │ │
00:00:11 #352 [Verbose] > │ │
00:00:11 #353 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #354 [Verbose] >
00:00:11 #355 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #356 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #357 [Verbose] > │ ## unwrap_or │
00:00:11 #358 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #359 [Verbose] >
00:00:11 #360 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #361 [Verbose] > inl unwrap_or forall t. (def : t) (x : option' t) : t =
00:00:11 #362 [Verbose] > !\($'"!x.unwrap_or(!def)"')
00:00:12 #363 [Verbose] >
00:00:12 #364 [Verbose] > ╭─[ 198.19ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #365 [Verbose] > │ () │
00:00:12 #366 [Verbose] > │ │
00:00:12 #367 [Verbose] > │ │
00:00:12 #368 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #369 [Verbose] >
00:00:12 #370 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #371 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #372 [Verbose] > │ ## rc_upgrade │
00:00:12 #373 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #374 [Verbose] >
00:00:12 #375 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #376 [Verbose] > inl rc_upgrade forall t. (x : rust.weak_rc t) : option (rust.rc t) =
00:00:12 #377 [Verbose] > inl x = join x
00:00:12 #378 [Verbose] > !\($'"std::rc::Weak::upgrade(&!x)"')
00:00:12 #379 [Verbose] > |> unbox
00:00:12 #380 [Verbose] >
00:00:12 #381 [Verbose] > ╭─[ 213.53ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #382 [Verbose] > │ () │
00:00:12 #383 [Verbose] > │ │
00:00:12 #384 [Verbose] > │ │
00:00:12 #385 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #386 [Verbose] > [NbConvertApp] Converting notebook optionm'.dib.ipynb to html
00:00:14 #387 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:14 #388 [Verbose] > validate(nb)
00:00:14 #389 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:14 #390 [Verbose] > return _pygments_highlight(
00:00:15 #391 [Verbose] > [NbConvertApp] Writing 307098 bytes to optionm'.dib.html
00:00:15 #392 [Debug] executeAsync / exitCode: 0 / output.Length: 22990
00:00:15 #393 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 \"am'.dib\"""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:03 #3 [Verbose] >
00:00:03 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:03 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:03 #6 [Verbose] > │ # am' │
00:00:03 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:03 #8 [Verbose] >
00:00:03 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:03 #10 [Verbose] > // // test
00:00:03 #11 [Verbose] >
00:00:03 #12 [Verbose] > open testing
00:00:03 #13 [Verbose] >
00:00:03 #14 [Verbose] > prototype append t : t -> t -> t
00:00:08 #15 [Verbose] >
00:00:08 #16 [Verbose] > ╭─[ 4.92s - stdout ]───────────────────────────────────────────────────────────╮
00:00:08 #17 [Verbose] > │ () │
00:00:08 #18 [Verbose] > │ │
00:00:08 #19 [Verbose] > │ │
00:00:08 #20 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #21 [Verbose] >
00:00:08 #22 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #23 [Verbose] > open rust_operators
00:00:08 #24 [Verbose] >
00:00:08 #25 [Verbose] > ╭─[ 209.30ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #26 [Verbose] > │ () │
00:00:08 #27 [Verbose] > │ │
00:00:08 #28 [Verbose] > │ │
00:00:08 #29 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #30 [Verbose] >
00:00:08 #31 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #32 [Verbose] > inl types () =
00:00:08 #33 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"[[$0]]\")>]] type Slice<'T> =
00:00:08 #34 [Verbose] > class end"
00:00:08 #35 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"[[$0; $1]]\")>]] type
00:00:08 #36 [Verbose] > Slice'<'T, 'U> = class end"
00:00:08 #37 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Vec<$0>\")>]] type Vec<'T> =
00:00:08 #38 [Verbose] > class end"
00:00:08 #39 [Verbose] >
00:00:08 #40 [Verbose] > ╭─[ 214.35ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #41 [Verbose] > │ () │
00:00:08 #42 [Verbose] > │ │
00:00:08 #43 [Verbose] > │ │
00:00:08 #44 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #45 [Verbose] >
00:00:08 #46 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #47 [Verbose] > nominal slice t = $"Slice<`t>"
00:00:08 #48 [Verbose] > nominal slice' t u = $"Slice'<`t, `u>"
00:00:08 #49 [Verbose] > nominal vec t = $"Vec<`t>"
00:00:09 #50 [Verbose] >
00:00:09 #51 [Verbose] > ╭─[ 242.26ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #52 [Verbose] > │ () │
00:00:09 #53 [Verbose] > │ │
00:00:09 #54 [Verbose] > │ │
00:00:09 #55 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #56 [Verbose] >
00:00:09 #57 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #58 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #59 [Verbose] > │ ## append │
00:00:09 #60 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #61 [Verbose] >
00:00:09 #62 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #63 [Verbose] > instance append a dim {int; number} t =
00:00:09 #64 [Verbose] > am.append
00:00:09 #65 [Verbose] >
00:00:09 #66 [Verbose] > ╭─[ 230.68ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #67 [Verbose] > │ () │
00:00:09 #68 [Verbose] > │ │
00:00:09 #69 [Verbose] > │ │
00:00:09 #70 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #71 [Verbose] >
00:00:09 #72 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #73 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #74 [Verbose] > │ ## /@ │
00:00:09 #75 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #76 [Verbose] >
00:00:09 #77 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #78 [Verbose] > inl (/@) a b =
00:00:09 #79 [Verbose] > b |> append a
00:00:09 #80 [Verbose] >
00:00:09 #81 [Verbose] > ╭─[ 228.80ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #82 [Verbose] > │ () │
00:00:09 #83 [Verbose] > │ │
00:00:09 #84 [Verbose] > │ │
00:00:09 #85 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #86 [Verbose] >
00:00:09 #87 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #88 [Verbose] > // // test
00:00:09 #89 [Verbose] >
00:00:09 #90 [Verbose] > a ;[[ "a"; "b" ]] /@ a ;[[ "c"; "d" ]]
00:00:09 #91 [Verbose] > |> _assert_eq (a ;[[ "a"; "b"; "c"; "d" ]] : _ i32 _)
00:00:10 #92 [Verbose] >
00:00:10 #93 [Verbose] > ╭─[ 1.36s - stdout ]───────────────────────────────────────────────────────────╮
00:00:10 #94 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:10 #95 [Verbose] > │ let rec method1 (v0 : (string [])) : (string []) = │
00:00:10 #96 [Verbose] > │ v0 │
00:00:10 #97 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:10 #98 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:10 #99 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:10 #100 [Verbose] > │ v3 │
00:00:10 #101 [Verbose] > │ and method3 (v0 : (string []), v1 : (string []), v2 : int32) : bool = │
00:00:10 #102 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:10 #103 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:10 #104 [Verbose] > │ if v4 then │
00:00:10 #105 [Verbose] > │ let v5 : string = v0.[int v2] │
00:00:10 #106 [Verbose] > │ let v6 : string = v1.[int v2] │
00:00:10 #107 [Verbose] > │ let v7 : bool = v5 = v6 │
00:00:10 #108 [Verbose] > │ if v7 then │
00:00:10 #109 [Verbose] > │ let v8 : int32 = v2 + 1 │
00:00:10 #110 [Verbose] > │ method3(v0, v1, v8) │
00:00:10 #111 [Verbose] > │ else │
00:00:10 #112 [Verbose] > │ false │
00:00:10 #113 [Verbose] > │ else │
00:00:10 #114 [Verbose] > │ true │
00:00:10 #115 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:10 #116 [Verbose] > │ v0 │
00:00:10 #117 [Verbose] > │ and method0 () : unit = │
00:00:10 #118 [Verbose] > │ let v0 : string = "a" │
00:00:10 #119 [Verbose] > │ let v1 : string = "b" │
00:00:10 #120 [Verbose] > │ let v2 : (string []) = [|v0; v1|] │
00:00:10 #121 [Verbose] > │ let v3 : (string []) = method1(v2) │
00:00:10 #122 [Verbose] > │ let v4 : string = "c" │
00:00:10 #123 [Verbose] > │ let v5 : string = "d" │
00:00:10 #124 [Verbose] > │ let v6 : (string []) = [|v4; v5|] │
00:00:10 #125 [Verbose] > │ let v7 : (string []) = method1(v6) │
00:00:10 #126 [Verbose] > │ let v8 : int32 = v3.Length │
00:00:10 #127 [Verbose] > │ let v9 : int32 = v7.Length │
00:00:10 #128 [Verbose] > │ let v10 : int32 = v8 + v9 │
00:00:10 #129 [Verbose] > │ let v11 : (string []) = Array.zeroCreate<string> (v10) │
00:00:10 #130 [Verbose] > │ let v12 : Mut0 = {l0 = 0} : Mut0 │
00:00:10 #131 [Verbose] > │ while method2(v10, v12) do │
00:00:10 #132 [Verbose] > │ let v14 : int32 = v12.l0 │
00:00:10 #133 [Verbose] > │ let v15 : bool = v14 < v8 │
00:00:10 #134 [Verbose] > │ let v19 : string = │
00:00:10 #135 [Verbose] > │ if v15 then │
00:00:10 #136 [Verbose] > │ let v16 : string = v3.[int v14] │
00:00:10 #137 [Verbose] > │ v16 │
00:00:10 #138 [Verbose] > │ else │
00:00:10 #139 [Verbose] > │ let v17 : int32 = v14 - v8 │
00:00:10 #140 [Verbose] > │ let v18 : string = v7.[int v17] │
00:00:10 #141 [Verbose] > │ v18 │
00:00:10 #142 [Verbose] > │ v11.[int v14] <- v19 │
00:00:10 #143 [Verbose] > │ let v20 : int32 = v14 + 1 │
00:00:10 #144 [Verbose] > │ v12.l0 <- v20 │
00:00:10 #145 [Verbose] > │ () │
00:00:10 #146 [Verbose] > │ let v21 : (string []) = [|v0; v1; v4; v5|] │
00:00:10 #147 [Verbose] > │ let v22 : (string []) = method1(v21) │
00:00:10 #148 [Verbose] > │ let v23 : int32 = v11.Length │
00:00:10 #149 [Verbose] > │ let v24 : int32 = v22.Length │
00:00:10 #150 [Verbose] > │ let v25 : bool = v23 = v24 │
00:00:10 #151 [Verbose] > │ let v26 : bool = v25 <> true │
00:00:10 #152 [Verbose] > │ let v29 : bool = │
00:00:10 #153 [Verbose] > │ if v26 then │
00:00:10 #154 [Verbose] > │ false │
00:00:10 #155 [Verbose] > │ else │
00:00:10 #156 [Verbose] > │ let v27 : int32 = 0 │
00:00:10 #157 [Verbose] > │ method3(v11, v22, v27) │
00:00:10 #158 [Verbose] > │ let v30 : bool = method4(v29) │
00:00:10 #159 [Verbose] > │ let v31 : string = $"__expect / actual: %A{v11} / expected: %A{v22}" │
00:00:10 #160 [Verbose] > │ let v32 : bool = v30 = false │
00:00:10 #161 [Verbose] > │ if v32 then │
00:00:10 #162 [Verbose] > │ failwith<unit> v31 │
00:00:10 #163 [Verbose] > │ method0() │
00:00:10 #164 [Verbose] > │ │
00:00:10 #165 [Verbose] > │ │
00:00:10 #166 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #167 [Verbose] >
00:00:10 #168 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #169 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #170 [Verbose] > │ ## collect │
00:00:10 #171 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #172 [Verbose] >
00:00:10 #173 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #174 [Verbose] > inl collect forall t r. (fn : t -> a i32 r) (items : a i32 t) : a i32 r =
00:00:10 #175 [Verbose] > items
00:00:10 #176 [Verbose] > |> am.map fn
00:00:10 #177 [Verbose] > |> am.fold (/@) (a ;[[]])
00:00:11 #178 [Verbose] >
00:00:11 #179 [Verbose] > ╭─[ 188.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #180 [Verbose] > │ () │
00:00:11 #181 [Verbose] > │ │
00:00:11 #182 [Verbose] > │ │
00:00:11 #183 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #184 [Verbose] >
00:00:11 #185 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #186 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #187 [Verbose] > │ ## choose │
00:00:11 #188 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #189 [Verbose] >
00:00:11 #190 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #191 [Verbose] > inl choose f l =
00:00:11 #192 [Verbose] > (l, [[]])
00:00:11 #193 [Verbose] > ||> am.foldBack fun x acc =>
00:00:11 #194 [Verbose] > match f x with
00:00:11 #195 [Verbose] > | Some y => y :: acc
00:00:11 #196 [Verbose] > | None => acc
00:00:11 #197 [Verbose] > |> listm.toArray
00:00:11 #198 [Verbose] >
00:00:11 #199 [Verbose] > ╭─[ 215.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #200 [Verbose] > │ () │
00:00:11 #201 [Verbose] > │ │
00:00:11 #202 [Verbose] > │ │
00:00:11 #203 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #204 [Verbose] >
00:00:11 #205 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #206 [Verbose] > // // test
00:00:11 #207 [Verbose] >
00:00:11 #208 [Verbose] > (am.init 10i32 id : a _ _)
00:00:11 #209 [Verbose] > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:00:11 #210 [Verbose] > |> _assert_eq (a ;[[ 0; 2; 4; 6; 8 ]] : _ i32 _)
00:00:11 #211 [Verbose] >
00:00:11 #212 [Verbose] > ╭─[ 545.06ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #213 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:11 #214 [Verbose] > │ and UH0 = │
00:00:11 #215 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:11 #216 [Verbose] > │ | UH0_1 │
00:00:11 #217 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : UH0} │
00:00:11 #218 [Verbose] > │ and [<Struct>] US0 = │
00:00:11 #219 [Verbose] > │ | US0_0 │
00:00:11 #220 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:11 #221 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:11 #222 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:11 #223 [Verbose] > │ let v2 : bool = v1 < 10 │
00:00:11 #224 [Verbose] > │ v2 │
00:00:11 #225 [Verbose] > │ and method2 (v0 : int32, v1 : Mut1) : bool = │
00:00:11 #226 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:11 #227 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:11 #228 [Verbose] > │ v3 │
00:00:11 #229 [Verbose] > │ and method4 (v0 : UH0, v1 : int32) : int32 = │
00:00:11 #230 [Verbose] > │ match v0 with │
00:00:11 #231 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:11 #232 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:11 #233 [Verbose] > │ method4(v3, v4) │
00:00:11 #234 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:11 #235 [Verbose] > │ v1 │
00:00:11 #236 [Verbose] > │ and method5 (v0 : (int32 []), v1 : UH0, v2 : int32) : int32 = │
00:00:11 #237 [Verbose] > │ match v1 with │
00:00:11 #238 [Verbose] > │ | UH0_0(v3, v4) -> (* Cons *) │
00:00:11 #239 [Verbose] > │ v0.[int v2] <- v3 │
00:00:11 #240 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:11 #241 [Verbose] > │ method5(v0, v4, v5) │
00:00:11 #242 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:11 #243 [Verbose] > │ v2 │
00:00:11 #244 [Verbose] > │ and method3 (v0 : UH0) : (int32 []) = │
00:00:11 #245 [Verbose] > │ let v1 : int32 = 0 │
00:00:11 #246 [Verbose] > │ let v2 : int32 = method4(v0, v1) │
00:00:11 #247 [Verbose] > │ let v3 : (int32 []) = Array.zeroCreate<int32> (v2) │
00:00:11 #248 [Verbose] > │ let v4 : int32 = 0 │
00:00:11 #249 [Verbose] > │ let v5 : int32 = method5(v3, v0, v4) │
00:00:11 #250 [Verbose] > │ v3 │
00:00:11 #251 [Verbose] > │ and method6 (v0 : (int32 [])) : (int32 []) = │
00:00:11 #252 [Verbose] > │ v0 │
00:00:11 #253 [Verbose] > │ and method7 (v0 : (int32 []), v1 : (int32 []), v2 : int32) : bool = │
00:00:11 #254 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:11 #255 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:11 #256 [Verbose] > │ if v4 then │
00:00:11 #257 [Verbose] > │ let v5 : int32 = v0.[int v2] │
00:00:11 #258 [Verbose] > │ let v6 : int32 = v1.[int v2] │
00:00:11 #259 [Verbose] > │ let v7 : bool = v5 = v6 │
00:00:11 #260 [Verbose] > │ if v7 then │
00:00:11 #261 [Verbose] > │ let v8 : int32 = v2 + 1 │
00:00:11 #262 [Verbose] > │ method7(v0, v1, v8) │
00:00:11 #263 [Verbose] > │ else │
00:00:11 #264 [Verbose] > │ false │
00:00:11 #265 [Verbose] > │ else │
00:00:11 #266 [Verbose] > │ true │
00:00:11 #267 [Verbose] > │ and method8 (v0 : bool) : bool = │
00:00:11 #268 [Verbose] > │ v0 │
00:00:11 #269 [Verbose] > │ and method0 () : unit = │
00:00:11 #270 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (10) │
00:00:11 #271 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:11 #272 [Verbose] > │ while method1(v1) do │
00:00:11 #273 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:11 #274 [Verbose] > │ v0.[int v3] <- v3 │
00:00:11 #275 [Verbose] > │ let v4 : int32 = v3 + 1 │
00:00:11 #276 [Verbose] > │ v1.l0 <- v4 │
00:00:11 #277 [Verbose] > │ () │
00:00:11 #278 [Verbose] > │ let v5 : int32 = v0.Length │
00:00:11 #279 [Verbose] > │ let v6 : UH0 = UH0_1 │
00:00:11 #280 [Verbose] > │ let v7 : Mut1 = {l0 = 0; l1 = v6} : Mut1 │
00:00:11 #281 [Verbose] > │ while method2(v5, v7) do │
00:00:11 #282 [Verbose] > │ let v9 : int32 = v7.l0 │
00:00:11 #283 [Verbose] > │ let v10 : int32 = -v9 │
00:00:11 #284 [Verbose] > │ let v11 : int32 = v10 + v5 │
00:00:11 #285 [Verbose] > │ let v12 : int32 = v11 - 1 │
00:00:11 #286 [Verbose] > │ let v13 : UH0 = v7.l1 │
00:00:11 #287 [Verbose] > │ let v14 : int32 = v0.[int v12] │
00:00:11 #288 [Verbose] > │ let v15 : int32 = v14 % 2 │
00:00:11 #289 [Verbose] > │ let v16 : bool = v15 = 0 │
00:00:11 #290 [Verbose] > │ let v19 : US0 = │
00:00:11 #291 [Verbose] > │ if v16 then │
00:00:11 #292 [Verbose] > │ US0_1(v14) │
00:00:11 #293 [Verbose] > │ else │
00:00:11 #294 [Verbose] > │ US0_0 │
00:00:11 #295 [Verbose] > │ let v23 : UH0 = │
00:00:11 #296 [Verbose] > │ match v19 with │
00:00:11 #297 [Verbose] > │ | US0_0 -> (* None *) │
00:00:11 #298 [Verbose] > │ v13 │
00:00:11 #299 [Verbose] > │ | US0_1(v20) -> (* Some *) │
00:00:11 #300 [Verbose] > │ UH0_0(v20, v13) │
00:00:11 #301 [Verbose] > │ let v24 : int32 = v9 + 1 │
00:00:11 #302 [Verbose] > │ v7.l0 <- v24 │
00:00:11 #303 [Verbose] > │ v7.l1 <- v23 │
00:00:11 #304 [Verbose] > │ () │
00:00:11 #305 [Verbose] > │ let v25 : UH0 = v7.l1 │
00:00:11 #306 [Verbose] > │ let v26 : (int32 []) = method3(v25) │
00:00:11 #307 [Verbose] > │ let v27 : (int32 []) = [|0; 2; 4; 6; 8|] │
00:00:11 #308 [Verbose] > │ let v28 : (int32 []) = method6(v27) │
00:00:11 #309 [Verbose] > │ let v29 : int32 = v26.Length │
00:00:11 #310 [Verbose] > │ let v30 : int32 = v28.Length │
00:00:11 #311 [Verbose] > │ let v31 : bool = v29 = v30 │
00:00:11 #312 [Verbose] > │ let v32 : bool = v31 <> true │
00:00:11 #313 [Verbose] > │ let v35 : bool = │
00:00:11 #314 [Verbose] > │ if v32 then │
00:00:11 #315 [Verbose] > │ false │
00:00:11 #316 [Verbose] > │ else │
00:00:11 #317 [Verbose] > │ let v33 : int32 = 0 │
00:00:11 #318 [Verbose] > │ method7(v26, v28, v33) │
00:00:11 #319 [Verbose] > │ let v36 : bool = method8(v35) │
00:00:11 #320 [Verbose] > │ let v37 : string = $"__expect / actual: %A{v26} / expected: %A{v28}" │
00:00:11 #321 [Verbose] > │ let v38 : bool = v36 = false │
00:00:11 #322 [Verbose] > │ if v38 then │
00:00:11 #323 [Verbose] > │ failwith<unit> v37 │
00:00:11 #324 [Verbose] > │ method0() │
00:00:11 #325 [Verbose] > │ │
00:00:11 #326 [Verbose] > │ │
00:00:11 #327 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #328 [Verbose] >
00:00:11 #329 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #330 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #331 [Verbose] > │ ## sum │
00:00:11 #332 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #333 [Verbose] >
00:00:11 #334 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #335 [Verbose] > inl sum (a' : a _ _) =
00:00:11 #336 [Verbose] > a' |> am.fold (+) 0
00:00:12 #337 [Verbose] >
00:00:12 #338 [Verbose] > ╭─[ 213.70ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #339 [Verbose] > │ () │
00:00:12 #340 [Verbose] > │ │
00:00:12 #341 [Verbose] > │ │
00:00:12 #342 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #343 [Verbose] >
00:00:12 #344 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #345 [Verbose] > // // test
00:00:12 #346 [Verbose] >
00:00:12 #347 [Verbose] > am.init 10i32 id
00:00:12 #348 [Verbose] > |> sum
00:00:12 #349 [Verbose] > |> _assert_eq 45
00:00:12 #350 [Verbose] >
00:00:12 #351 [Verbose] > ╭─[ 255.36ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #352 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:12 #353 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : int32} │
00:00:12 #354 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:12 #355 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:12 #356 [Verbose] > │ let v2 : bool = v1 < 10 │
00:00:12 #357 [Verbose] > │ v2 │
00:00:12 #358 [Verbose] > │ and method2 (v0 : int32, v1 : Mut1) : bool = │
00:00:12 #359 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:12 #360 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:12 #361 [Verbose] > │ v3 │
00:00:12 #362 [Verbose] > │ and method3 (v0 : bool) : bool = │
00:00:12 #363 [Verbose] > │ v0 │
00:00:12 #364 [Verbose] > │ and method0 () : unit = │
00:00:12 #365 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (10) │
00:00:12 #366 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:12 #367 [Verbose] > │ while method1(v1) do │
00:00:12 #368 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:12 #369 [Verbose] > │ v0.[int v3] <- v3 │
00:00:12 #370 [Verbose] > │ let v4 : int32 = v3 + 1 │
00:00:12 #371 [Verbose] > │ v1.l0 <- v4 │
00:00:12 #372 [Verbose] > │ () │
00:00:12 #373 [Verbose] > │ let v5 : int32 = v0.Length │
00:00:12 #374 [Verbose] > │ let v6 : Mut1 = {l0 = 0; l1 = 0} : Mut1 │
00:00:12 #375 [Verbose] > │ while method2(v5, v6) do │
00:00:12 #376 [Verbose] > │ let v8 : int32 = v6.l0 │
00:00:12 #377 [Verbose] > │ let v9 : int32 = v6.l1 │
00:00:12 #378 [Verbose] > │ let v10 : int32 = v0.[int v8] │
00:00:12 #379 [Verbose] > │ let v11 : int32 = v9 + v10 │
00:00:12 #380 [Verbose] > │ let v12 : int32 = v8 + 1 │
00:00:12 #381 [Verbose] > │ v6.l0 <- v12 │
00:00:12 #382 [Verbose] > │ v6.l1 <- v11 │
00:00:12 #383 [Verbose] > │ () │
00:00:12 #384 [Verbose] > │ let v13 : int32 = v6.l1 │
00:00:12 #385 [Verbose] > │ let v14 : bool = v13 = 45 │
00:00:12 #386 [Verbose] > │ let v15 : bool = method3(v14) │
00:00:12 #387 [Verbose] > │ let v16 : string = $"__expect / actual: %A{v13} / expected: %A{45}" │
00:00:12 #388 [Verbose] > │ let v17 : bool = v15 = false │
00:00:12 #389 [Verbose] > │ if v17 then │
00:00:12 #390 [Verbose] > │ failwith<unit> v16 │
00:00:12 #391 [Verbose] > │ method0() │
00:00:12 #392 [Verbose] > │ │
00:00:12 #393 [Verbose] > │ │
00:00:12 #394 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #395 [Verbose] >
00:00:12 #396 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #397 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #398 [Verbose] > │ ## init_series │
00:00:12 #399 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #400 [Verbose] >
00:00:12 #401 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #402 [Verbose] > inl init_series start end inc =
00:00:12 #403 [Verbose] > inl total = conv ((end - start) / inc) + 1
00:00:12 #404 [Verbose] > am.init total (conv >> (*) inc >> (+) start) : a i32 _
00:00:12 #405 [Verbose] >
00:00:12 #406 [Verbose] > ╭─[ 186.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #407 [Verbose] > │ () │
00:00:12 #408 [Verbose] > │ │
00:00:12 #409 [Verbose] > │ │
00:00:12 #410 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #411 [Verbose] >
00:00:12 #412 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #413 [Verbose] > // // test
00:00:12 #414 [Verbose] >
00:00:12 #415 [Verbose] > init_series 0 1 0.5
00:00:12 #416 [Verbose] > |> _assert_eq (a ;[[0f64; 0.5; 1]])
00:00:12 #417 [Verbose] >
00:00:12 #418 [Verbose] > ╭─[ 272.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #419 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:12 #420 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:12 #421 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:12 #422 [Verbose] > │ let v2 : bool = v1 < 3 │
00:00:12 #423 [Verbose] > │ v2 │
00:00:12 #424 [Verbose] > │ and method2 (v0 : (float [])) : (float []) = │
00:00:12 #425 [Verbose] > │ v0 │
00:00:12 #426 [Verbose] > │ and method3 (v0 : (float []), v1 : (float []), v2 : int32) : bool = │
00:00:12 #427 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:12 #428 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:12 #429 [Verbose] > │ if v4 then │
00:00:12 #430 [Verbose] > │ let v5 : float = v0.[int v2] │
00:00:12 #431 [Verbose] > │ let v6 : float = v1.[int v2] │
00:00:12 #432 [Verbose] > │ let v7 : bool = v5 = v6 │
00:00:12 #433 [Verbose] > │ if v7 then │
00:00:12 #434 [Verbose] > │ let v8 : int32 = v2 + 1 │
00:00:12 #435 [Verbose] > │ method3(v0, v1, v8) │
00:00:12 #436 [Verbose] > │ else │
00:00:12 #437 [Verbose] > │ false │
00:00:12 #438 [Verbose] > │ else │
00:00:12 #439 [Verbose] > │ true │
00:00:12 #440 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:12 #441 [Verbose] > │ v0 │
00:00:12 #442 [Verbose] > │ and method0 () : unit = │
00:00:12 #443 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (3) │
00:00:12 #444 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:12 #445 [Verbose] > │ while method1(v1) do │
00:00:12 #446 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:12 #447 [Verbose] > │ let v4 : float = float v3 │
00:00:12 #448 [Verbose] > │ let v5 : float = 0.5 * v4 │
00:00:12 #449 [Verbose] > │ v0.[int v3] <- v5 │
00:00:12 #450 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:12 #451 [Verbose] > │ v1.l0 <- v6 │
00:00:12 #452 [Verbose] > │ () │
00:00:12 #453 [Verbose] > │ let v7 : (float []) = [|0.0; 0.5; 1.0|] │
00:00:12 #454 [Verbose] > │ let v8 : (float []) = method2(v7) │
00:00:12 #455 [Verbose] > │ let v9 : int32 = v0.Length │
00:00:12 #456 [Verbose] > │ let v10 : int32 = v8.Length │
00:00:12 #457 [Verbose] > │ let v11 : bool = v9 = v10 │
00:00:12 #458 [Verbose] > │ let v12 : bool = v11 <> true │
00:00:12 #459 [Verbose] > │ let v15 : bool = │
00:00:12 #460 [Verbose] > │ if v12 then │
00:00:12 #461 [Verbose] > │ false │
00:00:12 #462 [Verbose] > │ else │
00:00:12 #463 [Verbose] > │ let v13 : int32 = 0 │
00:00:12 #464 [Verbose] > │ method3(v0, v8, v13) │
00:00:12 #465 [Verbose] > │ let v16 : bool = method4(v15) │
00:00:12 #466 [Verbose] > │ let v17 : string = $"__expect / actual: %A{v0} / expected: %A{v8}" │
00:00:12 #467 [Verbose] > │ let v18 : bool = v16 = false │
00:00:12 #468 [Verbose] > │ if v18 then │
00:00:12 #469 [Verbose] > │ failwith<unit> v17 │
00:00:12 #470 [Verbose] > │ method0() │
00:00:12 #471 [Verbose] > │ │
00:00:12 #472 [Verbose] > │ │
00:00:12 #473 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #474 [Verbose] >
00:00:12 #475 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #476 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #477 [Verbose] > │ ## head │
00:00:12 #478 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #479 [Verbose] >
00:00:12 #480 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #481 [Verbose] > inl head (ar : a _ _) =
00:00:12 #482 [Verbose] > if var_is ar || length ar > 0
00:00:12 #483 [Verbose] > then index ar 0
00:00:12 #484 [Verbose] > else error_type "The length of the array should be greater than 0."
00:00:13 #485 [Verbose] >
00:00:13 #486 [Verbose] > ╭─[ 192.70ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #487 [Verbose] > │ () │
00:00:13 #488 [Verbose] > │ │
00:00:13 #489 [Verbose] > │ │
00:00:13 #490 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #491 [Verbose] >
00:00:13 #492 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #493 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #494 [Verbose] > │ ## last │
00:00:13 #495 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #496 [Verbose] >
00:00:13 #497 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #498 [Verbose] > inl last (ar : a _ _) =
00:00:13 #499 [Verbose] > inl len = length ar
00:00:13 #500 [Verbose] > if var_is ar || len > 0
00:00:13 #501 [Verbose] > then index ar (len - 1)
00:00:13 #502 [Verbose] > else error_type "The length of the array should be greater than 0."
00:00:13 #503 [Verbose] >
00:00:13 #504 [Verbose] > ╭─[ 228.34ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #505 [Verbose] > │ () │
00:00:13 #506 [Verbose] > │ │
00:00:13 #507 [Verbose] > │ │
00:00:13 #508 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #509 [Verbose] >
00:00:13 #510 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #511 [Verbose] > // // test
00:00:13 #512 [Verbose] >
00:00:13 #513 [Verbose] > am.init 10i32 id
00:00:13 #514 [Verbose] > |> last
00:00:13 #515 [Verbose] > |> _assert_eq 9
00:00:13 #516 [Verbose] >
00:00:13 #517 [Verbose] > ╭─[ 310.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #518 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:13 #519 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:13 #520 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:13 #521 [Verbose] > │ let v2 : bool = v1 < 10 │
00:00:13 #522 [Verbose] > │ v2 │
00:00:13 #523 [Verbose] > │ and method2 (v0 : bool) : bool = │
00:00:13 #524 [Verbose] > │ v0 │
00:00:13 #525 [Verbose] > │ and method0 () : unit = │
00:00:13 #526 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (10) │
00:00:13 #527 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:13 #528 [Verbose] > │ while method1(v1) do │
00:00:13 #529 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:13 #530 [Verbose] > │ v0.[int v3] <- v3 │
00:00:13 #531 [Verbose] > │ let v4 : int32 = v3 + 1 │
00:00:13 #532 [Verbose] > │ v1.l0 <- v4 │
00:00:13 #533 [Verbose] > │ () │
00:00:13 #534 [Verbose] > │ let v5 : int32 = v0.Length │
00:00:13 #535 [Verbose] > │ let v6 : int32 = v5 - 1 │
00:00:13 #536 [Verbose] > │ let v7 : int32 = v0.[int v6] │
00:00:13 #537 [Verbose] > │ let v8 : bool = v7 = 9 │
00:00:13 #538 [Verbose] > │ let v9 : bool = method2(v8) │
00:00:13 #539 [Verbose] > │ let v10 : string = $"__expect / actual: %A{v7} / expected: %A{9}" │
00:00:13 #540 [Verbose] > │ let v11 : bool = v9 = false │
00:00:13 #541 [Verbose] > │ if v11 then │
00:00:13 #542 [Verbose] > │ failwith<unit> v10 │
00:00:13 #543 [Verbose] > │ method0() │
00:00:13 #544 [Verbose] > │ │
00:00:13 #545 [Verbose] > │ │
00:00:13 #546 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #547 [Verbose] >
00:00:13 #548 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #549 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #550 [Verbose] > │ ## try_pick │
00:00:13 #551 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #552 [Verbose] >
00:00:13 #553 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #554 [Verbose] > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u =
00:00:13 #555 [Verbose] > (array, None)
00:00:13 #556 [Verbose] > ||> am.foldBack fun x acc =>
00:00:13 #557 [Verbose] > match acc with
00:00:13 #558 [Verbose] > | Some _ => acc
00:00:13 #559 [Verbose] > | None => x |> fn
00:00:14 #560 [Verbose] >
00:00:14 #561 [Verbose] > ╭─[ 567.34ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #562 [Verbose] > │ () │
00:00:14 #563 [Verbose] > │ │
00:00:14 #564 [Verbose] > │ │
00:00:14 #565 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #566 [Verbose] >
00:00:14 #567 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #568 [Verbose] > // // test
00:00:14 #569 [Verbose] >
00:00:14 #570 [Verbose] > am.init 10i32 id
00:00:14 #571 [Verbose] > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:00:14 #572 [Verbose] > |> _assert_eq (Some 5i32)
00:00:14 #573 [Verbose] >
00:00:14 #574 [Verbose] > ╭─[ 353.29ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #575 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:14 #576 [Verbose] > │ and [<Struct>] US0 = │
00:00:14 #577 [Verbose] > │ | US0_0 │
00:00:14 #578 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:14 #579 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : US0} │
00:00:14 #580 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:14 #581 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:14 #582 [Verbose] > │ let v2 : bool = v1 < 10 │
00:00:14 #583 [Verbose] > │ v2 │
00:00:14 #584 [Verbose] > │ and method2 (v0 : int32, v1 : Mut1) : bool = │
00:00:14 #585 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:14 #586 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:14 #587 [Verbose] > │ v3 │
00:00:14 #588 [Verbose] > │ and method3 (v0 : bool) : bool = │
00:00:14 #589 [Verbose] > │ v0 │
00:00:14 #590 [Verbose] > │ and method0 () : unit = │
00:00:14 #591 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (10) │
00:00:14 #592 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:14 #593 [Verbose] > │ while method1(v1) do │
00:00:14 #594 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:14 #595 [Verbose] > │ v0.[int v3] <- v3 │
00:00:14 #596 [Verbose] > │ let v4 : int32 = v3 + 1 │
00:00:14 #597 [Verbose] > │ v1.l0 <- v4 │
00:00:14 #598 [Verbose] > │ () │
00:00:14 #599 [Verbose] > │ let v5 : int32 = v0.Length │
00:00:14 #600 [Verbose] > │ let v6 : US0 = US0_0 │
00:00:14 #601 [Verbose] > │ let v7 : Mut1 = {l0 = 0; l1 = v6} : Mut1 │
00:00:14 #602 [Verbose] > │ while method2(v5, v7) do │
00:00:14 #603 [Verbose] > │ let v9 : int32 = v7.l0 │
00:00:14 #604 [Verbose] > │ let v10 : int32 = -v9 │
00:00:14 #605 [Verbose] > │ let v11 : int32 = v10 + v5 │
00:00:14 #606 [Verbose] > │ let v12 : int32 = v11 - 1 │
00:00:14 #607 [Verbose] > │ let v13 : US0 = v7.l1 │
00:00:14 #608 [Verbose] > │ let v14 : int32 = v0.[int v12] │
00:00:14 #609 [Verbose] > │ let v21 : US0 = │
00:00:14 #610 [Verbose] > │ match v13 with │
00:00:14 #611 [Verbose] > │ | US0_0 -> (* None *) │
00:00:14 #612 [Verbose] > │ let v16 : bool = v14 = 5 │
00:00:14 #613 [Verbose] > │ if v16 then │
00:00:14 #614 [Verbose] > │ US0_1(v14) │
00:00:14 #615 [Verbose] > │ else │
00:00:14 #616 [Verbose] > │ US0_0 │
00:00:14 #617 [Verbose] > │ | US0_1(v15) -> (* Some *) │
00:00:14 #618 [Verbose] > │ v13 │
00:00:14 #619 [Verbose] > │ let v22 : int32 = v9 + 1 │
00:00:14 #620 [Verbose] > │ v7.l0 <- v22 │
00:00:14 #621 [Verbose] > │ v7.l1 <- v21 │
00:00:14 #622 [Verbose] > │ () │
00:00:14 #623 [Verbose] > │ let v23 : US0 = v7.l1 │
00:00:14 #624 [Verbose] > │ let v27 : bool = │
00:00:14 #625 [Verbose] > │ match v23 with │
00:00:14 #626 [Verbose] > │ | US0_1(v25) -> (* Some *) │
00:00:14 #627 [Verbose] > │ let v26 : bool = v25 = 5 │
00:00:14 #628 [Verbose] > │ v26 │
00:00:14 #629 [Verbose] > │ | _ -> │
00:00:14 #630 [Verbose] > │ false │
00:00:14 #631 [Verbose] > │ let v28 : bool = method3(v27) │
00:00:14 #632 [Verbose] > │ let v29 : US0 = US0_1(5) │
00:00:14 #633 [Verbose] > │ let v30 : string = $"__expect / actual: %A{v23} / expected: %A{v29}" │
00:00:14 #634 [Verbose] > │ let v31 : bool = v28 = false │
00:00:14 #635 [Verbose] > │ if v31 then │
00:00:14 #636 [Verbose] > │ failwith<unit> v30 │
00:00:14 #637 [Verbose] > │ method0() │
00:00:14 #638 [Verbose] > │ │
00:00:14 #639 [Verbose] > │ │
00:00:14 #640 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #641 [Verbose] >
00:00:14 #642 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #643 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #644 [Verbose] > │ ## indexed' │
00:00:14 #645 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #646 [Verbose] >
00:00:14 #647 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #648 [Verbose] > inl indexed' forall t dim {int; number} dim' {int; number} u {number}. (ar : a
00:00:14 #649 [Verbose] > dim t) : a dim' (u * t) =
00:00:14 #650 [Verbose] > ((0, a ;[[]]), ar)
00:00:14 #651 [Verbose] > ||> am.fold fun (i, acc) x =>
00:00:14 #652 [Verbose] > i + 1, acc /@ a ;[[i, x]]
00:00:14 #653 [Verbose] > |> snd
00:00:14 #654 [Verbose] >
00:00:14 #655 [Verbose] > ╭─[ 208.52ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #656 [Verbose] > │ () │
00:00:14 #657 [Verbose] > │ │
00:00:14 #658 [Verbose] > │ │
00:00:14 #659 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #660 [Verbose] >
00:00:14 #661 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #662 [Verbose] > // // test
00:00:14 #663 [Verbose] >
00:00:14 #664 [Verbose] > am.init 3i32 ((*) 2)
00:00:14 #665 [Verbose] > |> indexed'
00:00:14 #666 [Verbose] > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:00:15 #667 [Verbose] >
00:00:15 #668 [Verbose] > ╭─[ 349.85ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #669 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:15 #670 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : int32; mutable l2 : (struct │
00:00:15 #671 [Verbose] > │ (int32 * int32) [])} │
00:00:15 #672 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:15 #673 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:15 #674 [Verbose] > │ let v2 : bool = v1 < 3 │
00:00:15 #675 [Verbose] > │ v2 │
00:00:15 #676 [Verbose] > │ and method2 (v0 : (struct (int32 * int32) [])) : (struct (int32 * int32) []) │
00:00:15 #677 [Verbose] > │ = │
00:00:15 #678 [Verbose] > │ v0 │
00:00:15 #679 [Verbose] > │ and method3 (v0 : int32, v1 : Mut1) : bool = │
00:00:15 #680 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:15 #681 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:15 #682 [Verbose] > │ v3 │
00:00:15 #683 [Verbose] > │ and method4 (v0 : int32, v1 : Mut0) : bool = │
00:00:15 #684 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:15 #685 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:15 #686 [Verbose] > │ v3 │
00:00:15 #687 [Verbose] > │ and method5 (v0 : (struct (int32 * int32) []), v1 : (struct (int32 * int32) │
00:00:15 #688 [Verbose] > │ []), v2 : int32) : bool = │
00:00:15 #689 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:15 #690 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:15 #691 [Verbose] > │ if v4 then │
00:00:15 #692 [Verbose] > │ let struct (v5 : int32, v6 : int32) = v0.[int v2] │
00:00:15 #693 [Verbose] > │ let struct (v7 : int32, v8 : int32) = v1.[int v2] │
00:00:15 #694 [Verbose] > │ let v9 : bool = v5 = v7 │
00:00:15 #695 [Verbose] > │ let v11 : bool = │
00:00:15 #696 [Verbose] > │ if v9 then │
00:00:15 #697 [Verbose] > │ let v10 : bool = v6 = v8 │
00:00:15 #698 [Verbose] > │ v10 │
00:00:15 #699 [Verbose] > │ else │
00:00:15 #700 [Verbose] > │ false │
00:00:15 #701 [Verbose] > │ if v11 then │
00:00:15 #702 [Verbose] > │ let v12 : int32 = v2 + 1 │
00:00:15 #703 [Verbose] > │ method5(v0, v1, v12) │
00:00:15 #704 [Verbose] > │ else │
00:00:15 #705 [Verbose] > │ false │
00:00:15 #706 [Verbose] > │ else │
00:00:15 #707 [Verbose] > │ true │
00:00:15 #708 [Verbose] > │ and method6 (v0 : bool) : bool = │
00:00:15 #709 [Verbose] > │ v0 │
00:00:15 #710 [Verbose] > │ and method0 () : unit = │
00:00:15 #711 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (3) │
00:00:15 #712 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:15 #713 [Verbose] > │ while method1(v1) do │
00:00:15 #714 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:15 #715 [Verbose] > │ let v4 : int32 = 2 * v3 │
00:00:15 #716 [Verbose] > │ v0.[int v3] <- v4 │
00:00:15 #717 [Verbose] > │ let v5 : int32 = v3 + 1 │
00:00:15 #718 [Verbose] > │ v1.l0 <- v5 │
00:00:15 #719 [Verbose] > │ () │
00:00:15 #720 [Verbose] > │ let v6 : (struct (int32 * int32) []) = [||] │
00:00:15 #721 [Verbose] > │ let v7 : (struct (int32 * int32) []) = method2(v6) │
00:00:15 #722 [Verbose] > │ let v8 : int32 = v0.Length │
00:00:15 #723 [Verbose] > │ let v9 : Mut1 = {l0 = 0; l1 = 0; l2 = v7} : Mut1 │
00:00:15 #724 [Verbose] > │ while method3(v8, v9) do │
00:00:15 #725 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:15 #726 [Verbose] > │ let struct (v12 : int32, v13 : (struct (int32 * int32) [])) = v9.l1, │
00:00:15 #727 [Verbose] > │ v9.l2 │
00:00:15 #728 [Verbose] > │ let v14 : int32 = v0.[int v11] │
00:00:15 #729 [Verbose] > │ let v15 : int32 = v12 + 1 │
00:00:15 #730 [Verbose] > │ let v16 : (struct (int32 * int32) []) = [|struct (v12, v14)|] │
00:00:15 #731 [Verbose] > │ let v17 : (struct (int32 * int32) []) = method2(v16) │
00:00:15 #732 [Verbose] > │ let v18 : int32 = v13.Length │
00:00:15 #733 [Verbose] > │ let v19 : int32 = v17.Length │
00:00:15 #734 [Verbose] > │ let v20 : int32 = v18 + v19 │
00:00:15 #735 [Verbose] > │ let v21 : (struct (int32 * int32) []) = Array.zeroCreate<struct │
00:00:15 #736 [Verbose] > │ (int32 * int32)> (v20) │
00:00:15 #737 [Verbose] > │ let v22 : Mut0 = {l0 = 0} : Mut0 │
00:00:15 #738 [Verbose] > │ while method4(v20, v22) do │
00:00:15 #739 [Verbose] > │ let v24 : int32 = v22.l0 │
00:00:15 #740 [Verbose] > │ let v25 : bool = v24 < v18 │
00:00:15 #741 [Verbose] > │ let struct (v31 : int32, v32 : int32) = │
00:00:15 #742 [Verbose] > │ if v25 then │
00:00:15 #743 [Verbose] > │ let struct (v26 : int32, v27 : int32) = v13.[int v24] │
00:00:15 #744 [Verbose] > │ struct (v26, v27) │
00:00:15 #745 [Verbose] > │ else │
00:00:15 #746 [Verbose] > │ let v28 : int32 = v24 - v18 │
00:00:15 #747 [Verbose] > │ let struct (v29 : int32, v30 : int32) = v17.[int v28] │
00:00:15 #748 [Verbose] > │ struct (v29, v30) │
00:00:15 #749 [Verbose] > │ v21.[int v24] <- struct (v31, v32) │
00:00:15 #750 [Verbose] > │ let v33 : int32 = v24 + 1 │
00:00:15 #751 [Verbose] > │ v22.l0 <- v33 │
00:00:15 #752 [Verbose] > │ () │
00:00:15 #753 [Verbose] > │ let v34 : int32 = v11 + 1 │
00:00:15 #754 [Verbose] > │ v9.l0 <- v34 │
00:00:15 #755 [Verbose] > │ v9.l1 <- v15 │
00:00:15 #756 [Verbose] > │ v9.l2 <- v21 │
00:00:15 #757 [Verbose] > │ () │
00:00:15 #758 [Verbose] > │ let struct (v35 : int32, v36 : (struct (int32 * int32) [])) = v9.l1, │
00:00:15 #759 [Verbose] > │ v9.l2 │
00:00:15 #760 [Verbose] > │ let v37 : (struct (int32 * int32) []) = [|struct (0, 0); struct (1, 2); │
00:00:15 #761 [Verbose] > │ struct (2, 4)|] │
00:00:15 #762 [Verbose] > │ let v38 : (struct (int32 * int32) []) = method2(v37) │
00:00:15 #763 [Verbose] > │ let v39 : int32 = v36.Length │
00:00:15 #764 [Verbose] > │ let v40 : int32 = v38.Length │
00:00:15 #765 [Verbose] > │ let v41 : bool = v39 = v40 │
00:00:15 #766 [Verbose] > │ let v42 : bool = v41 <> true │
00:00:15 #767 [Verbose] > │ let v45 : bool = │
00:00:15 #768 [Verbose] > │ if v42 then │
00:00:15 #769 [Verbose] > │ false │
00:00:15 #770 [Verbose] > │ else │
00:00:15 #771 [Verbose] > │ let v43 : int32 = 0 │
00:00:15 #772 [Verbose] > │ method5(v36, v38, v43) │
00:00:15 #773 [Verbose] > │ let v46 : bool = method6(v45) │
00:00:15 #774 [Verbose] > │ let v47 : string = $"__expect / actual: %A{v36} / expected: %A{v38}" │
00:00:15 #775 [Verbose] > │ let v48 : bool = v46 = false │
00:00:15 #776 [Verbose] > │ if v48 then │
00:00:15 #777 [Verbose] > │ failwith<unit> v47 │
00:00:15 #778 [Verbose] > │ method0() │
00:00:15 #779 [Verbose] > │ │
00:00:15 #780 [Verbose] > │ │
00:00:15 #781 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #782 [Verbose] >
00:00:15 #783 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #784 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #785 [Verbose] > │ ## map_base │
00:00:15 #786 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #787 [Verbose] >
00:00:15 #788 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #789 [Verbose] > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u =
00:00:15 #790 [Verbose] > a x
00:00:15 #791 [Verbose] > |> am.map fn
00:00:15 #792 [Verbose] > |> fun (a x : _ i64 _) => x
00:00:15 #793 [Verbose] >
00:00:15 #794 [Verbose] > ╭─[ 191.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #795 [Verbose] > │ () │
00:00:15 #796 [Verbose] > │ │
00:00:15 #797 [Verbose] > │ │
00:00:15 #798 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #799 [Verbose] >
00:00:15 #800 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #801 [Verbose] > inl average forall el {number}. (array : a _ el) : el =
00:00:15 #802 [Verbose] > $"!array |> Array.average"
00:00:15 #803 [Verbose] >
00:00:15 #804 [Verbose] > inl length forall dim el {number}. (array : a dim el) : dim =
00:00:15 #805 [Verbose] > $"!array |> Array.length"
00:00:15 #806 [Verbose] >
00:00:15 #807 [Verbose] > inl parallel_map forall dim el el'. (fn : el -> el') (array : a dim el) : a dim
00:00:15 #808 [Verbose] > el' =
00:00:15 #809 [Verbose] > $"!array |> Array.Parallel.map !fn"
00:00:15 #810 [Verbose] >
00:00:15 #811 [Verbose] > inl sort_by forall dim el. (fn : el -> _) (array : a dim el) : a dim el =
00:00:15 #812 [Verbose] > $"!array |> Array.sortBy !fn"
00:00:15 #813 [Verbose] >
00:00:15 #814 [Verbose] > inl sort_descending forall dim el. (array : a dim el) : a dim el =
00:00:15 #815 [Verbose] > $"!array |> Array.sortDescending"
00:00:15 #816 [Verbose] >
00:00:15 #817 [Verbose] > inl transpose forall dim el. (array : a dim (a dim el)) : a dim (a dim el) =
00:00:15 #818 [Verbose] > $"!array |> Array.transpose"
00:00:15 #819 [Verbose] >
00:00:15 #820 [Verbose] > inl try_item forall dim el. (i : i32) (array : a dim el) : option el =
00:00:15 #821 [Verbose] > $"!array |> Array.tryItem !i" |> optionm'.unbox
00:00:15 #822 [Verbose] >
00:00:15 #823 [Verbose] > ╭─[ 200.16ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #824 [Verbose] > │ () │
00:00:15 #825 [Verbose] > │ │
00:00:15 #826 [Verbose] > │ │
00:00:15 #827 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #828 [Verbose] >
00:00:15 #829 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #830 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #831 [Verbose] > │ ## indexed │
00:00:15 #832 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #833 [Verbose] >
00:00:15 #834 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #835 [Verbose] > inl indexed (array : a _ _) =
00:00:15 #836 [Verbose] > (([[]], 0), array)
00:00:15 #837 [Verbose] > ||> am.fold fun (acc, i) x =>
00:00:15 #838 [Verbose] > (i, x) :: acc, i + 1
00:00:15 #839 [Verbose] > |> fst
00:00:15 #840 [Verbose] > |> listm.rev
00:00:15 #841 [Verbose] > |> listm.toArray
00:00:15 #842 [Verbose] >
00:00:15 #843 [Verbose] > ╭─[ 180.79ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #844 [Verbose] > │ () │
00:00:15 #845 [Verbose] > │ │
00:00:15 #846 [Verbose] > │ │
00:00:15 #847 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #848 [Verbose] >
00:00:15 #849 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #850 [Verbose] > // // test
00:00:15 #851 [Verbose] >
00:00:15 #852 [Verbose] > am.init 3i32 ((*) 2)
00:00:15 #853 [Verbose] > |> indexed
00:00:15 #854 [Verbose] > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:00:16 #855 [Verbose] >
00:00:16 #856 [Verbose] > ╭─[ 342.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #857 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:16 #858 [Verbose] > │ and UH0 = │
00:00:16 #859 [Verbose] > │ | UH0_0 of int32 * int32 * UH0 │
00:00:16 #860 [Verbose] > │ | UH0_1 │
00:00:16 #861 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : UH0; mutable l2 : int32} │
00:00:16 #862 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:16 #863 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:16 #864 [Verbose] > │ let v2 : bool = v1 < 3 │
00:00:16 #865 [Verbose] > │ v2 │
00:00:16 #866 [Verbose] > │ and method2 (v0 : int32, v1 : Mut1) : bool = │
00:00:16 #867 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:16 #868 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:16 #869 [Verbose] > │ v3 │
00:00:16 #870 [Verbose] > │ and method3 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:16 #871 [Verbose] > │ match v0 with │
00:00:16 #872 [Verbose] > │ | UH0_0(v2, v3, v4) -> (* Cons *) │
00:00:16 #873 [Verbose] > │ let v5 : UH0 = UH0_0(v2, v3, v1) │
00:00:16 #874 [Verbose] > │ method3(v4, v5) │
00:00:16 #875 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:16 #876 [Verbose] > │ v1 │
00:00:16 #877 [Verbose] > │ and method5 (v0 : UH0, v1 : int32) : int32 = │
00:00:16 #878 [Verbose] > │ match v0 with │
00:00:16 #879 [Verbose] > │ | UH0_0(v2, v3, v4) -> (* Cons *) │
00:00:16 #880 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:16 #881 [Verbose] > │ method5(v4, v5) │
00:00:16 #882 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:16 #883 [Verbose] > │ v1 │
00:00:16 #884 [Verbose] > │ and method6 (v0 : (struct (int32 * int32) []), v1 : UH0, v2 : int32) : int32 │
00:00:16 #885 [Verbose] > │ = │
00:00:16 #886 [Verbose] > │ match v1 with │
00:00:16 #887 [Verbose] > │ | UH0_0(v3, v4, v5) -> (* Cons *) │
00:00:16 #888 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:16 #889 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:16 #890 [Verbose] > │ method6(v0, v5, v6) │
00:00:16 #891 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:16 #892 [Verbose] > │ v2 │
00:00:16 #893 [Verbose] > │ and method4 (v0 : UH0) : (struct (int32 * int32) []) = │
00:00:16 #894 [Verbose] > │ let v1 : int32 = 0 │
00:00:16 #895 [Verbose] > │ let v2 : int32 = method5(v0, v1) │
00:00:16 #896 [Verbose] > │ let v3 : (struct (int32 * int32) []) = Array.zeroCreate<struct (int32 * │
00:00:16 #897 [Verbose] > │ int32)> (v2) │
00:00:16 #898 [Verbose] > │ let v4 : int32 = 0 │
00:00:16 #899 [Verbose] > │ let v5 : int32 = method6(v3, v0, v4) │
00:00:16 #900 [Verbose] > │ v3 │
00:00:16 #901 [Verbose] > │ and method7 (v0 : (struct (int32 * int32) [])) : (struct (int32 * int32) []) │
00:00:16 #902 [Verbose] > │ = │
00:00:16 #903 [Verbose] > │ v0 │
00:00:16 #904 [Verbose] > │ and method8 (v0 : (struct (int32 * int32) []), v1 : (struct (int32 * int32) │
00:00:16 #905 [Verbose] > │ []), v2 : int32) : bool = │
00:00:16 #906 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:16 #907 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:16 #908 [Verbose] > │ if v4 then │
00:00:16 #909 [Verbose] > │ let struct (v5 : int32, v6 : int32) = v0.[int v2] │
00:00:16 #910 [Verbose] > │ let struct (v7 : int32, v8 : int32) = v1.[int v2] │
00:00:16 #911 [Verbose] > │ let v9 : bool = v5 = v7 │
00:00:16 #912 [Verbose] > │ let v11 : bool = │
00:00:16 #913 [Verbose] > │ if v9 then │
00:00:16 #914 [Verbose] > │ let v10 : bool = v6 = v8 │
00:00:16 #915 [Verbose] > │ v10 │
00:00:16 #916 [Verbose] > │ else │
00:00:16 #917 [Verbose] > │ false │
00:00:16 #918 [Verbose] > │ if v11 then │
00:00:16 #919 [Verbose] > │ let v12 : int32 = v2 + 1 │
00:00:16 #920 [Verbose] > │ method8(v0, v1, v12) │
00:00:16 #921 [Verbose] > │ else │
00:00:16 #922 [Verbose] > │ false │
00:00:16 #923 [Verbose] > │ else │
00:00:16 #924 [Verbose] > │ true │
00:00:16 #925 [Verbose] > │ and method9 (v0 : bool) : bool = │
00:00:16 #926 [Verbose] > │ v0 │
00:00:16 #927 [Verbose] > │ and method0 () : unit = │
00:00:16 #928 [Verbose] > │ let v0 : (int32 []) = Array.zeroCreate<int32> (3) │
00:00:16 #929 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:16 #930 [Verbose] > │ while method1(v1) do │
00:00:16 #931 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:16 #932 [Verbose] > │ let v4 : int32 = 2 * v3 │
00:00:16 #933 [Verbose] > │ v0.[int v3] <- v4 │
00:00:16 #934 [Verbose] > │ let v5 : int32 = v3 + 1 │
00:00:16 #935 [Verbose] > │ v1.l0 <- v5 │
00:00:16 #936 [Verbose] > │ () │
00:00:16 #937 [Verbose] > │ let v6 : int32 = v0.Length │
00:00:16 #938 [Verbose] > │ let v7 : UH0 = UH0_1 │
00:00:16 #939 [Verbose] > │ let v8 : Mut1 = {l0 = 0; l1 = v7; l2 = 0} : Mut1 │
00:00:16 #940 [Verbose] > │ while method2(v6, v8) do │
00:00:16 #941 [Verbose] > │ let v10 : int32 = v8.l0 │
00:00:16 #942 [Verbose] > │ let struct (v11 : UH0, v12 : int32) = v8.l1, v8.l2 │
00:00:16 #943 [Verbose] > │ let v13 : int32 = v0.[int v10] │
00:00:16 #944 [Verbose] > │ let v14 : int32 = v12 + 1 │
00:00:16 #945 [Verbose] > │ let v15 : int32 = v10 + 1 │
00:00:16 #946 [Verbose] > │ let v16 : UH0 = UH0_0(v12, v13, v11) │
00:00:16 #947 [Verbose] > │ v8.l0 <- v15 │
00:00:16 #948 [Verbose] > │ v8.l1 <- v16 │
00:00:16 #949 [Verbose] > │ v8.l2 <- v14 │
00:00:16 #950 [Verbose] > │ () │
00:00:16 #951 [Verbose] > │ let struct (v17 : UH0, v18 : int32) = v8.l1, v8.l2 │
00:00:16 #952 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:16 #953 [Verbose] > │ let v20 : UH0 = method3(v17, v19) │
00:00:16 #954 [Verbose] > │ let v21 : (struct (int32 * int32) []) = method4(v20) │
00:00:16 #955 [Verbose] > │ let v22 : (struct (int32 * int32) []) = [|struct (0, 0); struct (1, 2); │
00:00:16 #956 [Verbose] > │ struct (2, 4)|] │
00:00:16 #957 [Verbose] > │ let v23 : (struct (int32 * int32) []) = method7(v22) │
00:00:16 #958 [Verbose] > │ let v24 : int32 = v21.Length │
00:00:16 #959 [Verbose] > │ let v25 : int32 = v23.Length │
00:00:16 #960 [Verbose] > │ let v26 : bool = v24 = v25 │
00:00:16 #961 [Verbose] > │ let v27 : bool = v26 <> true │
00:00:16 #962 [Verbose] > │ let v30 : bool = │
00:00:16 #963 [Verbose] > │ if v27 then │
00:00:16 #964 [Verbose] > │ false │
00:00:16 #965 [Verbose] > │ else │
00:00:16 #966 [Verbose] > │ let v28 : int32 = 0 │
00:00:16 #967 [Verbose] > │ method8(v21, v23, v28) │
00:00:16 #968 [Verbose] > │ let v31 : bool = method9(v30) │
00:00:16 #969 [Verbose] > │ let v32 : string = $"__expect / actual: %A{v21} / expected: %A{v23}" │
00:00:16 #970 [Verbose] > │ let v33 : bool = v31 = false │
00:00:16 #971 [Verbose] > │ if v33 then │
00:00:16 #972 [Verbose] > │ failwith<unit> v32 │
00:00:16 #973 [Verbose] > │ method0() │
00:00:16 #974 [Verbose] > │ │
00:00:16 #975 [Verbose] > │ │
00:00:16 #976 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #977 [Verbose] >
00:00:16 #978 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #979 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #980 [Verbose] > │ ## from_vec │
00:00:16 #981 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #982 [Verbose] >
00:00:16 #983 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #984 [Verbose] > inl from_vec forall dim el. (vec : vec el) : a dim el =
00:00:16 #985 [Verbose] > inl vec = join vec
00:00:16 #986 [Verbose] > !\($'"fable_library_rust::NativeArray_::array_from(!vec)"')
00:00:16 #987 [Verbose] >
00:00:16 #988 [Verbose] > ╭─[ 227.04ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #989 [Verbose] > │ () │
00:00:16 #990 [Verbose] > │ │
00:00:16 #991 [Verbose] > │ │
00:00:16 #992 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #993 [Verbose] >
00:00:16 #994 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #995 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #996 [Verbose] > │ ## to_vec │
00:00:16 #997 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #998 [Verbose] >
00:00:16 #999 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #1000 [Verbose] > inl to_vec forall t. (ar : array_base t) : vec t =
00:00:16 #1001 [Verbose] > inl ar = join ar
00:00:16 #1002 [Verbose] > !\($'"!ar.to_vec()"')
00:00:16 #1003 [Verbose] >
00:00:16 #1004 [Verbose] > ╭─[ 197.77ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1005 [Verbose] > │ () │
00:00:16 #1006 [Verbose] > │ │
00:00:16 #1007 [Verbose] > │ │
00:00:16 #1008 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1009 [Verbose] >
00:00:16 #1010 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #1011 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #1012 [Verbose] > │ ## map_vec │
00:00:16 #1013 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1014 [Verbose] >
00:00:16 #1015 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #1016 [Verbose] > inl map_vec forall dim t u. (fn : t -> u) (ar : a dim t) : a dim u =
00:00:16 #1017 [Verbose] > inl fn = join fn
00:00:16 #1018 [Verbose] > inl (a ar) = ar
00:00:16 #1019 [Verbose] > inl ar = ar |> to_vec
00:00:16 #1020 [Verbose] > !\($'"!ar.iter().map(|x| !fn(x.clone())).collect()"')
00:00:16 #1021 [Verbose] > |> from_vec
00:00:16 #1022 [Verbose] >
00:00:16 #1023 [Verbose] > ╭─[ 247.25ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1024 [Verbose] > │ () │
00:00:16 #1025 [Verbose] > │ │
00:00:16 #1026 [Verbose] > │ │
00:00:16 #1027 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1028 [Verbose] >
00:00:16 #1029 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #1030 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #1031 [Verbose] > │ ## mapi_vec │
00:00:16 #1032 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1033 [Verbose] >
00:00:16 #1034 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #1035 [Verbose] > inl mapi_vec forall dim t u. (fn : dim -> t -> u) (ar : a dim t) : a dim u =
00:00:16 #1036 [Verbose] > inl fn = join fn
00:00:16 #1037 [Verbose] > inl (a ar) = ar
00:00:16 #1038 [Verbose] > inl ar = ar |> to_vec
00:00:16 #1039 [Verbose] > !\($'"!ar.iter().enumerate().map(|(i, x)|
00:00:16 #1040 [Verbose] > !fn(i.try_into().unwrap())(x.clone())).collect()"')
00:00:16 #1041 [Verbose] > |> from_vec
00:00:17 #1042 [Verbose] >
00:00:17 #1043 [Verbose] > ╭─[ 220.14ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1044 [Verbose] > │ () │
00:00:17 #1045 [Verbose] > │ │
00:00:17 #1046 [Verbose] > │ │
00:00:17 #1047 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1048 [Verbose] >
00:00:17 #1049 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1050 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1051 [Verbose] > │ ## filter_vec │
00:00:17 #1052 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1053 [Verbose] >
00:00:17 #1054 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1055 [Verbose] > inl filter_vec forall dim t. (fn : t -> bool) (ar : a dim t) : a dim t =
00:00:17 #1056 [Verbose] > inl fn = join fn
00:00:17 #1057 [Verbose] > inl (a ar) = ar
00:00:17 #1058 [Verbose] > inl ar = ar |> to_vec
00:00:17 #1059 [Verbose] > !\($'"!ar.into_iter().filter(|x| !fn(x.clone().clone())).collect()"')
00:00:17 #1060 [Verbose] > |> from_vec
00:00:17 #1061 [Verbose] >
00:00:17 #1062 [Verbose] > ╭─[ 190.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1063 [Verbose] > │ () │
00:00:17 #1064 [Verbose] > │ │
00:00:17 #1065 [Verbose] > │ │
00:00:17 #1066 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1067 [Verbose] >
00:00:17 #1068 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1069 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1070 [Verbose] > │ ## vec_push │
00:00:17 #1071 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1072 [Verbose] >
00:00:17 #1073 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1074 [Verbose] > inl vec_push forall el. (el : el) (vec : vec el) : vec el =
00:00:17 #1075 [Verbose] > inl el = join el
00:00:17 #1076 [Verbose] > inl vec = join vec
00:00:17 #1077 [Verbose] > !\($'"let mut !vec = !vec"')
00:00:17 #1078 [Verbose] > // inl vec = vec |> rust.to_mut
00:00:17 #1079 [Verbose] > !\($'"!vec.push(!el)"')
00:00:17 #1080 [Verbose] > !\($'"!vec"')
00:00:17 #1081 [Verbose] >
00:00:17 #1082 [Verbose] > ╭─[ 231.05ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1083 [Verbose] > │ () │
00:00:17 #1084 [Verbose] > │ │
00:00:17 #1085 [Verbose] > │ │
00:00:17 #1086 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1087 [Verbose] >
00:00:17 #1088 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1089 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1090 [Verbose] > │ ## vec_reverse │
00:00:17 #1091 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1092 [Verbose] >
00:00:17 #1093 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1094 [Verbose] > inl vec_reverse forall el. (vec : vec el) : vec el =
00:00:17 #1095 [Verbose] > inl vec = join vec
00:00:17 #1096 [Verbose] > !\($'"let mut !vec = !vec"')
00:00:17 #1097 [Verbose] > !\($'"!vec.reverse()"')
00:00:17 #1098 [Verbose] > !\($'"!vec"')
00:00:17 #1099 [Verbose] >
00:00:17 #1100 [Verbose] > ╭─[ 351.90ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1101 [Verbose] > │ () │
00:00:17 #1102 [Verbose] > │ │
00:00:17 #1103 [Verbose] > │ │
00:00:17 #1104 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1105 [Verbose] >
00:00:17 #1106 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1107 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1108 [Verbose] > │ ## vec_retain │
00:00:17 #1109 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1110 [Verbose] >
00:00:17 #1111 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1112 [Verbose] > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el =
00:00:17 #1113 [Verbose] > inl vec = join vec
00:00:17 #1114 [Verbose] > inl fn = join fn
00:00:17 #1115 [Verbose] > !\($'"let mut !vec = !vec"')
00:00:17 #1116 [Verbose] > // inl vec = vec |> rust.to_mut
00:00:17 #1117 [Verbose] > !\($'"!vec.retain(|x| !fn(x.clone()))"')
00:00:17 #1118 [Verbose] > !\($'"!vec"')
00:00:18 #1119 [Verbose] >
00:00:18 #1120 [Verbose] > ╭─[ 226.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1121 [Verbose] > │ () │
00:00:18 #1122 [Verbose] > │ │
00:00:18 #1123 [Verbose] > │ │
00:00:18 #1124 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1125 [Verbose] >
00:00:18 #1126 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #1127 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #1128 [Verbose] > │ ## vec_sort_by_key │
00:00:18 #1129 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1130 [Verbose] >
00:00:18 #1131 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1132 [Verbose] > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el =
00:00:18 #1133 [Verbose] > inl vec = join vec
00:00:18 #1134 [Verbose] > inl fn = join fn
00:00:18 #1135 [Verbose] > !\($'"let mut !vec = !vec"')
00:00:18 #1136 [Verbose] > // inl vec = vec |> rust.to_mut
00:00:18 #1137 [Verbose] > !\($'"!vec.sort_by_key(|x| !fn(x.clone()))"')
00:00:18 #1138 [Verbose] > !\($'"!vec"')
00:00:18 #1139 [Verbose] >
00:00:18 #1140 [Verbose] > ╭─[ 213.86ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1141 [Verbose] > │ () │
00:00:18 #1142 [Verbose] > │ │
00:00:18 #1143 [Verbose] > │ │
00:00:18 #1144 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1145 [Verbose] >
00:00:18 #1146 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #1147 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #1148 [Verbose] > │ ## vec_extend │
00:00:18 #1149 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1150 [Verbose] >
00:00:18 #1151 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1152 [Verbose] > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el =
00:00:18 #1153 [Verbose] > inl el = join el
00:00:18 #1154 [Verbose] > inl vec = join vec
00:00:18 #1155 [Verbose] > !\($'"let mut !vec = !vec"')
00:00:18 #1156 [Verbose] > // inl vec = vec |> rust.to_mut
00:00:18 #1157 [Verbose] > !\($'"!vec.extend(!el)"')
00:00:18 #1158 [Verbose] > !\($'"!vec"')
00:00:18 #1159 [Verbose] >
00:00:18 #1160 [Verbose] > ╭─[ 194.34ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1161 [Verbose] > │ () │
00:00:18 #1162 [Verbose] > │ │
00:00:18 #1163 [Verbose] > │ │
00:00:18 #1164 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1165 [Verbose] >
00:00:18 #1166 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #1167 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #1168 [Verbose] > │ ## vec_collect │
00:00:18 #1169 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1170 [Verbose] >
00:00:18 #1171 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1172 [Verbose] > inl vec_collect vec =
00:00:18 #1173 [Verbose] > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _))
00:00:18 #1174 [Verbose] > ||> am.fold fun acc x =>
00:00:18 #1175 [Verbose] > acc |> vec_extend x
00:00:18 #1176 [Verbose] >
00:00:18 #1177 [Verbose] > ╭─[ 227.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1178 [Verbose] > │ () │
00:00:18 #1179 [Verbose] > │ │
00:00:18 #1180 [Verbose] > │ │
00:00:18 #1181 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1182 [Verbose] >
00:00:18 #1183 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #1184 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #1185 [Verbose] > │ ## vec_collect' │
00:00:18 #1186 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1187 [Verbose] >
00:00:18 #1188 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1189 [Verbose] > inl vec_collect' vec =
00:00:18 #1190 [Verbose] > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _))
00:00:18 #1191 [Verbose] > ||> am.fold fun acc x =>
00:00:18 #1192 [Verbose] > x
00:00:18 #1193 [Verbose] > |> resultm.unbox
00:00:18 #1194 [Verbose] > |> fun x =>
00:00:18 #1195 [Verbose] > match acc, x |> resultm.map optionm'.unbox with
00:00:18 #1196 [Verbose] > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok
00:00:18 #1197 [Verbose] > | _, Error error => error |> Error
00:00:18 #1198 [Verbose] > | _ => acc
00:00:19 #1199 [Verbose] >
00:00:19 #1200 [Verbose] > ╭─[ 183.23ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1201 [Verbose] > │ () │
00:00:19 #1202 [Verbose] > │ │
00:00:19 #1203 [Verbose] > │ │
00:00:19 #1204 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1205 [Verbose] >
00:00:19 #1206 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1207 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1208 [Verbose] > │ ## vec_mapi │
00:00:19 #1209 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1210 [Verbose] >
00:00:19 #1211 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1212 [Verbose] > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u =
00:00:19 #1213 [Verbose] > inl fn = join fn
00:00:19 #1214 [Verbose] > inl ar = join ar
00:00:19 #1215 [Verbose] > !\($'"!ar.iter().enumerate().map(|(i, x)|
00:00:19 #1216 [Verbose] > !fn(i.try_into().unwrap())(x.clone())).collect()"')
00:00:19 #1217 [Verbose] >
00:00:19 #1218 [Verbose] > ╭─[ 213.52ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1219 [Verbose] > │ () │
00:00:19 #1220 [Verbose] > │ │
00:00:19 #1221 [Verbose] > │ │
00:00:19 #1222 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1223 [Verbose] >
00:00:19 #1224 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1225 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1226 [Verbose] > │ ## vec_map │
00:00:19 #1227 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1228 [Verbose] >
00:00:19 #1229 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1230 [Verbose] > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:00:19 #1231 [Verbose] > inl fn = join fn
00:00:19 #1232 [Verbose] > inl ar = join ar
00:00:19 #1233 [Verbose] > !\($'"!ar.iter().map(|x| !fn(x.clone())).collect()"')
00:00:19 #1234 [Verbose] >
00:00:19 #1235 [Verbose] > ╭─[ 196.34ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1236 [Verbose] > │ () │
00:00:19 #1237 [Verbose] > │ │
00:00:19 #1238 [Verbose] > │ │
00:00:19 #1239 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1240 [Verbose] >
00:00:19 #1241 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1242 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1243 [Verbose] > │ ## enumerate │
00:00:19 #1244 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1245 [Verbose] >
00:00:19 #1246 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1247 [Verbose] > inl enumerate forall dim {int; number} t. (ar : a dim t) : a dim (unativeint *
00:00:19 #1248 [Verbose] > t) =
00:00:19 #1249 [Verbose] > inl (a ar) = ar
00:00:19 #1250 [Verbose] > inl ar = ar |> to_vec
00:00:19 #1251 [Verbose] > !\($'"!ar.into_iter().enumerate().map(std::rc::Rc::new).collect()"')
00:00:19 #1252 [Verbose] > |> from_vec
00:00:19 #1253 [Verbose] > |> map_vec from_pair
00:00:19 #1254 [Verbose] >
00:00:19 #1255 [Verbose] > ╭─[ 214.16ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1256 [Verbose] > │ () │
00:00:19 #1257 [Verbose] > │ │
00:00:19 #1258 [Verbose] > │ │
00:00:19 #1259 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1260 [Verbose] >
00:00:19 #1261 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1262 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1263 [Verbose] > │ ## slice' │
00:00:19 #1264 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1265 [Verbose] >
00:00:19 #1266 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1267 [Verbose] > inl slice' forall dim el. (x : option el) : slice' el dim =
00:00:19 #1268 [Verbose] > match x with
00:00:19 #1269 [Verbose] > | Some x => !\($'"[[!x]]"')
00:00:19 #1270 [Verbose] > | None =>
00:00:19 #1271 [Verbose] > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim
00:00:19 #1272 [Verbose] > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) :
00:00:19 #1273 [Verbose] > slice' el 10
00:00:19 #1274 [Verbose] > // !\( : string) : slice' el i32 // !\($'"[[]]"')
00:00:19 #1275 [Verbose] >
00:00:19 #1276 [Verbose] > ╭─[ 228.24ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1277 [Verbose] > │ () │
00:00:19 #1278 [Verbose] > │ │
00:00:19 #1279 [Verbose] > │ │
00:00:19 #1280 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1281 [Verbose] >
00:00:19 #1282 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1283 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1284 [Verbose] > │ ## as_slice │
00:00:19 #1285 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1286 [Verbose] >
00:00:19 #1287 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1288 [Verbose] > inl as_slice forall t. (x : array_base t) : rust.ref' (slice t) =
00:00:19 #1289 [Verbose] > inl x = x |> to_vec
00:00:19 #1290 [Verbose] > !\($'"!x.as_slice()"')
00:00:20 #1291 [Verbose] >
00:00:20 #1292 [Verbose] > ╭─[ 199.56ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #1293 [Verbose] > │ () │
00:00:20 #1294 [Verbose] > │ │
00:00:20 #1295 [Verbose] > │ │
00:00:20 #1296 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1297 [Verbose] > [NbConvertApp] Converting notebook am'.dib.ipynb to html
00:00:22 #1298 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:22 #1299 [Verbose] > validate(nb)
00:00:22 #1300 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:22 #1301 [Verbose] > return _pygments_highlight(
00:00:23 #1302 [Verbose] > [NbConvertApp] Writing 387240 bytes to am'.dib.html
00:00:24 #1303 [Debug] executeAsync / exitCode: 0 / output.Length: 85285
00:00:24 #1304 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 \"listm'.dib\"""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # listm │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:02 #13 [Verbose] >
00:00:02 #14 [Verbose] > prototype append t : t -> t -> t
00:00:07 #15 [Verbose] >
00:00:07 #16 [Verbose] > ╭─[ 4.26s - stdout ]───────────────────────────────────────────────────────────╮
00:00:07 #17 [Verbose] > │ () │
00:00:07 #18 [Verbose] > │ │
00:00:07 #19 [Verbose] > │ │
00:00:07 #20 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #21 [Verbose] >
00:00:07 #22 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #23 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #24 [Verbose] > │ ## append │
00:00:07 #25 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #26 [Verbose] >
00:00:07 #27 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #28 [Verbose] > instance append list t =
00:00:07 #29 [Verbose] > listm.append
00:00:07 #30 [Verbose] >
00:00:07 #31 [Verbose] > ╭─[ 363.76ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #32 [Verbose] > │ () │
00:00:07 #33 [Verbose] > │ │
00:00:07 #34 [Verbose] > │ │
00:00:07 #35 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #36 [Verbose] >
00:00:07 #37 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #38 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #39 [Verbose] > │ ## /@ │
00:00:07 #40 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #41 [Verbose] >
00:00:07 #42 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #43 [Verbose] > inl (/@) a b =
00:00:07 #44 [Verbose] > b |> append a
00:00:07 #45 [Verbose] >
00:00:07 #46 [Verbose] > ╭─[ 198.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #47 [Verbose] > │ () │
00:00:07 #48 [Verbose] > │ │
00:00:07 #49 [Verbose] > │ │
00:00:07 #50 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #51 [Verbose] >
00:00:07 #52 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #53 [Verbose] > // // test
00:00:07 #54 [Verbose] >
00:00:07 #55 [Verbose] > [[ "a"; "b" ]] /@ [[ "c"; "d" ]]
00:00:07 #56 [Verbose] > |> _assert_eq [[ "a"; "b"; "c"; "d" ]]
00:00:09 #57 [Verbose] >
00:00:09 #58 [Verbose] > ╭─[ 1.24s - stdout ]───────────────────────────────────────────────────────────╮
00:00:09 #59 [Verbose] > │ type UH0 = │
00:00:09 #60 [Verbose] > │ | UH0_0 of string * UH0 │
00:00:09 #61 [Verbose] > │ | UH0_1 │
00:00:09 #62 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #63 [Verbose] > │ true │
00:00:09 #64 [Verbose] > │ and method0 () : unit = │
00:00:09 #65 [Verbose] > │ let v43 : bool = method1() │
00:00:09 #66 [Verbose] > │ let v44 : string = "a" │
00:00:09 #67 [Verbose] > │ let v45 : string = "b" │
00:00:09 #68 [Verbose] > │ let v46 : string = "c" │
00:00:09 #69 [Verbose] > │ let v47 : string = "d" │
00:00:09 #70 [Verbose] > │ let v48 : UH0 = UH0_1 │
00:00:09 #71 [Verbose] > │ let v49 : UH0 = UH0_0(v47, v48) │
00:00:09 #72 [Verbose] > │ let v50 : UH0 = UH0_0(v46, v49) │
00:00:09 #73 [Verbose] > │ let v51 : UH0 = UH0_0(v45, v50) │
00:00:09 #74 [Verbose] > │ let v52 : UH0 = UH0_0(v44, v51) │
00:00:09 #75 [Verbose] > │ let v53 : UH0 = UH0_1 │
00:00:09 #76 [Verbose] > │ let v54 : UH0 = UH0_0(v47, v53) │
00:00:09 #77 [Verbose] > │ let v55 : UH0 = UH0_0(v46, v54) │
00:00:09 #78 [Verbose] > │ let v56 : UH0 = UH0_0(v45, v55) │
00:00:09 #79 [Verbose] > │ let v57 : UH0 = UH0_0(v44, v56) │
00:00:09 #80 [Verbose] > │ let v58 : string = $"__expect / actual: %A{v52} / expected: %A{v57}" │
00:00:09 #81 [Verbose] > │ let v59 : bool = v43 = false │
00:00:09 #82 [Verbose] > │ if v59 then │
00:00:09 #83 [Verbose] > │ failwith<unit> v58 │
00:00:09 #84 [Verbose] > │ method0() │
00:00:09 #85 [Verbose] > │ │
00:00:09 #86 [Verbose] > │ │
00:00:09 #87 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #88 [Verbose] >
00:00:09 #89 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #90 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #91 [Verbose] > │ ## init_series │
00:00:09 #92 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #93 [Verbose] >
00:00:09 #94 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #95 [Verbose] > inl init_series start end inc =
00:00:09 #96 [Verbose] > inl total : f64 = conv ((end - start) / inc) + 1
00:00:09 #97 [Verbose] > listm.init total (conv >> (*) inc >> (+) start)
00:00:09 #98 [Verbose] >
00:00:09 #99 [Verbose] > ╭─[ 225.72ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #100 [Verbose] > │ () │
00:00:09 #101 [Verbose] > │ │
00:00:09 #102 [Verbose] > │ │
00:00:09 #103 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #104 [Verbose] >
00:00:09 #105 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #106 [Verbose] > // // test
00:00:09 #107 [Verbose] >
00:00:09 #108 [Verbose] > init_series 0 1 0.5
00:00:09 #109 [Verbose] > |> _assert_eq [[ 0f64; 0.5; 1 ]]
00:00:09 #110 [Verbose] >
00:00:09 #111 [Verbose] > ╭─[ 293.00ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #112 [Verbose] > │ type UH0 = │
00:00:09 #113 [Verbose] > │ | UH0_0 of float * UH0 │
00:00:09 #114 [Verbose] > │ | UH0_1 │
00:00:09 #115 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #116 [Verbose] > │ true │
00:00:09 #117 [Verbose] > │ and method0 () : unit = │
00:00:09 #118 [Verbose] > │ let v18 : bool = method1() │
00:00:09 #119 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:09 #120 [Verbose] > │ let v20 : UH0 = UH0_0(1.0, v19) │
00:00:09 #121 [Verbose] > │ let v21 : UH0 = UH0_0(0.5, v20) │
00:00:09 #122 [Verbose] > │ let v22 : UH0 = UH0_0(0.0, v21) │
00:00:09 #123 [Verbose] > │ let v23 : UH0 = UH0_1 │
00:00:09 #124 [Verbose] > │ let v24 : UH0 = UH0_0(1.0, v23) │
00:00:09 #125 [Verbose] > │ let v25 : UH0 = UH0_0(0.5, v24) │
00:00:09 #126 [Verbose] > │ let v26 : UH0 = UH0_0(0.0, v25) │
00:00:09 #127 [Verbose] > │ let v27 : string = $"__expect / actual: %A{v22} / expected: %A{v26}" │
00:00:09 #128 [Verbose] > │ let v28 : bool = v18 = false │
00:00:09 #129 [Verbose] > │ if v28 then │
00:00:09 #130 [Verbose] > │ failwith<unit> v27 │
00:00:09 #131 [Verbose] > │ method0() │
00:00:09 #132 [Verbose] > │ │
00:00:09 #133 [Verbose] > │ │
00:00:09 #134 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #135 [Verbose] >
00:00:09 #136 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #137 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #138 [Verbose] > │ ## try_item │
00:00:09 #139 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #140 [Verbose] >
00:00:09 #141 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #142 [Verbose] > inl rec try_item i = function
00:00:09 #143 [Verbose] > | Cons (x, _) when i = 0 => Some x
00:00:09 #144 [Verbose] > | Cons (_, xs) => try_item (i - 1) xs
00:00:09 #145 [Verbose] > | Nil => None
00:00:09 #146 [Verbose] >
00:00:09 #147 [Verbose] > ╭─[ 213.94ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #148 [Verbose] > │ () │
00:00:09 #149 [Verbose] > │ │
00:00:09 #150 [Verbose] > │ │
00:00:09 #151 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #152 [Verbose] >
00:00:09 #153 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #154 [Verbose] > // // test
00:00:09 #155 [Verbose] >
00:00:09 #156 [Verbose] > listm.init 10i32 id
00:00:09 #157 [Verbose] > |> try_item 9i32
00:00:09 #158 [Verbose] > |> _assert_eq (Some 9)
00:00:10 #159 [Verbose] >
00:00:10 #160 [Verbose] > ╭─[ 342.19ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #161 [Verbose] > │ type [<Struct>] US0 = │
00:00:10 #162 [Verbose] > │ | US0_0 │
00:00:10 #163 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:10 #164 [Verbose] > │ let rec method1 () : bool = │
00:00:10 #165 [Verbose] > │ true │
00:00:10 #166 [Verbose] > │ and method0 () : unit = │
00:00:10 #167 [Verbose] > │ let v3 : bool = method1() │
00:00:10 #168 [Verbose] > │ let v4 : US0 = US0_1(9) │
00:00:10 #169 [Verbose] > │ let v5 : US0 = US0_1(9) │
00:00:10 #170 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:10 #171 [Verbose] > │ let v7 : bool = v3 = false │
00:00:10 #172 [Verbose] > │ if v7 then │
00:00:10 #173 [Verbose] > │ failwith<unit> v6 │
00:00:10 #174 [Verbose] > │ method0() │
00:00:10 #175 [Verbose] > │ │
00:00:10 #176 [Verbose] > │ │
00:00:10 #177 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #178 [Verbose] >
00:00:10 #179 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #180 [Verbose] > // // test
00:00:10 #181 [Verbose] >
00:00:10 #182 [Verbose] > listm.init 10i32 id
00:00:10 #183 [Verbose] > |> try_item 10i32
00:00:10 #184 [Verbose] > |> _assert_eq None
00:00:10 #185 [Verbose] >
00:00:10 #186 [Verbose] > ╭─[ 281.64ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #187 [Verbose] > │ type [<Struct>] US0 = │
00:00:10 #188 [Verbose] > │ | US0_0 │
00:00:10 #189 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:10 #190 [Verbose] > │ let rec method1 () : bool = │
00:00:10 #191 [Verbose] > │ true │
00:00:10 #192 [Verbose] > │ and method0 () : unit = │
00:00:10 #193 [Verbose] > │ let v3 : bool = method1() │
00:00:10 #194 [Verbose] > │ let v4 : US0 = US0_0 │
00:00:10 #195 [Verbose] > │ let v5 : US0 = US0_0 │
00:00:10 #196 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:10 #197 [Verbose] > │ let v7 : bool = v3 = false │
00:00:10 #198 [Verbose] > │ if v7 then │
00:00:10 #199 [Verbose] > │ failwith<unit> v6 │
00:00:10 #200 [Verbose] > │ method0() │
00:00:10 #201 [Verbose] > │ │
00:00:10 #202 [Verbose] > │ │
00:00:10 #203 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #204 [Verbose] >
00:00:10 #205 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #206 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #207 [Verbose] > │ ## list_item │
00:00:10 #208 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #209 [Verbose] >
00:00:10 #210 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #211 [Verbose] > inl item i =
00:00:10 #212 [Verbose] > try_item i >> optionm.value
00:00:10 #213 [Verbose] >
00:00:10 #214 [Verbose] > ╭─[ 230.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #215 [Verbose] > │ () │
00:00:10 #216 [Verbose] > │ │
00:00:10 #217 [Verbose] > │ │
00:00:10 #218 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #219 [Verbose] >
00:00:10 #220 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #221 [Verbose] > // // test
00:00:10 #222 [Verbose] >
00:00:10 #223 [Verbose] > listm.init 10i32 id
00:00:10 #224 [Verbose] > |> item 9i32
00:00:10 #225 [Verbose] > |> _assert_eq 9
00:00:10 #226 [Verbose] >
00:00:10 #227 [Verbose] > ╭─[ 222.65ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #228 [Verbose] > │ let rec method1 () : bool = │
00:00:10 #229 [Verbose] > │ true │
00:00:10 #230 [Verbose] > │ and method0 () : unit = │
00:00:10 #231 [Verbose] > │ let v0 : bool = method1() │
00:00:10 #232 [Verbose] > │ let v1 : string = $"__expect / actual: %A{9} / expected: %A{9}" │
00:00:10 #233 [Verbose] > │ let v2 : bool = v0 = false │
00:00:10 #234 [Verbose] > │ if v2 then │
00:00:10 #235 [Verbose] > │ failwith<unit> v1 │
00:00:10 #236 [Verbose] > │ method0() │
00:00:10 #237 [Verbose] > │ │
00:00:10 #238 [Verbose] > │ │
00:00:10 #239 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #240 [Verbose] >
00:00:10 #241 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #242 [Verbose] > // // test
00:00:10 #243 [Verbose] >
00:00:10 #244 [Verbose] > fun () =>
00:00:10 #245 [Verbose] > listm.init 10i32 id
00:00:10 #246 [Verbose] > |> item 10i32
00:00:10 #247 [Verbose] > |> ignore
00:00:10 #248 [Verbose] > |> _throws
00:00:10 #249 [Verbose] > |> _assert_eq (Some "Option does not have a value.")
00:00:11 #250 [Verbose] >
00:00:11 #251 [Verbose] > ╭─[ 356.93ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #252 [Verbose] > │ type [<Struct>] US0 = │
00:00:11 #253 [Verbose] > │ | US0_0 │
00:00:11 #254 [Verbose] > │ | US0_1 of f1_0 : string │
00:00:11 #255 [Verbose] > │ let rec closure0 () () : unit = │
00:00:11 #256 [Verbose] > │ let v0 : int32 = failwith<int32> "Option does not have a value." │
00:00:11 #257 [Verbose] > │ () │
00:00:11 #258 [Verbose] > │ and closure1 () (v0 : string) : US0 = │
00:00:11 #259 [Verbose] > │ US0_1(v0) │
00:00:11 #260 [Verbose] > │ and method1 (v0 : bool) : bool = │
00:00:11 #261 [Verbose] > │ v0 │
00:00:11 #262 [Verbose] > │ and method0 () : unit = │
00:00:11 #263 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:00:11 #264 [Verbose] > │ let v1 : US0 = US0_0 │
00:00:11 #265 [Verbose] > │ let v2 : (string -> US0) = closure1() │
00:00:11 #266 [Verbose] > │ let v3 : US0 = try v0 (); v1 with ex -> v2 ex.Message │
00:00:11 #267 [Verbose] > │ let v8 : bool = │
00:00:11 #268 [Verbose] > │ match v3 with │
00:00:11 #269 [Verbose] > │ | US0_1(v6) -> (* Some *) │
00:00:11 #270 [Verbose] > │ let v7 : bool = v6 = "Option does not have a value." │
00:00:11 #271 [Verbose] > │ v7 │
00:00:11 #272 [Verbose] > │ | _ -> │
00:00:11 #273 [Verbose] > │ false │
00:00:11 #274 [Verbose] > │ let v9 : bool = method1(v8) │
00:00:11 #275 [Verbose] > │ let v10 : string = "Option does not have a value." │
00:00:11 #276 [Verbose] > │ let v11 : US0 = US0_1(v10) │
00:00:11 #277 [Verbose] > │ let v12 : string = $"__expect / actual: %A{v3} / expected: %A{v11}" │
00:00:11 #278 [Verbose] > │ let v13 : bool = v9 = false │
00:00:11 #279 [Verbose] > │ if v13 then │
00:00:11 #280 [Verbose] > │ failwith<unit> v12 │
00:00:11 #281 [Verbose] > │ method0() │
00:00:11 #282 [Verbose] > │ │
00:00:11 #283 [Verbose] > │ │
00:00:11 #284 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #285 [Verbose] >
00:00:11 #286 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #287 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #288 [Verbose] > │ ## try_item_ │
00:00:11 #289 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #290 [Verbose] >
00:00:11 #291 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #292 [Verbose] > let rec try_item_ i = function
00:00:11 #293 [Verbose] > | Cons (x, _) when i = 0 => Some x
00:00:11 #294 [Verbose] > | Cons (_, xs) => try_item_ (i - 1) xs
00:00:11 #295 [Verbose] > | Nil => None
00:00:11 #296 [Verbose] >
00:00:11 #297 [Verbose] > ╭─[ 241.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #298 [Verbose] > │ () │
00:00:11 #299 [Verbose] > │ │
00:00:11 #300 [Verbose] > │ │
00:00:11 #301 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #302 [Verbose] >
00:00:11 #303 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #304 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #305 [Verbose] > │ ## item_ │
00:00:11 #306 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #307 [Verbose] >
00:00:11 #308 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #309 [Verbose] > inl item_ i =
00:00:11 #310 [Verbose] > try_item_ i >> optionm.value
00:00:11 #311 [Verbose] >
00:00:11 #312 [Verbose] > ╭─[ 196.16ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #313 [Verbose] > │ () │
00:00:11 #314 [Verbose] > │ │
00:00:11 #315 [Verbose] > │ │
00:00:11 #316 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #317 [Verbose] >
00:00:11 #318 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #319 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #320 [Verbose] > │ ## sum │
00:00:11 #321 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #322 [Verbose] >
00:00:11 #323 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #324 [Verbose] > inl sum list =
00:00:11 #325 [Verbose] > list |> listm.fold (+) 0
00:00:11 #326 [Verbose] >
00:00:11 #327 [Verbose] > ╭─[ 228.79ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #328 [Verbose] > │ () │
00:00:11 #329 [Verbose] > │ │
00:00:11 #330 [Verbose] > │ │
00:00:11 #331 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #332 [Verbose] >
00:00:11 #333 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #334 [Verbose] > // // test
00:00:11 #335 [Verbose] >
00:00:11 #336 [Verbose] > listm.init 10i32 id
00:00:11 #337 [Verbose] > |> sum
00:00:11 #338 [Verbose] > |> _assert_eq 45
00:00:12 #339 [Verbose] >
00:00:12 #340 [Verbose] > ╭─[ 203.86ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #341 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #342 [Verbose] > │ true │
00:00:12 #343 [Verbose] > │ and method0 () : unit = │
00:00:12 #344 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #345 [Verbose] > │ let v1 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:12 #346 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #347 [Verbose] > │ if v2 then │
00:00:12 #348 [Verbose] > │ failwith<unit> v1 │
00:00:12 #349 [Verbose] > │ method0() │
00:00:12 #350 [Verbose] > │ │
00:00:12 #351 [Verbose] > │ │
00:00:12 #352 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #353 [Verbose] >
00:00:12 #354 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #355 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #356 [Verbose] > │ ## unzip │
00:00:12 #357 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #358 [Verbose] >
00:00:12 #359 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #360 [Verbose] > inl unzip list =
00:00:12 #361 [Verbose] > (([[]], [[]]), list)
00:00:12 #362 [Verbose] > ||> listm.fold fun (acc_x, acc_y) (x, y) =>
00:00:12 #363 [Verbose] > x :: acc_x, y :: acc_y
00:00:12 #364 [Verbose] > |> fun x, y =>
00:00:12 #365 [Verbose] > x |> listm.rev, y |> listm.rev
00:00:12 #366 [Verbose] >
00:00:12 #367 [Verbose] > ╭─[ 193.18ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #368 [Verbose] > │ () │
00:00:12 #369 [Verbose] > │ │
00:00:12 #370 [Verbose] > │ │
00:00:12 #371 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #372 [Verbose] >
00:00:12 #373 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #374 [Verbose] > // // test
00:00:12 #375 [Verbose] >
00:00:12 #376 [Verbose] > listm.init 10i32 id
00:00:12 #377 [Verbose] > |> listm.map (fun x => x, x)
00:00:12 #378 [Verbose] > |> unzip
00:00:12 #379 [Verbose] > |> fun x, y =>
00:00:12 #380 [Verbose] > x |> sum
00:00:12 #381 [Verbose] > |> _assert_eq 45
00:00:12 #382 [Verbose] >
00:00:12 #383 [Verbose] > y |> sum
00:00:12 #384 [Verbose] > |> _assert_eq 45
00:00:12 #385 [Verbose] >
00:00:12 #386 [Verbose] > ╭─[ 224.23ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #387 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #388 [Verbose] > │ true │
00:00:12 #389 [Verbose] > │ and method0 () : unit = │
00:00:12 #390 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #391 [Verbose] > │ let v1 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:12 #392 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #393 [Verbose] > │ if v2 then │
00:00:12 #394 [Verbose] > │ failwith<unit> v1 │
00:00:12 #395 [Verbose] > │ let v3 : bool = method1() │
00:00:12 #396 [Verbose] > │ let v4 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:12 #397 [Verbose] > │ let v5 : bool = v3 = false │
00:00:12 #398 [Verbose] > │ if v5 then │
00:00:12 #399 [Verbose] > │ failwith<unit> v4 │
00:00:12 #400 [Verbose] > │ method0() │
00:00:12 #401 [Verbose] > │ │
00:00:12 #402 [Verbose] > │ │
00:00:12 #403 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #404 [Verbose] >
00:00:12 #405 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #406 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #407 [Verbose] > │ ## try_index_of │
00:00:12 #408 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #409 [Verbose] >
00:00:12 #410 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #411 [Verbose] > inl try_index_of item list =
00:00:12 #412 [Verbose] > inl rec loop i = function
00:00:12 #413 [Verbose] > | [[]] => None
00:00:12 #414 [Verbose] > | x :: xs =>
00:00:12 #415 [Verbose] > if x = item
00:00:12 #416 [Verbose] > then Some i
00:00:12 #417 [Verbose] > else loop (i + 1) xs
00:00:12 #418 [Verbose] > loop 0 list
00:00:12 #419 [Verbose] >
00:00:12 #420 [Verbose] > inl index_of item =
00:00:12 #421 [Verbose] > try_index_of item >> optionm.value
00:00:12 #422 [Verbose] >
00:00:12 #423 [Verbose] > inl try_index_of_ item list =
00:00:12 #424 [Verbose] > let rec loop i = function
00:00:12 #425 [Verbose] > | [[]] => None
00:00:12 #426 [Verbose] > | x :: xs =>
00:00:12 #427 [Verbose] > if x = item
00:00:12 #428 [Verbose] > then Some i
00:00:12 #429 [Verbose] > else loop (i + 1) xs
00:00:12 #430 [Verbose] > loop 0 list
00:00:12 #431 [Verbose] >
00:00:12 #432 [Verbose] > inl index_of_ item =
00:00:12 #433 [Verbose] > try_index_of_ item >> optionm.value
00:00:12 #434 [Verbose] >
00:00:12 #435 [Verbose] > inl try_index_of__ item list =
00:00:12 #436 [Verbose] > inl i = mut 0
00:00:12 #437 [Verbose] > inl list = mut list
00:00:12 #438 [Verbose] > inl result = mut None
00:00:12 #439 [Verbose] > let rec loop () =
00:00:12 #440 [Verbose] > match *list with
00:00:12 #441 [Verbose] > | [[]] => result <- None
00:00:12 #442 [Verbose] > | x :: xs =>
00:00:12 #443 [Verbose] > if x = item
00:00:12 #444 [Verbose] > then result <- Some *i
00:00:12 #445 [Verbose] > else
00:00:12 #446 [Verbose] > i <- *i + 1
00:00:12 #447 [Verbose] > list <- xs
00:00:12 #448 [Verbose] > loop ()
00:00:12 #449 [Verbose] > loop ()
00:00:12 #450 [Verbose] > *result
00:00:12 #451 [Verbose] >
00:00:12 #452 [Verbose] > inl index_of__ item =
00:00:12 #453 [Verbose] > try_index_of__ item >> optionm.value
00:00:12 #454 [Verbose] >
00:00:12 #455 [Verbose] > ╭─[ 227.70ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #456 [Verbose] > │ () │
00:00:12 #457 [Verbose] > │ │
00:00:12 #458 [Verbose] > │ │
00:00:12 #459 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #460 [Verbose] >
00:00:12 #461 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #462 [Verbose] > // // test
00:00:12 #463 [Verbose] >
00:00:12 #464 [Verbose] > listm.init 10i32 id
00:00:12 #465 [Verbose] > |> index_of 5i32
00:00:12 #466 [Verbose] > |> _assert_eq 5i32
00:00:13 #467 [Verbose] >
00:00:13 #468 [Verbose] > ╭─[ 311.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #469 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #470 [Verbose] > │ true │
00:00:13 #471 [Verbose] > │ and method0 () : unit = │
00:00:13 #472 [Verbose] > │ let v0 : bool = method1() │
00:00:13 #473 [Verbose] > │ let v1 : string = $"__expect / actual: %A{5} / expected: %A{5}" │
00:00:13 #474 [Verbose] > │ let v2 : bool = v0 = false │
00:00:13 #475 [Verbose] > │ if v2 then │
00:00:13 #476 [Verbose] > │ failwith<unit> v1 │
00:00:13 #477 [Verbose] > │ method0() │
00:00:13 #478 [Verbose] > │ │
00:00:13 #479 [Verbose] > │ │
00:00:13 #480 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #481 [Verbose] >
00:00:13 #482 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #483 [Verbose] > // // test
00:00:13 #484 [Verbose] >
00:00:13 #485 [Verbose] > listm.init 10i32 id
00:00:13 #486 [Verbose] > |> try_index_of 10i32
00:00:13 #487 [Verbose] > |> _assert_eq (None : option i32)
00:00:13 #488 [Verbose] >
00:00:13 #489 [Verbose] > ╭─[ 267.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #490 [Verbose] > │ type [<Struct>] US0 = │
00:00:13 #491 [Verbose] > │ | US0_0 │
00:00:13 #492 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:13 #493 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #494 [Verbose] > │ true │
00:00:13 #495 [Verbose] > │ and method0 () : unit = │
00:00:13 #496 [Verbose] > │ let v3 : bool = method1() │
00:00:13 #497 [Verbose] > │ let v4 : US0 = US0_0 │
00:00:13 #498 [Verbose] > │ let v5 : US0 = US0_0 │
00:00:13 #499 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:13 #500 [Verbose] > │ let v7 : bool = v3 = false │
00:00:13 #501 [Verbose] > │ if v7 then │
00:00:13 #502 [Verbose] > │ failwith<unit> v6 │
00:00:13 #503 [Verbose] > │ method0() │
00:00:13 #504 [Verbose] > │ │
00:00:13 #505 [Verbose] > │ │
00:00:13 #506 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #507 [Verbose] >
00:00:13 #508 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #509 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #510 [Verbose] > │ ## try_find │
00:00:13 #511 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #512 [Verbose] >
00:00:13 #513 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #514 [Verbose] > inl try_find fn list =
00:00:13 #515 [Verbose] > inl rec loop = function
00:00:13 #516 [Verbose] > | [[]] => None
00:00:13 #517 [Verbose] > | x :: xs =>
00:00:13 #518 [Verbose] > if fn x
00:00:13 #519 [Verbose] > then Some x
00:00:13 #520 [Verbose] > else loop xs
00:00:13 #521 [Verbose] > loop list
00:00:13 #522 [Verbose] >
00:00:13 #523 [Verbose] > inl try_find_ fn list =
00:00:13 #524 [Verbose] > let rec loop = function
00:00:13 #525 [Verbose] > | [[]] => None
00:00:13 #526 [Verbose] > | x :: xs =>
00:00:13 #527 [Verbose] > if fn x
00:00:13 #528 [Verbose] > then Some x
00:00:13 #529 [Verbose] > else loop xs
00:00:13 #530 [Verbose] > loop list
00:00:13 #531 [Verbose] >
00:00:13 #532 [Verbose] > ╭─[ 230.89ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #533 [Verbose] > │ () │
00:00:13 #534 [Verbose] > │ │
00:00:13 #535 [Verbose] > │ │
00:00:13 #536 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #537 [Verbose] >
00:00:13 #538 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #539 [Verbose] > // // test
00:00:13 #540 [Verbose] >
00:00:13 #541 [Verbose] > listm.init 10i32 id
00:00:13 #542 [Verbose] > |> try_find ((=) 5i32)
00:00:13 #543 [Verbose] > |> _assert_eq (Some 5i32)
00:00:13 #544 [Verbose] >
00:00:13 #545 [Verbose] > ╭─[ 228.29ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #546 [Verbose] > │ type [<Struct>] US0 = │
00:00:13 #547 [Verbose] > │ | US0_0 │
00:00:13 #548 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:13 #549 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #550 [Verbose] > │ true │
00:00:13 #551 [Verbose] > │ and method0 () : unit = │
00:00:13 #552 [Verbose] > │ let v3 : bool = method1() │
00:00:13 #553 [Verbose] > │ let v4 : US0 = US0_1(5) │
00:00:13 #554 [Verbose] > │ let v5 : US0 = US0_1(5) │
00:00:13 #555 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:13 #556 [Verbose] > │ let v7 : bool = v3 = false │
00:00:13 #557 [Verbose] > │ if v7 then │
00:00:13 #558 [Verbose] > │ failwith<unit> v6 │
00:00:13 #559 [Verbose] > │ method0() │
00:00:13 #560 [Verbose] > │ │
00:00:13 #561 [Verbose] > │ │
00:00:13 #562 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #563 [Verbose] >
00:00:13 #564 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #565 [Verbose] > inl find x =
00:00:13 #566 [Verbose] > try_find x >> optionm.value
00:00:13 #567 [Verbose] >
00:00:13 #568 [Verbose] > inl find_ x =
00:00:13 #569 [Verbose] > try_find_ x >> optionm.value
00:00:14 #570 [Verbose] >
00:00:14 #571 [Verbose] > ╭─[ 185.80ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #572 [Verbose] > │ () │
00:00:14 #573 [Verbose] > │ │
00:00:14 #574 [Verbose] > │ │
00:00:14 #575 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #576 [Verbose] >
00:00:14 #577 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #578 [Verbose] > // // test
00:00:14 #579 [Verbose] >
00:00:14 #580 [Verbose] > listm.init 10i32 id
00:00:14 #581 [Verbose] > |> find ((=) 5i32)
00:00:14 #582 [Verbose] > |> _assert_eq 5i32
00:00:14 #583 [Verbose] >
00:00:14 #584 [Verbose] > ╭─[ 218.83ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #585 [Verbose] > │ let rec method1 () : bool = │
00:00:14 #586 [Verbose] > │ true │
00:00:14 #587 [Verbose] > │ and method0 () : unit = │
00:00:14 #588 [Verbose] > │ let v0 : bool = method1() │
00:00:14 #589 [Verbose] > │ let v1 : string = $"__expect / actual: %A{5} / expected: %A{5}" │
00:00:14 #590 [Verbose] > │ let v2 : bool = v0 = false │
00:00:14 #591 [Verbose] > │ if v2 then │
00:00:14 #592 [Verbose] > │ failwith<unit> v1 │
00:00:14 #593 [Verbose] > │ method0() │
00:00:14 #594 [Verbose] > │ │
00:00:14 #595 [Verbose] > │ │
00:00:14 #596 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #597 [Verbose] >
00:00:14 #598 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #599 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #600 [Verbose] > │ ## choose │
00:00:14 #601 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #602 [Verbose] >
00:00:14 #603 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #604 [Verbose] > inl choose f l =
00:00:14 #605 [Verbose] > (l, [[]])
00:00:14 #606 [Verbose] > ||> listm.foldBack fun x acc =>
00:00:14 #607 [Verbose] > match f x with
00:00:14 #608 [Verbose] > | Some y => y :: acc
00:00:14 #609 [Verbose] > | None => acc
00:00:14 #610 [Verbose] >
00:00:14 #611 [Verbose] > ╭─[ 237.93ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #612 [Verbose] > │ () │
00:00:14 #613 [Verbose] > │ │
00:00:14 #614 [Verbose] > │ │
00:00:14 #615 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #616 [Verbose] >
00:00:14 #617 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #618 [Verbose] > // // test
00:00:14 #619 [Verbose] >
00:00:14 #620 [Verbose] > listm.init 10i32 id
00:00:14 #621 [Verbose] > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:00:14 #622 [Verbose] > |> _assert_eq [[ 0; 2; 4; 6; 8 ]]
00:00:14 #623 [Verbose] >
00:00:14 #624 [Verbose] > ╭─[ 238.93ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #625 [Verbose] > │ type UH0 = │
00:00:14 #626 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:14 #627 [Verbose] > │ | UH0_1 │
00:00:14 #628 [Verbose] > │ let rec method1 () : bool = │
00:00:14 #629 [Verbose] > │ true │
00:00:14 #630 [Verbose] > │ and method0 () : unit = │
00:00:14 #631 [Verbose] > │ let v33 : bool = method1() │
00:00:14 #632 [Verbose] > │ let v34 : UH0 = UH0_1 │
00:00:14 #633 [Verbose] > │ let v35 : UH0 = UH0_0(8, v34) │
00:00:14 #634 [Verbose] > │ let v36 : UH0 = UH0_0(6, v35) │
00:00:14 #635 [Verbose] > │ let v37 : UH0 = UH0_0(4, v36) │
00:00:14 #636 [Verbose] > │ let v38 : UH0 = UH0_0(2, v37) │
00:00:14 #637 [Verbose] > │ let v39 : UH0 = UH0_0(0, v38) │
00:00:14 #638 [Verbose] > │ let v40 : UH0 = UH0_1 │
00:00:14 #639 [Verbose] > │ let v41 : UH0 = UH0_0(8, v40) │
00:00:14 #640 [Verbose] > │ let v42 : UH0 = UH0_0(6, v41) │
00:00:14 #641 [Verbose] > │ let v43 : UH0 = UH0_0(4, v42) │
00:00:14 #642 [Verbose] > │ let v44 : UH0 = UH0_0(2, v43) │
00:00:14 #643 [Verbose] > │ let v45 : UH0 = UH0_0(0, v44) │
00:00:14 #644 [Verbose] > │ let v46 : string = $"__expect / actual: %A{v39} / expected: %A{v45}" │
00:00:14 #645 [Verbose] > │ let v47 : bool = v33 = false │
00:00:14 #646 [Verbose] > │ if v47 then │
00:00:14 #647 [Verbose] > │ failwith<unit> v46 │
00:00:14 #648 [Verbose] > │ method0() │
00:00:14 #649 [Verbose] > │ │
00:00:14 #650 [Verbose] > │ │
00:00:14 #651 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #652 [Verbose] >
00:00:14 #653 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #654 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #655 [Verbose] > │ ## zip_with │
00:00:14 #656 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #657 [Verbose] >
00:00:14 #658 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #659 [Verbose] > inl zip_with fn xs ys =
00:00:14 #660 [Verbose] > inl rec loop acc xs ys =
00:00:14 #661 [Verbose] > match xs, ys with
00:00:14 #662 [Verbose] > | Cons (x, xs), Cons (y, ys) =>
00:00:14 #663 [Verbose] > loop (fn x y :: acc) xs ys
00:00:14 #664 [Verbose] > | _ => listm.rev acc
00:00:14 #665 [Verbose] > loop [[]] xs ys
00:00:14 #666 [Verbose] >
00:00:14 #667 [Verbose] > inl zip_with_ fn xs ys =
00:00:14 #668 [Verbose] > let rec loop acc xs ys =
00:00:14 #669 [Verbose] > match xs, ys with
00:00:14 #670 [Verbose] > | Cons (x, xs), Cons (y, ys) =>
00:00:14 #671 [Verbose] > loop (fn x y :: acc) xs ys
00:00:14 #672 [Verbose] > | _ => listm.rev acc
00:00:14 #673 [Verbose] > loop [[]] xs ys
00:00:15 #674 [Verbose] >
00:00:15 #675 [Verbose] > ╭─[ 197.98ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #676 [Verbose] > │ () │
00:00:15 #677 [Verbose] > │ │
00:00:15 #678 [Verbose] > │ │
00:00:15 #679 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #680 [Verbose] >
00:00:15 #681 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #682 [Verbose] > // // test
00:00:15 #683 [Verbose] >
00:00:15 #684 [Verbose] > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]])
00:00:15 #685 [Verbose] > ||> zip_with (+)
00:00:15 #686 [Verbose] > |> _assert_eq [[ 5; 7; 9 ]]
00:00:15 #687 [Verbose] >
00:00:15 #688 [Verbose] > ╭─[ 264.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #689 [Verbose] > │ type UH0 = │
00:00:15 #690 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:15 #691 [Verbose] > │ | UH0_1 │
00:00:15 #692 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #693 [Verbose] > │ true │
00:00:15 #694 [Verbose] > │ and method0 () : unit = │
00:00:15 #695 [Verbose] > │ let v18 : bool = method1() │
00:00:15 #696 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:15 #697 [Verbose] > │ let v20 : UH0 = UH0_0(9, v19) │
00:00:15 #698 [Verbose] > │ let v21 : UH0 = UH0_0(7, v20) │
00:00:15 #699 [Verbose] > │ let v22 : UH0 = UH0_0(5, v21) │
00:00:15 #700 [Verbose] > │ let v23 : UH0 = UH0_1 │
00:00:15 #701 [Verbose] > │ let v24 : UH0 = UH0_0(9, v23) │
00:00:15 #702 [Verbose] > │ let v25 : UH0 = UH0_0(7, v24) │
00:00:15 #703 [Verbose] > │ let v26 : UH0 = UH0_0(5, v25) │
00:00:15 #704 [Verbose] > │ let v27 : string = $"__expect / actual: %A{v22} / expected: %A{v26}" │
00:00:15 #705 [Verbose] > │ let v28 : bool = v18 = false │
00:00:15 #706 [Verbose] > │ if v28 then │
00:00:15 #707 [Verbose] > │ failwith<unit> v27 │
00:00:15 #708 [Verbose] > │ method0() │
00:00:15 #709 [Verbose] > │ │
00:00:15 #710 [Verbose] > │ │
00:00:15 #711 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #712 [Verbose] >
00:00:15 #713 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #714 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #715 [Verbose] > │ ## zip │
00:00:15 #716 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #717 [Verbose] >
00:00:15 #718 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #719 [Verbose] > inl zip xs ys =
00:00:15 #720 [Verbose] > zip_with pair xs ys
00:00:15 #721 [Verbose] >
00:00:15 #722 [Verbose] > inl zip_ xs ys =
00:00:15 #723 [Verbose] > zip_with_ pair xs ys
00:00:15 #724 [Verbose] >
00:00:15 #725 [Verbose] > ╭─[ 219.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #726 [Verbose] > │ () │
00:00:15 #727 [Verbose] > │ │
00:00:15 #728 [Verbose] > │ │
00:00:15 #729 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #730 [Verbose] >
00:00:15 #731 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #732 [Verbose] > // // test
00:00:15 #733 [Verbose] >
00:00:15 #734 [Verbose] > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]])
00:00:15 #735 [Verbose] > ||> zip
00:00:15 #736 [Verbose] > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]]
00:00:15 #737 [Verbose] >
00:00:15 #738 [Verbose] > ╭─[ 281.16ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #739 [Verbose] > │ type UH0 = │
00:00:15 #740 [Verbose] > │ | UH0_0 of int32 * int32 * UH0 │
00:00:15 #741 [Verbose] > │ | UH0_1 │
00:00:15 #742 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #743 [Verbose] > │ true │
00:00:15 #744 [Verbose] > │ and method0 () : unit = │
00:00:15 #745 [Verbose] > │ let v18 : bool = method1() │
00:00:15 #746 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:15 #747 [Verbose] > │ let v20 : UH0 = UH0_0(3, 6, v19) │
00:00:15 #748 [Verbose] > │ let v21 : UH0 = UH0_0(2, 5, v20) │
00:00:15 #749 [Verbose] > │ let v22 : UH0 = UH0_0(1, 4, v21) │
00:00:15 #750 [Verbose] > │ let v23 : UH0 = UH0_1 │
00:00:15 #751 [Verbose] > │ let v24 : UH0 = UH0_0(3, 6, v23) │
00:00:15 #752 [Verbose] > │ let v25 : UH0 = UH0_0(2, 5, v24) │
00:00:15 #753 [Verbose] > │ let v26 : UH0 = UH0_0(1, 4, v25) │
00:00:15 #754 [Verbose] > │ let v27 : string = $"__expect / actual: %A{v22} / expected: %A{v26}" │
00:00:15 #755 [Verbose] > │ let v28 : bool = v18 = false │
00:00:15 #756 [Verbose] > │ if v28 then │
00:00:15 #757 [Verbose] > │ failwith<unit> v27 │
00:00:15 #758 [Verbose] > │ method0() │
00:00:15 #759 [Verbose] > │ │
00:00:15 #760 [Verbose] > │ │
00:00:15 #761 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #762 [Verbose] >
00:00:15 #763 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #764 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #765 [Verbose] > │ ## indexed │
00:00:15 #766 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #767 [Verbose] >
00:00:15 #768 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #769 [Verbose] > inl indexed list =
00:00:15 #770 [Verbose] > (([[]], 0), list)
00:00:15 #771 [Verbose] > ||> listm.fold fun (acc, i) x =>
00:00:15 #772 [Verbose] > (i, x) :: acc, i + 1
00:00:15 #773 [Verbose] > |> fst
00:00:15 #774 [Verbose] > |> listm.rev
00:00:16 #775 [Verbose] >
00:00:16 #776 [Verbose] > ╭─[ 202.58ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #777 [Verbose] > │ () │
00:00:16 #778 [Verbose] > │ │
00:00:16 #779 [Verbose] > │ │
00:00:16 #780 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #781 [Verbose] >
00:00:16 #782 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #783 [Verbose] > // // test
00:00:16 #784 [Verbose] >
00:00:16 #785 [Verbose] > listm.init 5i32 ((*) 2)
00:00:16 #786 [Verbose] > |> indexed
00:00:16 #787 [Verbose] > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]]
00:00:16 #788 [Verbose] >
00:00:16 #789 [Verbose] > ╭─[ 301.87ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #790 [Verbose] > │ type UH0 = │
00:00:16 #791 [Verbose] > │ | UH0_0 of int32 * int32 * UH0 │
00:00:16 #792 [Verbose] > │ | UH0_1 │
00:00:16 #793 [Verbose] > │ let rec method1 () : bool = │
00:00:16 #794 [Verbose] > │ true │
00:00:16 #795 [Verbose] > │ and method0 () : unit = │
00:00:16 #796 [Verbose] > │ let v33 : bool = method1() │
00:00:16 #797 [Verbose] > │ let v34 : UH0 = UH0_1 │
00:00:16 #798 [Verbose] > │ let v35 : UH0 = UH0_0(4, 8, v34) │
00:00:16 #799 [Verbose] > │ let v36 : UH0 = UH0_0(3, 6, v35) │
00:00:16 #800 [Verbose] > │ let v37 : UH0 = UH0_0(2, 4, v36) │
00:00:16 #801 [Verbose] > │ let v38 : UH0 = UH0_0(1, 2, v37) │
00:00:16 #802 [Verbose] > │ let v39 : UH0 = UH0_0(0, 0, v38) │
00:00:16 #803 [Verbose] > │ let v40 : UH0 = UH0_1 │
00:00:16 #804 [Verbose] > │ let v41 : UH0 = UH0_0(4, 8, v40) │
00:00:16 #805 [Verbose] > │ let v42 : UH0 = UH0_0(3, 6, v41) │
00:00:16 #806 [Verbose] > │ let v43 : UH0 = UH0_0(2, 4, v42) │
00:00:16 #807 [Verbose] > │ let v44 : UH0 = UH0_0(1, 2, v43) │
00:00:16 #808 [Verbose] > │ let v45 : UH0 = UH0_0(0, 0, v44) │
00:00:16 #809 [Verbose] > │ let v46 : string = $"__expect / actual: %A{v39} / expected: %A{v45}" │
00:00:16 #810 [Verbose] > │ let v47 : bool = v33 = false │
00:00:16 #811 [Verbose] > │ if v47 then │
00:00:16 #812 [Verbose] > │ failwith<unit> v46 │
00:00:16 #813 [Verbose] > │ method0() │
00:00:16 #814 [Verbose] > │ │
00:00:16 #815 [Verbose] > │ │
00:00:16 #816 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #817 [Verbose] >
00:00:16 #818 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #819 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #820 [Verbose] > │ ## group_by │
00:00:16 #821 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #822 [Verbose] >
00:00:16 #823 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #824 [Verbose] > inl group_by fn list =
00:00:16 #825 [Verbose] > (list, [[]])
00:00:16 #826 [Verbose] > ||> listm.foldBack fun x acc =>
00:00:16 #827 [Verbose] > inl xk = fn x
00:00:16 #828 [Verbose] > inl found, new_acc =
00:00:16 #829 [Verbose] > ((false, [[]]), acc)
00:00:16 #830 [Verbose] > ||> listm.fold fun (found, acc') (k, xs) =>
00:00:16 #831 [Verbose] > if k = xk
00:00:16 #832 [Verbose] > then true, (k, x :: xs) :: acc'
00:00:16 #833 [Verbose] > else found, (k, xs) :: acc'
00:00:16 #834 [Verbose] > if found
00:00:16 #835 [Verbose] > then new_acc
00:00:16 #836 [Verbose] > else (xk, [[ x ]]) :: new_acc
00:00:16 #837 [Verbose] >
00:00:16 #838 [Verbose] > ╭─[ 384.01ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #839 [Verbose] > │ () │
00:00:16 #840 [Verbose] > │ │
00:00:16 #841 [Verbose] > │ │
00:00:16 #842 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #843 [Verbose] >
00:00:16 #844 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #845 [Verbose] > // // test
00:00:16 #846 [Verbose] >
00:00:16 #847 [Verbose] > listm.init 10i32 id
00:00:16 #848 [Verbose] > |> group_by (fun x => x % 2 = 0)
00:00:16 #849 [Verbose] > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]]
00:00:16 #850 [Verbose] >
00:00:16 #851 [Verbose] > ╭─[ 286.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #852 [Verbose] > │ type UH0 = │
00:00:16 #853 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:16 #854 [Verbose] > │ | UH0_1 │
00:00:16 #855 [Verbose] > │ and UH1 = │
00:00:16 #856 [Verbose] > │ | UH1_0 of bool * UH0 * UH1 │
00:00:16 #857 [Verbose] > │ | UH1_1 │
00:00:16 #858 [Verbose] > │ let rec method1 () : bool = │
00:00:16 #859 [Verbose] > │ true │
00:00:16 #860 [Verbose] > │ and method0 () : unit = │
00:00:17 #861 [Verbose] > │ let v96 : bool = method1() │
00:00:17 #862 [Verbose] > │ let v97 : UH0 = UH0_1 │
00:00:17 #863 [Verbose] > │ let v98 : UH0 = UH0_0(8, v97) │
00:00:17 #864 [Verbose] > │ let v99 : UH0 = UH0_0(6, v98) │
00:00:17 #865 [Verbose] > │ let v100 : UH0 = UH0_0(4, v99) │
00:00:17 #866 [Verbose] > │ let v101 : UH0 = UH0_0(2, v100) │
00:00:17 #867 [Verbose] > │ let v102 : UH0 = UH0_0(0, v101) │
00:00:17 #868 [Verbose] > │ let v103 : UH0 = UH0_1 │
00:00:17 #869 [Verbose] > │ let v104 : UH0 = UH0_0(9, v103) │
00:00:17 #870 [Verbose] > │ let v105 : UH0 = UH0_0(7, v104) │
00:00:17 #871 [Verbose] > │ let v106 : UH0 = UH0_0(5, v105) │
00:00:17 #872 [Verbose] > │ let v107 : UH0 = UH0_0(3, v106) │
00:00:17 #873 [Verbose] > │ let v108 : UH0 = UH0_0(1, v107) │
00:00:17 #874 [Verbose] > │ let v109 : UH1 = UH1_1 │
00:00:17 #875 [Verbose] > │ let v110 : UH1 = UH1_0(false, v108, v109) │
00:00:17 #876 [Verbose] > │ let v111 : UH1 = UH1_0(true, v102, v110) │
00:00:17 #877 [Verbose] > │ let v112 : UH0 = UH0_1 │
00:00:17 #878 [Verbose] > │ let v113 : UH0 = UH0_0(8, v112) │
00:00:17 #879 [Verbose] > │ let v114 : UH0 = UH0_0(6, v113) │
00:00:17 #880 [Verbose] > │ let v115 : UH0 = UH0_0(4, v114) │
00:00:17 #881 [Verbose] > │ let v116 : UH0 = UH0_0(2, v115) │
00:00:17 #882 [Verbose] > │ let v117 : UH0 = UH0_0(0, v116) │
00:00:17 #883 [Verbose] > │ let v118 : UH0 = UH0_1 │
00:00:17 #884 [Verbose] > │ let v119 : UH0 = UH0_0(9, v118) │
00:00:17 #885 [Verbose] > │ let v120 : UH0 = UH0_0(7, v119) │
00:00:17 #886 [Verbose] > │ let v121 : UH0 = UH0_0(5, v120) │
00:00:17 #887 [Verbose] > │ let v122 : UH0 = UH0_0(3, v121) │
00:00:17 #888 [Verbose] > │ let v123 : UH0 = UH0_0(1, v122) │
00:00:17 #889 [Verbose] > │ let v124 : UH1 = UH1_1 │
00:00:17 #890 [Verbose] > │ let v125 : UH1 = UH1_0(false, v123, v124) │
00:00:17 #891 [Verbose] > │ let v126 : UH1 = UH1_0(true, v117, v125) │
00:00:17 #892 [Verbose] > │ let v127 : string = $"__expect / actual: %A{v111} / expected: %A{v126}" │
00:00:17 #893 [Verbose] > │ let v128 : bool = v96 = false │
00:00:17 #894 [Verbose] > │ if v128 then │
00:00:17 #895 [Verbose] > │ failwith<unit> v127 │
00:00:17 #896 [Verbose] > │ method0() │
00:00:17 #897 [Verbose] > │ │
00:00:17 #898 [Verbose] > │ │
00:00:17 #899 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #900 [Verbose] >
00:00:17 #901 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #902 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #903 [Verbose] > │ ## forall' │
00:00:17 #904 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #905 [Verbose] >
00:00:17 #906 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #907 [Verbose] > inl forall' fn (head :: tail) =
00:00:17 #908 [Verbose] > (true, tail)
00:00:17 #909 [Verbose] > ||> listm.fold fun acc x =>
00:00:17 #910 [Verbose] > acc && x = head
00:00:17 #911 [Verbose] >
00:00:17 #912 [Verbose] > ╭─[ 203.32ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #913 [Verbose] > │ () │
00:00:17 #914 [Verbose] > │ │
00:00:17 #915 [Verbose] > │ │
00:00:17 #916 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #917 [Verbose] >
00:00:17 #918 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #919 [Verbose] > // // test
00:00:17 #920 [Verbose] >
00:00:17 #921 [Verbose] > [[ 1i32; 1; 1; 1; 1 ]]
00:00:17 #922 [Verbose] > |> forall' ((=) 1i32)
00:00:17 #923 [Verbose] > |> _assert_eq true
00:00:17 #924 [Verbose] >
00:00:17 #925 [Verbose] > ╭─[ 283.49ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #926 [Verbose] > │ let rec method1 () : bool = │
00:00:17 #927 [Verbose] > │ true │
00:00:17 #928 [Verbose] > │ and method0 () : unit = │
00:00:17 #929 [Verbose] > │ let v0 : bool = method1() │
00:00:17 #930 [Verbose] > │ let v1 : string = $"__expect / actual: %A{true} / expected: %A{true}" │
00:00:17 #931 [Verbose] > │ let v2 : bool = v0 = false │
00:00:17 #932 [Verbose] > │ if v2 then │
00:00:17 #933 [Verbose] > │ failwith<unit> v1 │
00:00:17 #934 [Verbose] > │ method0() │
00:00:17 #935 [Verbose] > │ │
00:00:17 #936 [Verbose] > │ │
00:00:17 #937 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #938 [Verbose] >
00:00:17 #939 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #940 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #941 [Verbose] > │ ## last │
00:00:17 #942 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #943 [Verbose] >
00:00:17 #944 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #945 [Verbose] > inl last list =
00:00:17 #946 [Verbose] > list
00:00:17 #947 [Verbose] > |> listm.rev
00:00:17 #948 [Verbose] > |> item 0i32
00:00:17 #949 [Verbose] >
00:00:17 #950 [Verbose] > ╭─[ 189.73ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #951 [Verbose] > │ () │
00:00:17 #952 [Verbose] > │ │
00:00:17 #953 [Verbose] > │ │
00:00:17 #954 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #955 [Verbose] >
00:00:17 #956 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #957 [Verbose] > // // test
00:00:17 #958 [Verbose] >
00:00:17 #959 [Verbose] > listm.init 10i32 id
00:00:17 #960 [Verbose] > |> last
00:00:17 #961 [Verbose] > |> _assert_eq 9
00:00:17 #962 [Verbose] >
00:00:17 #963 [Verbose] > ╭─[ 206.53ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #964 [Verbose] > │ let rec method1 () : bool = │
00:00:17 #965 [Verbose] > │ true │
00:00:17 #966 [Verbose] > │ and method0 () : unit = │
00:00:17 #967 [Verbose] > │ let v0 : bool = method1() │
00:00:17 #968 [Verbose] > │ let v1 : string = $"__expect / actual: %A{9} / expected: %A{9}" │
00:00:17 #969 [Verbose] > │ let v2 : bool = v0 = false │
00:00:17 #970 [Verbose] > │ if v2 then │
00:00:17 #971 [Verbose] > │ failwith<unit> v1 │
00:00:17 #972 [Verbose] > │ method0() │
00:00:17 #973 [Verbose] > │ │
00:00:17 #974 [Verbose] > │ │
00:00:17 #975 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #976 [Verbose] >
00:00:17 #977 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #978 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #979 [Verbose] > │ ## try_pick │
00:00:17 #980 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #981 [Verbose] >
00:00:17 #982 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #983 [Verbose] > inl try_pick fn list =
00:00:17 #984 [Verbose] > inl rec body fn = function
00:00:17 #985 [Verbose] > | [[]] => None
00:00:17 #986 [Verbose] > | x :: xs =>
00:00:17 #987 [Verbose] > match fn x with
00:00:17 #988 [Verbose] > | Some y => Some y
00:00:17 #989 [Verbose] > | None => loop xs
00:00:17 #990 [Verbose] > and inl loop list =
00:00:17 #991 [Verbose] > if var_is list |> not
00:00:17 #992 [Verbose] > then body fn list
00:00:17 #993 [Verbose] > else
00:00:17 #994 [Verbose] > inl fn = join fn
00:00:17 #995 [Verbose] > inl list = dyn list
00:00:17 #996 [Verbose] > join body fn list
00:00:17 #997 [Verbose] > loop list
00:00:18 #998 [Verbose] >
00:00:18 #999 [Verbose] > ╭─[ 188.82ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1000 [Verbose] > │ () │
00:00:18 #1001 [Verbose] > │ │
00:00:18 #1002 [Verbose] > │ │
00:00:18 #1003 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1004 [Verbose] >
00:00:18 #1005 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1006 [Verbose] > // // test
00:00:18 #1007 [Verbose] >
00:00:18 #1008 [Verbose] > listm.init 10i32 id
00:00:18 #1009 [Verbose] > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:00:18 #1010 [Verbose] > |> _assert_eq (Some 5i32)
00:00:18 #1011 [Verbose] >
00:00:18 #1012 [Verbose] > ╭─[ 248.25ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1013 [Verbose] > │ type [<Struct>] US0 = │
00:00:18 #1014 [Verbose] > │ | US0_0 │
00:00:18 #1015 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:18 #1016 [Verbose] > │ let rec method1 () : bool = │
00:00:18 #1017 [Verbose] > │ true │
00:00:18 #1018 [Verbose] > │ and method0 () : unit = │
00:00:18 #1019 [Verbose] > │ let v3 : bool = method1() │
00:00:18 #1020 [Verbose] > │ let v4 : US0 = US0_1(5) │
00:00:18 #1021 [Verbose] > │ let v5 : US0 = US0_1(5) │
00:00:18 #1022 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:18 #1023 [Verbose] > │ let v7 : bool = v3 = false │
00:00:18 #1024 [Verbose] > │ if v7 then │
00:00:18 #1025 [Verbose] > │ failwith<unit> v6 │
00:00:18 #1026 [Verbose] > │ method0() │
00:00:18 #1027 [Verbose] > │ │
00:00:18 #1028 [Verbose] > │ │
00:00:18 #1029 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #1030 [Verbose] > [NbConvertApp] Converting notebook listm'.dib.ipynb to html
00:00:20 #1031 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:20 #1032 [Verbose] > validate(nb)
00:00:20 #1033 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:20 #1034 [Verbose] > return _pygments_highlight(
00:00:21 #1035 [Verbose] > [NbConvertApp] Writing 365532 bytes to listm'.dib.html
00:00:22 #1036 [Debug] executeAsync / exitCode: 0 / output.Length: 59537
00:00:22 #1037 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 benchmark.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ ## benchmark (Polyglot) │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.18s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > inl (/@) x = listm'.(/@) x
00:00:07 #22 [Verbose] >
00:00:07 #23 [Verbose] > ╭─[ 212.74ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #24 [Verbose] > │ () │
00:00:07 #25 [Verbose] > │ │
00:00:07 #26 [Verbose] > │ │
00:00:07 #27 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #28 [Verbose] >
00:00:07 #29 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #30 [Verbose] > inl gc_collect () =
00:00:07 #31 [Verbose] > run_target function
00:00:07 #32 [Verbose] > | Fsharp => fun () => $"System.GC.Collect ()"
00:00:07 #33 [Verbose] > | _ => fun () => ()
00:00:07 #34 [Verbose] >
00:00:07 #35 [Verbose] > inl printfn x =
00:00:07 #36 [Verbose] > console.write_line x
00:00:07 #37 [Verbose] >
00:00:07 #38 [Verbose] > nominal stopwatch = $"System.Diagnostics.Stopwatch"
00:00:07 #39 [Verbose] >
00:00:07 #40 [Verbose] > inl stopwatch () : stopwatch =
00:00:07 #41 [Verbose] > $"`stopwatch" ()
00:00:07 #42 [Verbose] >
00:00:07 #43 [Verbose] > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 =
00:00:07 #44 [Verbose] > $"!stopwatch.ElapsedMilliseconds"
00:00:07 #45 [Verbose] >
00:00:07 #46 [Verbose] > inl stopwatch_start (stopwatch : stopwatch) : () =
00:00:07 #47 [Verbose] > $"!stopwatch.Start ()"
00:00:07 #48 [Verbose] >
00:00:07 #49 [Verbose] > ╭─[ 245.20ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #50 [Verbose] > │ () │
00:00:07 #51 [Verbose] > │ │
00:00:07 #52 [Verbose] > │ │
00:00:07 #53 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #54 [Verbose] >
00:00:07 #55 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #56 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #57 [Verbose] > │ ## test_case_result │
00:00:07 #58 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #59 [Verbose] >
00:00:07 #60 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #61 [Verbose] > type test_case_result =
00:00:07 #62 [Verbose] > {
00:00:07 #63 [Verbose] > Input : string
00:00:07 #64 [Verbose] > Expected : string
00:00:07 #65 [Verbose] > Result : string
00:00:07 #66 [Verbose] > TimeList : a u64 i64
00:00:07 #67 [Verbose] > }
00:00:07 #68 [Verbose] >
00:00:07 #69 [Verbose] > ╭─[ 276.40ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #70 [Verbose] > │ () │
00:00:07 #71 [Verbose] > │ │
00:00:07 #72 [Verbose] > │ │
00:00:07 #73 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #74 [Verbose] >
00:00:07 #75 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #76 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #77 [Verbose] > │ ## run │
00:00:07 #78 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #79 [Verbose] >
00:00:07 #80 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #81 [Verbose] > inl run forall input expected.
00:00:07 #82 [Verbose] > count
00:00:07 #83 [Verbose] > (solutions : list (string * (input -> expected)))
00:00:07 #84 [Verbose] > ((input, expected) : (input * expected))
00:00:07 #85 [Verbose] > : test_case_result
00:00:07 #86 [Verbose] > =
00:00:07 #87 [Verbose] > inl input_str = input |> sm'.format_debug
00:00:07 #88 [Verbose] >
00:00:07 #89 [Verbose] > printfn ""
00:00:07 #90 [Verbose] > printfn ($"$\"Solution: {!input_str} \"" : string)
00:00:07 #91 [Verbose] >
00:00:07 #92 [Verbose] > inl performance_invoke (fn : () -> expected) =
00:00:07 #93 [Verbose] > gc_collect ()
00:00:07 #94 [Verbose] > inl stopwatch = stopwatch ()
00:00:07 #95 [Verbose] > stopwatch |> stopwatch_start
00:00:07 #96 [Verbose] > inl time1 = stopwatch |> stopwatch_elapsed_milliseconds
00:00:07 #97 [Verbose] > inl result : expected =
00:00:07 #98 [Verbose] > am'.init_series 0 count 1i32
00:00:07 #99 [Verbose] > |> am'.parallel_map fun _n => fn ()
00:00:07 #100 [Verbose] > |> am'.last
00:00:07 #101 [Verbose] > inl time2 = (stopwatch |> stopwatch_elapsed_milliseconds) - time1
00:00:07 #102 [Verbose] > result, time2
00:00:07 #103 [Verbose] >
00:00:07 #104 [Verbose] > inl results_with_time : a u64 _ =
00:00:07 #105 [Verbose] > solutions
00:00:07 #106 [Verbose] > |> listm'.indexed
00:00:07 #107 [Verbose] > |> listm.toArray
00:00:07 #108 [Verbose] > |> am.map fun ((i : i32), (test_name, solution)) =>
00:00:07 #109 [Verbose] > inl result, time = performance_invoke fun () => solution input
00:00:07 #110 [Verbose] > printfn ($"$\"Test case {!i + 1}. {!test_name}. Time: {!time} \"" :
00:00:07 #111 [Verbose] > string)
00:00:07 #112 [Verbose] > result, time
00:00:07 #113 [Verbose] >
00:00:07 #114 [Verbose] > match results_with_time |> am.map fst with
00:00:07 #115 [Verbose] > | array when length array <= 1 => ()
00:00:07 #116 [Verbose] > | array when array |> am.forall' ((=) (index array 0)) => ()
00:00:07 #117 [Verbose] > | results => failwith ($"$\"Challenge error: {!results}\"" : string)
00:00:07 #118 [Verbose] >
00:00:07 #119 [Verbose] > {
00:00:07 #120 [Verbose] > Input = input_str
00:00:07 #121 [Verbose] > Expected = expected |> sm'.format_debug
00:00:07 #122 [Verbose] > Result = results_with_time |> am.map fst |> fun array => index array 0
00:00:07 #123 [Verbose] > |> sm'.format_debug
00:00:07 #124 [Verbose] > TimeList = results_with_time |> am.map snd
00:00:07 #125 [Verbose] > }
00:00:07 #126 [Verbose] >
00:00:07 #127 [Verbose] > ╭─[ 291.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #128 [Verbose] > │ () │
00:00:07 #129 [Verbose] > │ │
00:00:07 #130 [Verbose] > │ │
00:00:07 #131 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #132 [Verbose] >
00:00:07 #133 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #134 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #135 [Verbose] > │ ## run_all │
00:00:07 #136 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #137 [Verbose] >
00:00:07 #138 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #139 [Verbose] > inl run_all forall input expected.
00:00:07 #140 [Verbose] > test_name
00:00:07 #141 [Verbose] > count
00:00:07 #142 [Verbose] > (solutions : list (string * (input -> expected)))
00:00:07 #143 [Verbose] > test_cases
00:00:07 #144 [Verbose] > =
00:00:07 #145 [Verbose] > printfn ""
00:00:07 #146 [Verbose] > printfn ""
00:00:07 #147 [Verbose] > printfn ($"$\"Test: {!test_name}\"" : string)
00:00:07 #148 [Verbose] > test_cases
00:00:07 #149 [Verbose] > |> listm.toArray
00:00:07 #150 [Verbose] > |> am.map (run count solutions)
00:00:08 #151 [Verbose] >
00:00:08 #152 [Verbose] > ╭─[ 198.26ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #153 [Verbose] > │ () │
00:00:08 #154 [Verbose] > │ │
00:00:08 #155 [Verbose] > │ │
00:00:08 #156 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #157 [Verbose] >
00:00:08 #158 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #159 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #160 [Verbose] > │ ## sort_result_list │
00:00:08 #161 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #162 [Verbose] >
00:00:08 #163 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #164 [Verbose] > inl sort_result_list results =
00:00:08 #165 [Verbose] > inl table =
00:00:08 #166 [Verbose] > inl rows =
00:00:08 #167 [Verbose] > results
00:00:08 #168 [Verbose] > |> am.map fun (result : test_case_result) =>
00:00:08 #169 [Verbose] > inl best =
00:00:08 #170 [Verbose] > result.TimeList
00:00:08 #171 [Verbose] > |> am'.indexed
00:00:08 #172 [Verbose] > |> am.map fun (i, time) =>
00:00:08 #173 [Verbose] > i + 1i64, time
00:00:08 #174 [Verbose] > |> am'.sort_by snd
00:00:08 #175 [Verbose] > |> fun array => index array 0i32
00:00:08 #176 [Verbose] > |> sm'.format_debug
00:00:08 #177 [Verbose] > inl row =
00:00:08 #178 [Verbose] > [[
00:00:08 #179 [Verbose] > result.Input
00:00:08 #180 [Verbose] > result.Expected
00:00:08 #181 [Verbose] > result.Result
00:00:08 #182 [Verbose] > best
00:00:08 #183 [Verbose] > ]]
00:00:08 #184 [Verbose] > inl color : option console.console_color =
00:00:08 #185 [Verbose] > open console
00:00:08 #186 [Verbose] > match result.Expected = result.Result with
00:00:08 #187 [Verbose] > | true => Some $"`console_color.DarkGreen"
00:00:08 #188 [Verbose] > | false => Some $"`console_color.DarkRed"
00:00:08 #189 [Verbose] > row, color
00:00:08 #190 [Verbose] >
00:00:08 #191 [Verbose] > inl header =
00:00:08 #192 [Verbose] > [[
00:00:08 #193 [Verbose] > [[
00:00:08 #194 [Verbose] > "Input"
00:00:08 #195 [Verbose] > "Expected"
00:00:08 #196 [Verbose] > "Result"
00:00:08 #197 [Verbose] > "Best"
00:00:08 #198 [Verbose] > ]]
00:00:08 #199 [Verbose] > [[
00:00:08 #200 [Verbose] > "---"
00:00:08 #201 [Verbose] > "---"
00:00:08 #202 [Verbose] > "---"
00:00:08 #203 [Verbose] > "---"
00:00:08 #204 [Verbose] > ]]
00:00:08 #205 [Verbose] > ]]
00:00:08 #206 [Verbose] > |> listm.map fun row => row, None
00:00:08 #207 [Verbose] > |> listm.toArray
00:00:08 #208 [Verbose] > rows |> am.append header
00:00:08 #209 [Verbose] >
00:00:08 #210 [Verbose] > inl formattedTable =
00:00:08 #211 [Verbose] > inl lengthMap : mapm.map i32 i64 =
00:00:08 #212 [Verbose] > table
00:00:08 #213 [Verbose] > |> am.map (fst >> listm.toArray)
00:00:08 #214 [Verbose] > |> am'.transpose
00:00:08 #215 [Verbose] > |> am.map fun column =>
00:00:08 #216 [Verbose] > column
00:00:08 #217 [Verbose] > |> am.map sm.length
00:00:08 #218 [Verbose] > |> am'.sort_descending
00:00:08 #219 [Verbose] > |> am'.try_item 0i32
00:00:08 #220 [Verbose] > |> optionm'.default_value 0i64
00:00:08 #221 [Verbose] > |> am'.indexed
00:00:08 #222 [Verbose] > |> fun (x : a i32 _) => x
00:00:08 #223 [Verbose] > |> mapm.of_array
00:00:08 #224 [Verbose] > table
00:00:08 #225 [Verbose] > |> am.map fun (row, color) =>
00:00:08 #226 [Verbose] > inl newRow =
00:00:08 #227 [Verbose] > row
00:00:08 #228 [Verbose] > |> listm'.indexed
00:00:08 #229 [Verbose] > |> listm.map fun (i, cell) =>
00:00:08 #230 [Verbose] > cell |> sm'.pad_right (lengthMap |> mapm.item i |> conv)
00:00:08 #231 [Verbose] > |> listm.toArray
00:00:08 #232 [Verbose] > newRow, color
00:00:08 #233 [Verbose] >
00:00:08 #234 [Verbose] > printfn ""
00:00:08 #235 [Verbose] > formattedTable
00:00:08 #236 [Verbose] > |> am.iter fun ((row : a i32 string), color) =>
00:00:08 #237 [Verbose] > match color with
00:00:08 #238 [Verbose] > | Some color => color |> console.set_foreground_color
00:00:08 #239 [Verbose] > | None => console.reset_color ()
00:00:08 #240 [Verbose] >
00:00:08 #241 [Verbose] > printfn (row |> sm'.join' "\t| ")
00:00:08 #242 [Verbose] >
00:00:08 #243 [Verbose] > console.reset_color ()
00:00:08 #244 [Verbose] >
00:00:08 #245 [Verbose] > inl averages : a u64 _ =
00:00:08 #246 [Verbose] > results
00:00:08 #247 [Verbose] > |> am.map fun result =>
00:00:08 #248 [Verbose] > result.TimeList
00:00:08 #249 [Verbose] > |> am.map ($"float" : i64 -> f64)
00:00:08 #250 [Verbose] > |> am'.transpose
00:00:08 #251 [Verbose] > |> am.map am'.average
00:00:08 #252 [Verbose] > |> am.map ($"int64" : f64 -> i64)
00:00:08 #253 [Verbose] > |> am'.indexed
00:00:08 #254 [Verbose] >
00:00:08 #255 [Verbose] > printfn ""
00:00:08 #256 [Verbose] > printfn "Average Ranking "
00:00:08 #257 [Verbose] > averages
00:00:08 #258 [Verbose] > |> am'.sort_by snd
00:00:08 #259 [Verbose] > |> am.iter fun ((i : i32), avg) =>
00:00:08 #260 [Verbose] > printfn ($"$\"Test case %d{!i + 1}. Average Time: %A{!avg} \"" :
00:00:08 #261 [Verbose] > string)
00:00:08 #262 [Verbose] >
00:00:08 #263 [Verbose] > ╭─[ 400.91ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #264 [Verbose] > │ () │
00:00:08 #265 [Verbose] > │ │
00:00:08 #266 [Verbose] > │ │
00:00:08 #267 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #268 [Verbose] >
00:00:08 #269 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #270 [Verbose] > // // test
00:00:08 #271 [Verbose] >
00:00:08 #272 [Verbose] > inl is_fast () =
00:00:08 #273 [Verbose] > false
00:00:08 #274 [Verbose] >
00:00:08 #275 [Verbose] > ╭─[ 201.85ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #276 [Verbose] > │ () │
00:00:08 #277 [Verbose] > │ │
00:00:08 #278 [Verbose] > │ │
00:00:08 #279 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #280 [Verbose] >
00:00:08 #281 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #282 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #283 [Verbose] > │ ## empty2Tests │
00:00:08 #284 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #285 [Verbose] >
00:00:08 #286 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #287 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #288 [Verbose] > │ Test: Empty2 │
00:00:08 #289 [Verbose] > │ │
00:00:08 #290 [Verbose] > │ Solution: (a, a) │
00:00:08 #291 [Verbose] > │ Test case 1. A. Time: 59L │
00:00:08 #292 [Verbose] > │ │
00:00:08 #293 [Verbose] > │ Solution: (a, a) │
00:00:08 #294 [Verbose] > │ Test case 1. A. Time: 53L │
00:00:08 #295 [Verbose] > │ │
00:00:08 #296 [Verbose] > │ Input | Expected | Result | Best │
00:00:08 #297 [Verbose] > │ --- | --- | --- | --- │
00:00:08 #298 [Verbose] > │ (a, a) | a | a | (1, 59) │
00:00:08 #299 [Verbose] > │ (a, a) | a | a | (1, 53) │
00:00:08 #300 [Verbose] > │ │
00:00:08 #301 [Verbose] > │ Averages │
00:00:08 #302 [Verbose] > │ Test case 1. Average Time: 56L │
00:00:08 #303 [Verbose] > │ │
00:00:08 #304 [Verbose] > │ Ranking │
00:00:08 #305 [Verbose] > │ Test case 1. Average Time: 56L │
00:00:08 #306 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #307 [Verbose] >
00:00:08 #308 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #309 [Verbose] > // // test
00:00:08 #310 [Verbose] >
00:00:08 #311 [Verbose] > inl get_solutions () =
00:00:08 #312 [Verbose] > [[
00:00:08 #313 [Verbose] > "A",
00:00:08 #314 [Verbose] > fun (a, _b) =>
00:00:08 #315 [Verbose] > a
00:00:08 #316 [Verbose] >
00:00:08 #317 [Verbose] > "B",
00:00:08 #318 [Verbose] > fun (_a, b) =>
00:00:08 #319 [Verbose] > b
00:00:08 #320 [Verbose] > ]]
00:00:08 #321 [Verbose] >
00:00:08 #322 [Verbose] > inl rec empty_2_tests () =
00:00:08 #323 [Verbose] > inl test_cases = [[
00:00:08 #324 [Verbose] > ("a", "a"), "a"
00:00:08 #325 [Verbose] > ("b", "b"), "b"
00:00:08 #326 [Verbose] > ]]
00:00:08 #327 [Verbose] >
00:00:08 #328 [Verbose] > inl solutions = get_solutions ()
00:00:08 #329 [Verbose] >
00:00:08 #330 [Verbose] > // inl is_fast () = true
00:00:08 #331 [Verbose] >
00:00:08 #332 [Verbose] > inl count =
00:00:08 #333 [Verbose] > if is_fast ()
00:00:08 #334 [Verbose] > then 1000i32
00:00:08 #335 [Verbose] > else 2000000i32
00:00:08 #336 [Verbose] >
00:00:08 #337 [Verbose] > run_all (nameof empty_2_tests) count solutions test_cases
00:00:08 #338 [Verbose] > |> sort_result_list
00:00:08 #339 [Verbose] >
00:00:08 #340 [Verbose] > empty_2_tests ()
00:00:19 #341 [Verbose] >
00:00:19 #342 [Verbose] > ╭─[ 10.52s - stdout ]──────────────────────────────────────────────────────────╮
00:00:19 #343 [Verbose] > │ type UH0 = │
00:00:19 #344 [Verbose] > │ | UH0_0 of string * string * string * UH0 │
00:00:19 #345 [Verbose] > │ | UH0_1 │
00:00:19 #346 [Verbose] > │ and Mut0 = {mutable l0 : uint64} │
00:00:19 #347 [Verbose] > │ and UH1 = │
00:00:19 #348 [Verbose] > │ | UH1_0 of int32 * string * (struct (string * string) -> string) * UH1 │
00:00:19 #349 [Verbose] > │ | UH1_1 │
00:00:19 #350 [Verbose] > │ and Mut1 = {mutable l0 : int32} │
00:00:19 #351 [Verbose] > │ and UH2 = │
00:00:19 #352 [Verbose] > │ | UH2_0 of string * UH2 │
00:00:19 #353 [Verbose] > │ | UH2_1 │
00:00:19 #354 [Verbose] > │ and [<Struct>] US0 = │
00:00:19 #355 [Verbose] > │ | US0_0 │
00:00:19 #356 [Verbose] > │ | US0_1 of f1_0 : System.ConsoleColor │
00:00:19 #357 [Verbose] > │ and UH3 = │
00:00:19 #358 [Verbose] > │ | UH3_0 of int64 * int64 * UH3 │
00:00:19 #359 [Verbose] > │ | UH3_1 │
00:00:19 #360 [Verbose] > │ and Mut2 = {mutable l0 : uint64; mutable l1 : UH3; mutable l2 : int64} │
00:00:19 #361 [Verbose] > │ and UH4 = │
00:00:19 #362 [Verbose] > │ | UH4_0 of UH2 * US0 * UH4 │
00:00:19 #363 [Verbose] > │ | UH4_1 │
00:00:19 #364 [Verbose] > │ and [<Struct>] US1 = │
00:00:19 #365 [Verbose] > │ | US1_0 │
00:00:19 #366 [Verbose] > │ | US1_1 of f1_0 : int64 │
00:00:19 #367 [Verbose] > │ and UH5 = │
00:00:19 #368 [Verbose] > │ | UH5_0 of int32 * int64 * UH5 │
00:00:19 #369 [Verbose] > │ | UH5_1 │
00:00:19 #370 [Verbose] > │ and Mut3 = {mutable l0 : uint64; mutable l1 : UH5; mutable l2 : int32} │
00:00:19 #371 [Verbose] > │ and UH6 = │
00:00:19 #372 [Verbose] > │ | UH6_0 of int32 * string * UH6 │
00:00:19 #373 [Verbose] > │ | UH6_1 │
00:00:19 #374 [Verbose] > │ let rec method2 (v0 : UH0, v1 : uint64) : uint64 = │
00:00:19 #375 [Verbose] > │ match v0 with │
00:00:19 #376 [Verbose] > │ | UH0_0(v2, v3, v4, v5) -> (* Cons *) │
00:00:19 #377 [Verbose] > │ let v6 : uint64 = v1 + 1UL │
00:00:19 #378 [Verbose] > │ method2(v5, v6) │
00:00:19 #379 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:19 #380 [Verbose] > │ v1 │
00:00:19 #381 [Verbose] > │ and method3 (v0 : (struct (string * string * string) []), v1 : UH0, v2 : │
00:00:19 #382 [Verbose] > │ uint64) : uint64 = │
00:00:19 #383 [Verbose] > │ match v1 with │
00:00:19 #384 [Verbose] > │ | UH0_0(v3, v4, v5, v6) -> (* Cons *) │
00:00:19 #385 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5) │
00:00:19 #386 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:00:19 #387 [Verbose] > │ method3(v0, v6, v7) │
00:00:19 #388 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:19 #389 [Verbose] > │ v2 │
00:00:19 #390 [Verbose] > │ and method1 (v0 : UH0) : (struct (string * string * string) []) = │
00:00:19 #391 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:19 #392 [Verbose] > │ let v2 : uint64 = method2(v0, v1) │
00:00:19 #393 [Verbose] > │ let v3 : (struct (string * string * string) []) = │
00:00:19 #394 [Verbose] > │ Array.zeroCreate<struct (string * string * string)> │
00:00:19 #395 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:19 #396 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:19 #397 [Verbose] > │ let v5 : uint64 = method3(v3, v0, v4) │
00:00:19 #398 [Verbose] > │ v3 │
00:00:19 #399 [Verbose] > │ and method4 (v0 : uint64, v1 : Mut0) : bool = │
00:00:19 #400 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:19 #401 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:19 #402 [Verbose] > │ v3 │
00:00:19 #403 [Verbose] > │ and closure1 () struct (v0 : string, v1 : string) : string = │
00:00:19 #404 [Verbose] > │ v0 │
00:00:19 #405 [Verbose] > │ and closure2 () struct (v0 : string, v1 : string) : string = │
00:00:19 #406 [Verbose] > │ v1 │
00:00:19 #407 [Verbose] > │ and method6 (v0 : UH1, v1 : uint64) : uint64 = │
00:00:19 #408 [Verbose] > │ match v0 with │
00:00:19 #409 [Verbose] > │ | UH1_0(v2, v3, v4, v5) -> (* Cons *) │
00:00:19 #410 [Verbose] > │ let v6 : uint64 = v1 + 1UL │
00:00:19 #411 [Verbose] > │ method6(v5, v6) │
00:00:19 #412 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:19 #413 [Verbose] > │ v1 │
00:00:19 #414 [Verbose] > │ and method7 (v0 : (struct (int32 * string * (struct (string * string) -> │
00:00:19 #415 [Verbose] > │ string)) []), v1 : UH1, v2 : uint64) : uint64 = │
00:00:19 #416 [Verbose] > │ match v1 with │
00:00:19 #417 [Verbose] > │ | UH1_0(v3, v4, v5, v6) -> (* Cons *) │
00:00:19 #418 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5) │
00:00:19 #419 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:00:19 #420 [Verbose] > │ method7(v0, v6, v7) │
00:00:19 #421 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:19 #422 [Verbose] > │ v2 │
00:00:19 #423 [Verbose] > │ and method5 (v0 : UH1) : (struct (int32 * string * (struct (string * string) │
00:00:19 #424 [Verbose] > │ -> string)) []) = │
00:00:19 #425 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:19 #426 [Verbose] > │ let v2 : uint64 = method6(v0, v1) │
00:00:19 #427 [Verbose] > │ let v3 : (struct (int32 * string * (struct (string * string) -> string)) │
00:00:19 #428 [Verbose] > │ []) = Array.zeroCreate<struct (int32 * string * (struct (string * string) -> │
00:00:19 #429 [Verbose] > │ string))> (System.Convert.ToInt32(v2)) │
00:00:19 #430 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:19 #431 [Verbose] > │ let v5 : uint64 = method7(v3, v0, v4) │
00:00:19 #432 [Verbose] > │ v3 │
00:00:19 #433 [Verbose] > │ and method8 (v0 : Mut1) : bool = │
00:00:19 #434 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:19 #435 [Verbose] > │ let v2 : bool = v1 < 2000001 │
00:00:19 #436 [Verbose] > │ v2 │
00:00:19 #437 [Verbose] > │ and closure3 (v0 : string, v1 : string, v2 : (struct (string * string) -> │
00:00:19 #438 [Verbose] > │ string)) (v3 : int32) : string = │
00:00:19 #439 [Verbose] > │ v2 struct (v0, v1) │
00:00:19 #440 [Verbose] > │ and method9 (v0 : string, v1 : (string []), v2 : uint64) : bool = │
00:00:19 #441 [Verbose] > │ let v3 : uint64 = System.Convert.ToUInt64 v1.Length │
00:00:19 #442 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:19 #443 [Verbose] > │ if v4 then │
00:00:19 #444 [Verbose] > │ let v5 : string = v1.[int v2] │
00:00:19 #445 [Verbose] > │ let v6 : bool = v0 = v5 │
00:00:19 #446 [Verbose] > │ if v6 then │
00:00:19 #447 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:00:19 #448 [Verbose] > │ method9(v0, v1, v7) │
00:00:19 #449 [Verbose] > │ else │
00:00:19 #450 [Verbose] > │ false │
00:00:19 #451 [Verbose] > │ else │
00:00:19 #452 [Verbose] > │ true │
00:00:19 #453 [Verbose] > │ and method10 (v0 : uint64, v1 : Mut2) : bool = │
00:00:19 #454 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:19 #455 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:19 #456 [Verbose] > │ v3 │
00:00:19 #457 [Verbose] > │ and method11 (v0 : UH3, v1 : UH3) : UH3 = │
00:00:19 #458 [Verbose] > │ match v0 with │
00:00:19 #459 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #460 [Verbose] > │ let v5 : UH3 = UH3_0(v2, v3, v1) │
00:00:19 #461 [Verbose] > │ method11(v4, v5) │
00:00:19 #462 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:19 #463 [Verbose] > │ v1 │
00:00:19 #464 [Verbose] > │ and method13 (v0 : UH3, v1 : int32) : int32 = │
00:00:19 #465 [Verbose] > │ match v0 with │
00:00:19 #466 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #467 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:19 #468 [Verbose] > │ method13(v4, v5) │
00:00:19 #469 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:19 #470 [Verbose] > │ v1 │
00:00:19 #471 [Verbose] > │ and method14 (v0 : (struct (int64 * int64) []), v1 : UH3, v2 : int32) : │
00:00:19 #472 [Verbose] > │ int32 = │
00:00:19 #473 [Verbose] > │ match v1 with │
00:00:19 #474 [Verbose] > │ | UH3_0(v3, v4, v5) -> (* Cons *) │
00:00:19 #475 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:19 #476 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:19 #477 [Verbose] > │ method14(v0, v5, v6) │
00:00:19 #478 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:19 #479 [Verbose] > │ v2 │
00:00:19 #480 [Verbose] > │ and method12 (v0 : UH3) : (struct (int64 * int64) []) = │
00:00:19 #481 [Verbose] > │ let v1 : int32 = 0 │
00:00:19 #482 [Verbose] > │ let v2 : int32 = method13(v0, v1) │
00:00:19 #483 [Verbose] > │ let v3 : (struct (int64 * int64) []) = Array.zeroCreate<struct (int64 * │
00:00:19 #484 [Verbose] > │ int64)> (v2) │
00:00:19 #485 [Verbose] > │ let v4 : int32 = 0 │
00:00:19 #486 [Verbose] > │ let v5 : int32 = method14(v3, v0, v4) │
00:00:19 #487 [Verbose] > │ v3 │
00:00:19 #488 [Verbose] > │ and method15 (v0 : int32, v1 : Mut1) : bool = │
00:00:19 #489 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:19 #490 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:19 #491 [Verbose] > │ v3 │
00:00:19 #492 [Verbose] > │ and closure4 () struct (v0 : int64, v1 : int64) : int64 = │
00:00:19 #493 [Verbose] > │ v1 │
00:00:19 #494 [Verbose] > │ and method17 (v0 : UH4, v1 : uint64) : uint64 = │
00:00:19 #495 [Verbose] > │ match v0 with │
00:00:19 #496 [Verbose] > │ | UH4_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #497 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:00:19 #498 [Verbose] > │ method17(v4, v5) │
00:00:19 #499 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:19 #500 [Verbose] > │ v1 │
00:00:19 #501 [Verbose] > │ and method18 (v0 : (struct (UH2 * US0) []), v1 : UH4, v2 : uint64) : uint64 │
00:00:19 #502 [Verbose] > │ = │
00:00:19 #503 [Verbose] > │ match v1 with │
00:00:19 #504 [Verbose] > │ | UH4_0(v3, v4, v5) -> (* Cons *) │
00:00:19 #505 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:19 #506 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:00:19 #507 [Verbose] > │ method18(v0, v5, v6) │
00:00:19 #508 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:19 #509 [Verbose] > │ v2 │
00:00:19 #510 [Verbose] > │ and method16 (v0 : UH4) : (struct (UH2 * US0) []) = │
00:00:19 #511 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:19 #512 [Verbose] > │ let v2 : uint64 = method17(v0, v1) │
00:00:19 #513 [Verbose] > │ let v3 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:19 #514 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:19 #515 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:19 #516 [Verbose] > │ let v5 : uint64 = method18(v3, v0, v4) │
00:00:19 #517 [Verbose] > │ v3 │
00:00:19 #518 [Verbose] > │ and method20 (v0 : UH2, v1 : uint64) : uint64 = │
00:00:19 #519 [Verbose] > │ match v0 with │
00:00:19 #520 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:19 #521 [Verbose] > │ let v4 : uint64 = v1 + 1UL │
00:00:19 #522 [Verbose] > │ method20(v3, v4) │
00:00:19 #523 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:19 #524 [Verbose] > │ v1 │
00:00:19 #525 [Verbose] > │ and method21 (v0 : (string []), v1 : UH2, v2 : uint64) : uint64 = │
00:00:19 #526 [Verbose] > │ match v1 with │
00:00:19 #527 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:19 #528 [Verbose] > │ v0.[int v2] <- v3 │
00:00:19 #529 [Verbose] > │ let v5 : uint64 = v2 + 1UL │
00:00:19 #530 [Verbose] > │ method21(v0, v4, v5) │
00:00:19 #531 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:19 #532 [Verbose] > │ v2 │
00:00:19 #533 [Verbose] > │ and method19 (v0 : UH2) : (string []) = │
00:00:19 #534 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:19 #535 [Verbose] > │ let v2 : uint64 = method20(v0, v1) │
00:00:19 #536 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> │
00:00:19 #537 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:19 #538 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:19 #539 [Verbose] > │ let v5 : uint64 = method21(v3, v0, v4) │
00:00:19 #540 [Verbose] > │ v3 │
00:00:19 #541 [Verbose] > │ and closure5 () (v0 : int64) : US1 = │
00:00:19 #542 [Verbose] > │ US1_1(v0) │
00:00:19 #543 [Verbose] > │ and method22 (v0 : uint64, v1 : Mut3) : bool = │
00:00:19 #544 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:19 #545 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:19 #546 [Verbose] > │ v3 │
00:00:19 #547 [Verbose] > │ and method23 (v0 : UH5, v1 : UH5) : UH5 = │
00:00:19 #548 [Verbose] > │ match v0 with │
00:00:19 #549 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #550 [Verbose] > │ let v5 : UH5 = UH5_0(v2, v3, v1) │
00:00:19 #551 [Verbose] > │ method23(v4, v5) │
00:00:19 #552 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:19 #553 [Verbose] > │ v1 │
00:00:19 #554 [Verbose] > │ and method25 (v0 : UH5, v1 : int32) : int32 = │
00:00:19 #555 [Verbose] > │ match v0 with │
00:00:19 #556 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #557 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:19 #558 [Verbose] > │ method25(v4, v5) │
00:00:19 #559 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:19 #560 [Verbose] > │ v1 │
00:00:19 #561 [Verbose] > │ and method26 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : int32) : │
00:00:19 #562 [Verbose] > │ int32 = │
00:00:19 #563 [Verbose] > │ match v1 with │
00:00:19 #564 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:00:19 #565 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:19 #566 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:19 #567 [Verbose] > │ method26(v0, v5, v6) │
00:00:19 #568 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:19 #569 [Verbose] > │ v2 │
00:00:19 #570 [Verbose] > │ and method24 (v0 : UH5) : (struct (int32 * int64) []) = │
00:00:19 #571 [Verbose] > │ let v1 : int32 = 0 │
00:00:19 #572 [Verbose] > │ let v2 : int32 = method25(v0, v1) │
00:00:19 #573 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:00:19 #574 [Verbose] > │ int64)> (v2) │
00:00:19 #575 [Verbose] > │ let v4 : int32 = 0 │
00:00:19 #576 [Verbose] > │ let v5 : int32 = method26(v3, v0, v4) │
00:00:19 #577 [Verbose] > │ v3 │
00:00:19 #578 [Verbose] > │ and method27 (v0 : UH2, v1 : UH6, v2 : int32) : struct (UH6 * int32) = │
00:00:19 #579 [Verbose] > │ match v0 with │
00:00:19 #580 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:19 #581 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:19 #582 [Verbose] > │ let v6 : UH6 = UH6_0(v2, v3, v1) │
00:00:19 #583 [Verbose] > │ method27(v4, v6, v5) │
00:00:19 #584 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:19 #585 [Verbose] > │ struct (v1, v2) │
00:00:19 #586 [Verbose] > │ and method28 (v0 : UH6, v1 : UH6) : UH6 = │
00:00:19 #587 [Verbose] > │ match v0 with │
00:00:19 #588 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #589 [Verbose] > │ let v5 : UH6 = UH6_0(v2, v3, v1) │
00:00:19 #590 [Verbose] > │ method28(v4, v5) │
00:00:19 #591 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:19 #592 [Verbose] > │ v1 │
00:00:19 #593 [Verbose] > │ and method29 (v0 : Map<int32, int64>, v1 : UH6, v2 : UH2) : UH2 = │
00:00:19 #594 [Verbose] > │ match v1 with │
00:00:19 #595 [Verbose] > │ | UH6_0(v3, v4, v5) -> (* Cons *) │
00:00:19 #596 [Verbose] > │ let v6 : UH2 = method29(v0, v5, v2) │
00:00:19 #597 [Verbose] > │ let v7 : int64 = v0.[v3] │
00:00:19 #598 [Verbose] > │ let v8 : int32 = int32 v7 │
00:00:19 #599 [Verbose] > │ let v9 : string = v4.PadRight v8 │
00:00:19 #600 [Verbose] > │ UH2_0(v9, v6) │
00:00:19 #601 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:19 #602 [Verbose] > │ v2 │
00:00:19 #603 [Verbose] > │ and method31 (v0 : UH2, v1 : int32) : int32 = │
00:00:19 #604 [Verbose] > │ match v0 with │
00:00:19 #605 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:19 #606 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:19 #607 [Verbose] > │ method31(v3, v4) │
00:00:19 #608 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:19 #609 [Verbose] > │ v1 │
00:00:19 #610 [Verbose] > │ and method32 (v0 : (string []), v1 : UH2, v2 : int32) : int32 = │
00:00:19 #611 [Verbose] > │ match v1 with │
00:00:19 #612 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:19 #613 [Verbose] > │ v0.[int v2] <- v3 │
00:00:19 #614 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:19 #615 [Verbose] > │ method32(v0, v4, v5) │
00:00:19 #616 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:19 #617 [Verbose] > │ v2 │
00:00:19 #618 [Verbose] > │ and method30 (v0 : UH2) : (string []) = │
00:00:19 #619 [Verbose] > │ let v1 : int32 = 0 │
00:00:19 #620 [Verbose] > │ let v2 : int32 = method31(v0, v1) │
00:00:19 #621 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> (v2) │
00:00:19 #622 [Verbose] > │ let v4 : int32 = 0 │
00:00:19 #623 [Verbose] > │ let v5 : int32 = method32(v3, v0, v4) │
00:00:19 #624 [Verbose] > │ v3 │
00:00:19 #625 [Verbose] > │ and method34 (v0 : UH5, v1 : uint64) : uint64 = │
00:00:19 #626 [Verbose] > │ match v0 with │
00:00:19 #627 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:19 #628 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:00:19 #629 [Verbose] > │ method34(v4, v5) │
00:00:19 #630 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:19 #631 [Verbose] > │ v1 │
00:00:19 #632 [Verbose] > │ and method35 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : uint64) : │
00:00:19 #633 [Verbose] > │ uint64 = │
00:00:19 #634 [Verbose] > │ match v1 with │
00:00:19 #635 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:00:19 #636 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:19 #637 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:00:19 #638 [Verbose] > │ method35(v0, v5, v6) │
00:00:19 #639 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:19 #640 [Verbose] > │ v2 │
00:00:19 #641 [Verbose] > │ and method33 (v0 : UH5) : (struct (int32 * int64) []) = │
00:00:19 #642 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:19 #643 [Verbose] > │ let v2 : uint64 = method34(v0, v1) │
00:00:19 #644 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:00:19 #645 [Verbose] > │ int64)> (System.Convert.ToInt32(v2)) │
00:00:19 #646 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:19 #647 [Verbose] > │ let v5 : uint64 = method35(v3, v0, v4) │
00:00:19 #648 [Verbose] > │ v3 │
00:00:19 #649 [Verbose] > │ and closure6 () struct (v0 : int32, v1 : int64) : int64 = │
00:00:19 #650 [Verbose] > │ v1 │
00:00:19 #651 [Verbose] > │ and closure0 () () : unit = │
00:00:19 #652 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:00:19 #653 [Verbose] > │ let v1 : string = nameof v0 │
00:00:19 #654 [Verbose] > │ let v2 : string = "" │
00:00:19 #655 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #656 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #657 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:00:19 #658 [Verbose] > │ System.Console.WriteLine v3 │
00:00:19 #659 [Verbose] > │ let v4 : string = "a" │
00:00:19 #660 [Verbose] > │ let v5 : string = "b" │
00:00:19 #661 [Verbose] > │ let v6 : UH0 = UH0_1 │
00:00:19 #662 [Verbose] > │ let v7 : UH0 = UH0_0(v5, v5, v5, v6) │
00:00:19 #663 [Verbose] > │ let v8 : UH0 = UH0_0(v4, v4, v4, v7) │
00:00:19 #664 [Verbose] > │ let v9 : (struct (string * string * string) []) = method1(v8) │
00:00:19 #665 [Verbose] > │ let v10 : uint64 = System.Convert.ToUInt64 v9.Length │
00:00:19 #666 [Verbose] > │ let v11 : (struct (string * string * string * (int64 [])) []) = │
00:00:19 #667 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:00:19 #668 [Verbose] > │ (System.Convert.ToInt32(v10)) │
00:00:19 #669 [Verbose] > │ let v12 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #670 [Verbose] > │ while method4(v10, v12) do │
00:00:19 #671 [Verbose] > │ let v14 : uint64 = v12.l0 │
00:00:19 #672 [Verbose] > │ let struct (v15 : string, v16 : string, v17 : string) = v9.[int v14] │
00:00:19 #673 [Verbose] > │ let v18 : string = $"%A{struct (v15, v16)}" │
00:00:19 #674 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #675 [Verbose] > │ let v19 : string = $"Solution: {v18} " │
00:00:19 #676 [Verbose] > │ System.Console.WriteLine v19 │
00:00:19 #677 [Verbose] > │ let v20 : int32 = 0 │
00:00:19 #678 [Verbose] > │ let v21 : string = "A" │
00:00:19 #679 [Verbose] > │ let v22 : (struct (string * string) -> string) = closure1() │
00:00:19 #680 [Verbose] > │ let v23 : int32 = 1 │
00:00:19 #681 [Verbose] > │ let v24 : string = "B" │
00:00:19 #682 [Verbose] > │ let v25 : (struct (string * string) -> string) = closure2() │
00:00:19 #683 [Verbose] > │ let v26 : UH1 = UH1_1 │
00:00:19 #684 [Verbose] > │ let v27 : UH1 = UH1_0(v23, v24, v25, v26) │
00:00:19 #685 [Verbose] > │ let v28 : UH1 = UH1_0(v20, v21, v22, v27) │
00:00:19 #686 [Verbose] > │ let v29 : (struct (int32 * string * (struct (string * string) -> │
00:00:19 #687 [Verbose] > │ string)) []) = method5(v28) │
00:00:19 #688 [Verbose] > │ let v30 : uint64 = System.Convert.ToUInt64 v29.Length │
00:00:19 #689 [Verbose] > │ let v31 : (struct (string * int64) []) = Array.zeroCreate<struct │
00:00:19 #690 [Verbose] > │ (string * int64)> (System.Convert.ToInt32(v30)) │
00:00:19 #691 [Verbose] > │ let v32 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #692 [Verbose] > │ while method4(v30, v32) do │
00:00:19 #693 [Verbose] > │ let v34 : uint64 = v32.l0 │
00:00:19 #694 [Verbose] > │ let struct (v35 : int32, v36 : string, v37 : (struct (string * │
00:00:19 #695 [Verbose] > │ string) -> string)) = v29.[int v34] │
00:00:19 #696 [Verbose] > │ let mutable result = None │
00:00:19 #697 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #698 [Verbose] > │ #if !WASM │
00:00:19 #699 [Verbose] > │ () │
00:00:19 #700 [Verbose] > │ #else │
00:00:19 #701 [Verbose] > │ () │
00:00:19 #702 [Verbose] > │ #endif │
00:00:19 #703 [Verbose] > │ #else │
00:00:19 #704 [Verbose] > │ System.GC.Collect () │
00:00:19 #705 [Verbose] > │ () │
00:00:19 #706 [Verbose] > │ #endif │
00:00:19 #707 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #708 [Verbose] > │ result |> Option.get │
00:00:19 #709 [Verbose] > │ let v38 : (unit -> System.Diagnostics.Stopwatch) = │
00:00:19 #710 [Verbose] > │ System.Diagnostics.Stopwatch │
00:00:19 #711 [Verbose] > │ let v39 : System.Diagnostics.Stopwatch = v38 () │
00:00:19 #712 [Verbose] > │ v39.Start () │
00:00:19 #713 [Verbose] > │ let v40 : int64 = v39.ElapsedMilliseconds │
00:00:19 #714 [Verbose] > │ let v41 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:00:19 #715 [Verbose] > │ let v42 : Mut1 = {l0 = 0} : Mut1 │
00:00:19 #716 [Verbose] > │ while method8(v42) do │
00:00:19 #717 [Verbose] > │ let v44 : int32 = v42.l0 │
00:00:19 #718 [Verbose] > │ v41.[int v44] <- v44 │
00:00:19 #719 [Verbose] > │ let v45 : int32 = v44 + 1 │
00:00:19 #720 [Verbose] > │ v42.l0 <- v45 │
00:00:19 #721 [Verbose] > │ () │
00:00:19 #722 [Verbose] > │ let v46 : (int32 -> string) = closure3(v15, v16, v37) │
00:00:19 #723 [Verbose] > │ let v47 : (string []) = v41 |> Array.Parallel.map v46 │
00:00:19 #724 [Verbose] > │ let v48 : int32 = v47.Length │
00:00:19 #725 [Verbose] > │ let v49 : int32 = v48 - 1 │
00:00:19 #726 [Verbose] > │ let v50 : string = v47.[int v49] │
00:00:19 #727 [Verbose] > │ let v51 : int64 = v39.ElapsedMilliseconds │
00:00:19 #728 [Verbose] > │ let v52 : int64 = v51 - v40 │
00:00:19 #729 [Verbose] > │ let v53 : string = $"Test case {v35 + 1}. {v36}. Time: {v52} " │
00:00:19 #730 [Verbose] > │ System.Console.WriteLine v53 │
00:00:19 #731 [Verbose] > │ v31.[int v34] <- struct (v50, v52) │
00:00:19 #732 [Verbose] > │ let v54 : uint64 = v34 + 1UL │
00:00:19 #733 [Verbose] > │ v32.l0 <- v54 │
00:00:19 #734 [Verbose] > │ () │
00:00:19 #735 [Verbose] > │ let v55 : uint64 = System.Convert.ToUInt64 v31.Length │
00:00:19 #736 [Verbose] > │ let v56 : (string []) = Array.zeroCreate<string> │
00:00:19 #737 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #738 [Verbose] > │ let v57 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #739 [Verbose] > │ while method4(v55, v57) do │
00:00:19 #740 [Verbose] > │ let v59 : uint64 = v57.l0 │
00:00:19 #741 [Verbose] > │ let struct (v60 : string, v61 : int64) = v31.[int v59] │
00:00:19 #742 [Verbose] > │ v56.[int v59] <- v60 │
00:00:19 #743 [Verbose] > │ let v62 : uint64 = v59 + 1UL │
00:00:19 #744 [Verbose] > │ v57.l0 <- v62 │
00:00:19 #745 [Verbose] > │ () │
00:00:19 #746 [Verbose] > │ let v63 : uint64 = System.Convert.ToUInt64 v56.Length │
00:00:19 #747 [Verbose] > │ let v64 : bool = v63 <= 1UL │
00:00:19 #748 [Verbose] > │ if v64 then │
00:00:19 #749 [Verbose] > │ () │
00:00:19 #750 [Verbose] > │ else │
00:00:19 #751 [Verbose] > │ let v65 : string = v56.[int 0UL] │
00:00:19 #752 [Verbose] > │ let v66 : uint64 = 0UL │
00:00:19 #753 [Verbose] > │ let v67 : bool = method9(v65, v56, v66) │
00:00:19 #754 [Verbose] > │ if v67 then │
00:00:19 #755 [Verbose] > │ () │
00:00:19 #756 [Verbose] > │ else │
00:00:19 #757 [Verbose] > │ let v68 : string = $"Challenge error: {v56}" │
00:00:19 #758 [Verbose] > │ failwith<unit> v68 │
00:00:19 #759 [Verbose] > │ let v69 : string = $"%A{v17}" │
00:00:19 #760 [Verbose] > │ let v70 : (string []) = Array.zeroCreate<string> │
00:00:19 #761 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #762 [Verbose] > │ let v71 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #763 [Verbose] > │ while method4(v55, v71) do │
00:00:19 #764 [Verbose] > │ let v73 : uint64 = v71.l0 │
00:00:19 #765 [Verbose] > │ let struct (v74 : string, v75 : int64) = v31.[int v73] │
00:00:19 #766 [Verbose] > │ v70.[int v73] <- v74 │
00:00:19 #767 [Verbose] > │ let v76 : uint64 = v73 + 1UL │
00:00:19 #768 [Verbose] > │ v71.l0 <- v76 │
00:00:19 #769 [Verbose] > │ () │
00:00:19 #770 [Verbose] > │ let v77 : string = v70.[int 0UL] │
00:00:19 #771 [Verbose] > │ let v78 : string = $"%A{v77}" │
00:00:19 #772 [Verbose] > │ let v79 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #773 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #774 [Verbose] > │ let v80 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #775 [Verbose] > │ while method4(v55, v80) do │
00:00:19 #776 [Verbose] > │ let v82 : uint64 = v80.l0 │
00:00:19 #777 [Verbose] > │ let struct (v83 : string, v84 : int64) = v31.[int v82] │
00:00:19 #778 [Verbose] > │ v79.[int v82] <- v84 │
00:00:19 #779 [Verbose] > │ let v85 : uint64 = v82 + 1UL │
00:00:19 #780 [Verbose] > │ v80.l0 <- v85 │
00:00:19 #781 [Verbose] > │ () │
00:00:19 #782 [Verbose] > │ v11.[int v14] <- struct (v69, v18, v78, v79) │
00:00:19 #783 [Verbose] > │ let v86 : uint64 = v14 + 1UL │
00:00:19 #784 [Verbose] > │ v12.l0 <- v86 │
00:00:19 #785 [Verbose] > │ () │
00:00:19 #786 [Verbose] > │ let v87 : uint64 = System.Convert.ToUInt64 v11.Length │
00:00:19 #787 [Verbose] > │ let v88 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:19 #788 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:19 #789 [Verbose] > │ let v89 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #790 [Verbose] > │ while method4(v87, v89) do │
00:00:19 #791 [Verbose] > │ let v91 : uint64 = v89.l0 │
00:00:19 #792 [Verbose] > │ let struct (v92 : string, v93 : string, v94 : string, v95 : (int64 [ │
00:00:19 #793 [Verbose] > │ ])) = v11.[int v91] │
00:00:19 #794 [Verbose] > │ let v96 : uint64 = System.Convert.ToUInt64 v95.Length │
00:00:19 #795 [Verbose] > │ let v97 : UH3 = UH3_1 │
00:00:19 #796 [Verbose] > │ let v98 : Mut2 = {l0 = 0UL; l1 = v97; l2 = 0L} : Mut2 │
00:00:19 #797 [Verbose] > │ while method10(v96, v98) do │
00:00:19 #798 [Verbose] > │ let v100 : uint64 = v98.l0 │
00:00:19 #799 [Verbose] > │ let struct (v101 : UH3, v102 : int64) = v98.l1, v98.l2 │
00:00:19 #800 [Verbose] > │ let v103 : int64 = v95.[int v100] │
00:00:19 #801 [Verbose] > │ let v104 : int64 = v102 + 1L │
00:00:19 #802 [Verbose] > │ let v105 : uint64 = v100 + 1UL │
00:00:19 #803 [Verbose] > │ let v106 : UH3 = UH3_0(v102, v103, v101) │
00:00:19 #804 [Verbose] > │ v98.l0 <- v105 │
00:00:19 #805 [Verbose] > │ v98.l1 <- v106 │
00:00:19 #806 [Verbose] > │ v98.l2 <- v104 │
00:00:19 #807 [Verbose] > │ () │
00:00:19 #808 [Verbose] > │ let struct (v107 : UH3, v108 : int64) = v98.l1, v98.l2 │
00:00:19 #809 [Verbose] > │ let v109 : UH3 = UH3_1 │
00:00:19 #810 [Verbose] > │ let v110 : UH3 = method11(v107, v109) │
00:00:19 #811 [Verbose] > │ let v111 : (struct (int64 * int64) []) = method12(v110) │
00:00:19 #812 [Verbose] > │ let v112 : int32 = v111.Length │
00:00:19 #813 [Verbose] > │ let v113 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:00:19 #814 [Verbose] > │ (int64 * int64)> (v112) │
00:00:19 #815 [Verbose] > │ let v114 : Mut1 = {l0 = 0} : Mut1 │
00:00:19 #816 [Verbose] > │ while method15(v112, v114) do │
00:00:19 #817 [Verbose] > │ let v116 : int32 = v114.l0 │
00:00:19 #818 [Verbose] > │ let struct (v117 : int64, v118 : int64) = v111.[int v116] │
00:00:19 #819 [Verbose] > │ let v119 : int64 = v117 + 1L │
00:00:19 #820 [Verbose] > │ v113.[int v116] <- struct (v119, v118) │
00:00:19 #821 [Verbose] > │ let v120 : int32 = v116 + 1 │
00:00:19 #822 [Verbose] > │ v114.l0 <- v120 │
00:00:19 #823 [Verbose] > │ () │
00:00:19 #824 [Verbose] > │ let v121 : (struct (int64 * int64) -> int64) = closure4() │
00:00:19 #825 [Verbose] > │ let v122 : (struct (int64 * int64) []) = v113 |> Array.sortBy v121 │
00:00:19 #826 [Verbose] > │ let struct (v123 : int64, v124 : int64) = v122.[int 0] │
00:00:19 #827 [Verbose] > │ let v125 : string = $"%A{struct (v123, v124)}" │
00:00:19 #828 [Verbose] > │ let v126 : bool = v92 = v94 │
00:00:19 #829 [Verbose] > │ let v131 : US0 = │
00:00:19 #830 [Verbose] > │ if v126 then │
00:00:19 #831 [Verbose] > │ let v127 : System.ConsoleColor = │
00:00:19 #832 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:00:19 #833 [Verbose] > │ US0_1(v127) │
00:00:19 #834 [Verbose] > │ else │
00:00:19 #835 [Verbose] > │ let v129 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:00:19 #836 [Verbose] > │ US0_1(v129) │
00:00:19 #837 [Verbose] > │ let v132 : UH2 = UH2_1 │
00:00:19 #838 [Verbose] > │ let v133 : UH2 = UH2_0(v125, v132) │
00:00:19 #839 [Verbose] > │ let v134 : UH2 = UH2_0(v94, v133) │
00:00:19 #840 [Verbose] > │ let v135 : UH2 = UH2_0(v92, v134) │
00:00:19 #841 [Verbose] > │ let v136 : UH2 = UH2_0(v93, v135) │
00:00:19 #842 [Verbose] > │ v88.[int v91] <- struct (v136, v131) │
00:00:19 #843 [Verbose] > │ let v137 : uint64 = v91 + 1UL │
00:00:19 #844 [Verbose] > │ v89.l0 <- v137 │
00:00:19 #845 [Verbose] > │ () │
00:00:19 #846 [Verbose] > │ let v138 : string = "Input" │
00:00:19 #847 [Verbose] > │ let v139 : string = "Expected" │
00:00:19 #848 [Verbose] > │ let v140 : string = "Result" │
00:00:19 #849 [Verbose] > │ let v141 : string = "Best" │
00:00:19 #850 [Verbose] > │ let v142 : UH2 = UH2_1 │
00:00:19 #851 [Verbose] > │ let v143 : UH2 = UH2_0(v141, v142) │
00:00:19 #852 [Verbose] > │ let v144 : UH2 = UH2_0(v140, v143) │
00:00:19 #853 [Verbose] > │ let v145 : UH2 = UH2_0(v139, v144) │
00:00:19 #854 [Verbose] > │ let v146 : UH2 = UH2_0(v138, v145) │
00:00:19 #855 [Verbose] > │ let v147 : US0 = US0_0 │
00:00:19 #856 [Verbose] > │ let v148 : string = "---" │
00:00:19 #857 [Verbose] > │ let v149 : UH2 = UH2_1 │
00:00:19 #858 [Verbose] > │ let v150 : UH2 = UH2_0(v148, v149) │
00:00:19 #859 [Verbose] > │ let v151 : UH2 = UH2_0(v148, v150) │
00:00:19 #860 [Verbose] > │ let v152 : UH2 = UH2_0(v148, v151) │
00:00:19 #861 [Verbose] > │ let v153 : UH2 = UH2_0(v148, v152) │
00:00:19 #862 [Verbose] > │ let v154 : US0 = US0_0 │
00:00:19 #863 [Verbose] > │ let v155 : UH4 = UH4_1 │
00:00:19 #864 [Verbose] > │ let v156 : UH4 = UH4_0(v153, v154, v155) │
00:00:19 #865 [Verbose] > │ let v157 : UH4 = UH4_0(v146, v147, v156) │
00:00:19 #866 [Verbose] > │ let v158 : (struct (UH2 * US0) []) = method16(v157) │
00:00:19 #867 [Verbose] > │ let v159 : uint64 = System.Convert.ToUInt64 v158.Length │
00:00:19 #868 [Verbose] > │ let v160 : uint64 = System.Convert.ToUInt64 v88.Length │
00:00:19 #869 [Verbose] > │ let v161 : uint64 = v159 + v160 │
00:00:19 #870 [Verbose] > │ let v162 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:00:19 #871 [Verbose] > │ US0)> (System.Convert.ToInt32(v161)) │
00:00:19 #872 [Verbose] > │ let v163 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #873 [Verbose] > │ while method4(v161, v163) do │
00:00:19 #874 [Verbose] > │ let v165 : uint64 = v163.l0 │
00:00:19 #875 [Verbose] > │ let v166 : bool = v165 < v159 │
00:00:19 #876 [Verbose] > │ let struct (v172 : UH2, v173 : US0) = │
00:00:19 #877 [Verbose] > │ if v166 then │
00:00:19 #878 [Verbose] > │ let struct (v167 : UH2, v168 : US0) = v158.[int v165] │
00:00:19 #879 [Verbose] > │ struct (v167, v168) │
00:00:19 #880 [Verbose] > │ else │
00:00:19 #881 [Verbose] > │ let v169 : uint64 = v165 - v159 │
00:00:19 #882 [Verbose] > │ let struct (v170 : UH2, v171 : US0) = v88.[int v169] │
00:00:19 #883 [Verbose] > │ struct (v170, v171) │
00:00:19 #884 [Verbose] > │ v162.[int v165] <- struct (v172, v173) │
00:00:19 #885 [Verbose] > │ let v174 : uint64 = v165 + 1UL │
00:00:19 #886 [Verbose] > │ v163.l0 <- v174 │
00:00:19 #887 [Verbose] > │ () │
00:00:19 #888 [Verbose] > │ let v175 : uint64 = System.Convert.ToUInt64 v162.Length │
00:00:19 #889 [Verbose] > │ let v176 : ((string []) []) = Array.zeroCreate<(string [])> │
00:00:19 #890 [Verbose] > │ (System.Convert.ToInt32(v175)) │
00:00:19 #891 [Verbose] > │ let v177 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #892 [Verbose] > │ while method4(v175, v177) do │
00:00:19 #893 [Verbose] > │ let v179 : uint64 = v177.l0 │
00:00:19 #894 [Verbose] > │ let struct (v180 : UH2, v181 : US0) = v162.[int v179] │
00:00:19 #895 [Verbose] > │ let v182 : (string []) = method19(v180) │
00:00:19 #896 [Verbose] > │ v176.[int v179] <- v182 │
00:00:19 #897 [Verbose] > │ let v183 : uint64 = v179 + 1UL │
00:00:19 #898 [Verbose] > │ v177.l0 <- v183 │
00:00:19 #899 [Verbose] > │ () │
00:00:19 #900 [Verbose] > │ let v184 : ((string []) []) = v176 |> Array.transpose │
00:00:19 #901 [Verbose] > │ let v185 : uint64 = System.Convert.ToUInt64 v184.Length │
00:00:19 #902 [Verbose] > │ let v186 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #903 [Verbose] > │ (System.Convert.ToInt32(v185)) │
00:00:19 #904 [Verbose] > │ let v187 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #905 [Verbose] > │ while method4(v185, v187) do │
00:00:19 #906 [Verbose] > │ let v189 : uint64 = v187.l0 │
00:00:19 #907 [Verbose] > │ let v190 : (string []) = v184.[int v189] │
00:00:19 #908 [Verbose] > │ let v191 : uint64 = System.Convert.ToUInt64 v190.Length │
00:00:19 #909 [Verbose] > │ let v192 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #910 [Verbose] > │ (System.Convert.ToInt32(v191)) │
00:00:19 #911 [Verbose] > │ let v193 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #912 [Verbose] > │ while method4(v191, v193) do │
00:00:19 #913 [Verbose] > │ let v195 : uint64 = v193.l0 │
00:00:19 #914 [Verbose] > │ let v196 : string = v190.[int v195] │
00:00:19 #915 [Verbose] > │ let v197 : int64 = System.Convert.ToInt64 v196.Length │
00:00:19 #916 [Verbose] > │ v192.[int v195] <- v197 │
00:00:19 #917 [Verbose] > │ let v198 : uint64 = v195 + 1UL │
00:00:19 #918 [Verbose] > │ v193.l0 <- v198 │
00:00:19 #919 [Verbose] > │ () │
00:00:19 #920 [Verbose] > │ let v199 : (int64 []) = v192 |> Array.sortDescending │
00:00:19 #921 [Verbose] > │ let v200 : int64 option = v199 |> Array.tryItem 0 │
00:00:19 #922 [Verbose] > │ let v201 : (int64 -> US1) = closure5() │
00:00:19 #923 [Verbose] > │ let v202 : US1 = US1_0 │
00:00:19 #924 [Verbose] > │ let v203 : US1 = v200 |> Option.map v201 |> Option.defaultValue v202 │
00:00:19 #925 [Verbose] > │ let v206 : int64 = │
00:00:19 #926 [Verbose] > │ match v203 with │
00:00:19 #927 [Verbose] > │ | US1_0 -> (* None *) │
00:00:19 #928 [Verbose] > │ 0L │
00:00:19 #929 [Verbose] > │ | US1_1(v204) -> (* Some *) │
00:00:19 #930 [Verbose] > │ v204 │
00:00:19 #931 [Verbose] > │ v186.[int v189] <- v206 │
00:00:19 #932 [Verbose] > │ let v207 : uint64 = v189 + 1UL │
00:00:19 #933 [Verbose] > │ v187.l0 <- v207 │
00:00:19 #934 [Verbose] > │ () │
00:00:19 #935 [Verbose] > │ let v208 : uint64 = System.Convert.ToUInt64 v186.Length │
00:00:19 #936 [Verbose] > │ let v209 : UH5 = UH5_1 │
00:00:19 #937 [Verbose] > │ let v210 : Mut3 = {l0 = 0UL; l1 = v209; l2 = 0} : Mut3 │
00:00:19 #938 [Verbose] > │ while method22(v208, v210) do │
00:00:19 #939 [Verbose] > │ let v212 : uint64 = v210.l0 │
00:00:19 #940 [Verbose] > │ let struct (v213 : UH5, v214 : int32) = v210.l1, v210.l2 │
00:00:19 #941 [Verbose] > │ let v215 : int64 = v186.[int v212] │
00:00:19 #942 [Verbose] > │ let v216 : int32 = v214 + 1 │
00:00:19 #943 [Verbose] > │ let v217 : uint64 = v212 + 1UL │
00:00:19 #944 [Verbose] > │ let v218 : UH5 = UH5_0(v214, v215, v213) │
00:00:19 #945 [Verbose] > │ v210.l0 <- v217 │
00:00:19 #946 [Verbose] > │ v210.l1 <- v218 │
00:00:19 #947 [Verbose] > │ v210.l2 <- v216 │
00:00:19 #948 [Verbose] > │ () │
00:00:19 #949 [Verbose] > │ let struct (v219 : UH5, v220 : int32) = v210.l1, v210.l2 │
00:00:19 #950 [Verbose] > │ let v221 : UH5 = UH5_1 │
00:00:19 #951 [Verbose] > │ let v222 : UH5 = method23(v219, v221) │
00:00:19 #952 [Verbose] > │ let v223 : (struct (int32 * int64) []) = method24(v222) │
00:00:19 #953 [Verbose] > │ let v224 : Map<int32, int64> = v223 |> Array.map (fun (struct (a, b)) -> │
00:00:19 #954 [Verbose] > │ a, b) |> Map.ofArray │
00:00:19 #955 [Verbose] > │ let v225 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:00:19 #956 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v175)) │
00:00:19 #957 [Verbose] > │ let v226 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #958 [Verbose] > │ while method4(v175, v226) do │
00:00:19 #959 [Verbose] > │ let v228 : uint64 = v226.l0 │
00:00:19 #960 [Verbose] > │ let struct (v229 : UH2, v230 : US0) = v162.[int v228] │
00:00:19 #961 [Verbose] > │ let v231 : UH6 = UH6_1 │
00:00:19 #962 [Verbose] > │ let v232 : int32 = 0 │
00:00:19 #963 [Verbose] > │ let struct (v233 : UH6, v234 : int32) = method27(v229, v231, v232) │
00:00:19 #964 [Verbose] > │ let v235 : UH6 = UH6_1 │
00:00:19 #965 [Verbose] > │ let v236 : UH6 = method28(v233, v235) │
00:00:19 #966 [Verbose] > │ let v237 : UH2 = UH2_1 │
00:00:19 #967 [Verbose] > │ let v238 : UH2 = method29(v224, v236, v237) │
00:00:19 #968 [Verbose] > │ let v239 : (string []) = method30(v238) │
00:00:19 #969 [Verbose] > │ v225.[int v228] <- struct (v239, v230) │
00:00:19 #970 [Verbose] > │ let v240 : uint64 = v228 + 1UL │
00:00:19 #971 [Verbose] > │ v226.l0 <- v240 │
00:00:19 #972 [Verbose] > │ () │
00:00:19 #973 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #974 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v225.Length │
00:00:19 #975 [Verbose] > │ let v242 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #976 [Verbose] > │ while method4(v241, v242) do │
00:00:19 #977 [Verbose] > │ let v244 : uint64 = v242.l0 │
00:00:19 #978 [Verbose] > │ let struct (v245 : (string []), v246 : US0) = v225.[int v244] │
00:00:19 #979 [Verbose] > │ match v246 with │
00:00:19 #980 [Verbose] > │ | US0_0 -> (* None *) │
00:00:19 #981 [Verbose] > │ let mutable result = None │
00:00:19 #982 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #983 [Verbose] > │ #if !WASM │
00:00:19 #984 [Verbose] > │ () │
00:00:19 #985 [Verbose] > │ #else │
00:00:19 #986 [Verbose] > │ () │
00:00:19 #987 [Verbose] > │ #endif │
00:00:19 #988 [Verbose] > │ #else │
00:00:19 #989 [Verbose] > │ System.Console.ResetColor () │
00:00:19 #990 [Verbose] > │ () │
00:00:19 #991 [Verbose] > │ #endif │
00:00:19 #992 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #993 [Verbose] > │ result |> Option.get │
00:00:19 #994 [Verbose] > │ () │
00:00:19 #995 [Verbose] > │ | US0_1(v247) -> (* Some *) │
00:00:19 #996 [Verbose] > │ let mutable result = None │
00:00:19 #997 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #998 [Verbose] > │ #if !WASM │
00:00:19 #999 [Verbose] > │ () │
00:00:19 #1000 [Verbose] > │ #else │
00:00:19 #1001 [Verbose] > │ () │
00:00:19 #1002 [Verbose] > │ #endif │
00:00:19 #1003 [Verbose] > │ #else │
00:00:19 #1004 [Verbose] > │ System.Console.ForegroundColor <- v247 │
00:00:19 #1005 [Verbose] > │ () │
00:00:19 #1006 [Verbose] > │ #endif │
00:00:19 #1007 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1008 [Verbose] > │ result |> Option.get │
00:00:19 #1009 [Verbose] > │ () │
00:00:19 #1010 [Verbose] > │ let v248 : string = "\t| " │
00:00:19 #1011 [Verbose] > │ let v249 : string = System.String.Join (v248, v245) │
00:00:19 #1012 [Verbose] > │ System.Console.WriteLine v249 │
00:00:19 #1013 [Verbose] > │ let mutable result = None │
00:00:19 #1014 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #1015 [Verbose] > │ #if !WASM │
00:00:19 #1016 [Verbose] > │ () │
00:00:19 #1017 [Verbose] > │ #else │
00:00:19 #1018 [Verbose] > │ () │
00:00:19 #1019 [Verbose] > │ #endif │
00:00:19 #1020 [Verbose] > │ #else │
00:00:19 #1021 [Verbose] > │ System.Console.ResetColor () │
00:00:19 #1022 [Verbose] > │ () │
00:00:19 #1023 [Verbose] > │ #endif │
00:00:19 #1024 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1025 [Verbose] > │ result |> Option.get │
00:00:19 #1026 [Verbose] > │ let v250 : uint64 = v244 + 1UL │
00:00:19 #1027 [Verbose] > │ v242.l0 <- v250 │
00:00:19 #1028 [Verbose] > │ () │
00:00:19 #1029 [Verbose] > │ let v251 : ((float []) []) = Array.zeroCreate<(float [])> │
00:00:19 #1030 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:19 #1031 [Verbose] > │ let v252 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1032 [Verbose] > │ while method4(v87, v252) do │
00:00:19 #1033 [Verbose] > │ let v254 : uint64 = v252.l0 │
00:00:19 #1034 [Verbose] > │ let struct (v255 : string, v256 : string, v257 : string, v258 : │
00:00:19 #1035 [Verbose] > │ (int64 [])) = v11.[int v254] │
00:00:19 #1036 [Verbose] > │ let v259 : (int64 -> float) = float │
00:00:19 #1037 [Verbose] > │ let v260 : uint64 = System.Convert.ToUInt64 v258.Length │
00:00:19 #1038 [Verbose] > │ let v261 : (float []) = Array.zeroCreate<float> │
00:00:19 #1039 [Verbose] > │ (System.Convert.ToInt32(v260)) │
00:00:19 #1040 [Verbose] > │ let v262 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1041 [Verbose] > │ while method4(v260, v262) do │
00:00:19 #1042 [Verbose] > │ let v264 : uint64 = v262.l0 │
00:00:19 #1043 [Verbose] > │ let v265 : int64 = v258.[int v264] │
00:00:19 #1044 [Verbose] > │ let v266 : float = v259 v265 │
00:00:19 #1045 [Verbose] > │ v261.[int v264] <- v266 │
00:00:19 #1046 [Verbose] > │ let v267 : uint64 = v264 + 1UL │
00:00:19 #1047 [Verbose] > │ v262.l0 <- v267 │
00:00:19 #1048 [Verbose] > │ () │
00:00:19 #1049 [Verbose] > │ v251.[int v254] <- v261 │
00:00:19 #1050 [Verbose] > │ let v268 : uint64 = v254 + 1UL │
00:00:19 #1051 [Verbose] > │ v252.l0 <- v268 │
00:00:19 #1052 [Verbose] > │ () │
00:00:19 #1053 [Verbose] > │ let v269 : ((float []) []) = v251 |> Array.transpose │
00:00:19 #1054 [Verbose] > │ let v270 : uint64 = System.Convert.ToUInt64 v269.Length │
00:00:19 #1055 [Verbose] > │ let v271 : (float []) = Array.zeroCreate<float> │
00:00:19 #1056 [Verbose] > │ (System.Convert.ToInt32(v270)) │
00:00:19 #1057 [Verbose] > │ let v272 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1058 [Verbose] > │ while method4(v270, v272) do │
00:00:19 #1059 [Verbose] > │ let v274 : uint64 = v272.l0 │
00:00:19 #1060 [Verbose] > │ let v275 : (float []) = v269.[int v274] │
00:00:19 #1061 [Verbose] > │ let v276 : float = v275 |> Array.average │
00:00:19 #1062 [Verbose] > │ v271.[int v274] <- v276 │
00:00:19 #1063 [Verbose] > │ let v277 : uint64 = v274 + 1UL │
00:00:19 #1064 [Verbose] > │ v272.l0 <- v277 │
00:00:19 #1065 [Verbose] > │ () │
00:00:19 #1066 [Verbose] > │ let v278 : (float -> int64) = int64 │
00:00:19 #1067 [Verbose] > │ let v279 : uint64 = System.Convert.ToUInt64 v271.Length │
00:00:19 #1068 [Verbose] > │ let v280 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #1069 [Verbose] > │ (System.Convert.ToInt32(v279)) │
00:00:19 #1070 [Verbose] > │ let v281 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1071 [Verbose] > │ while method4(v279, v281) do │
00:00:19 #1072 [Verbose] > │ let v283 : uint64 = v281.l0 │
00:00:19 #1073 [Verbose] > │ let v284 : float = v271.[int v283] │
00:00:19 #1074 [Verbose] > │ let v285 : int64 = v278 v284 │
00:00:19 #1075 [Verbose] > │ v280.[int v283] <- v285 │
00:00:19 #1076 [Verbose] > │ let v286 : uint64 = v283 + 1UL │
00:00:19 #1077 [Verbose] > │ v281.l0 <- v286 │
00:00:19 #1078 [Verbose] > │ () │
00:00:19 #1079 [Verbose] > │ let v287 : uint64 = System.Convert.ToUInt64 v280.Length │
00:00:19 #1080 [Verbose] > │ let v288 : UH5 = UH5_1 │
00:00:19 #1081 [Verbose] > │ let v289 : Mut3 = {l0 = 0UL; l1 = v288; l2 = 0} : Mut3 │
00:00:19 #1082 [Verbose] > │ while method22(v287, v289) do │
00:00:19 #1083 [Verbose] > │ let v291 : uint64 = v289.l0 │
00:00:19 #1084 [Verbose] > │ let struct (v292 : UH5, v293 : int32) = v289.l1, v289.l2 │
00:00:19 #1085 [Verbose] > │ let v294 : int64 = v280.[int v291] │
00:00:19 #1086 [Verbose] > │ let v295 : int32 = v293 + 1 │
00:00:19 #1087 [Verbose] > │ let v296 : uint64 = v291 + 1UL │
00:00:19 #1088 [Verbose] > │ let v297 : UH5 = UH5_0(v293, v294, v292) │
00:00:19 #1089 [Verbose] > │ v289.l0 <- v296 │
00:00:19 #1090 [Verbose] > │ v289.l1 <- v297 │
00:00:19 #1091 [Verbose] > │ v289.l2 <- v295 │
00:00:19 #1092 [Verbose] > │ () │
00:00:19 #1093 [Verbose] > │ let struct (v298 : UH5, v299 : int32) = v289.l1, v289.l2 │
00:00:19 #1094 [Verbose] > │ let v300 : UH5 = UH5_1 │
00:00:19 #1095 [Verbose] > │ let v301 : UH5 = method23(v298, v300) │
00:00:19 #1096 [Verbose] > │ let v302 : (struct (int32 * int64) []) = method33(v301) │
00:00:19 #1097 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1098 [Verbose] > │ let v303 : string = "Average Ranking " │
00:00:19 #1099 [Verbose] > │ System.Console.WriteLine v303 │
00:00:19 #1100 [Verbose] > │ let v304 : (struct (int32 * int64) -> int64) = closure6() │
00:00:19 #1101 [Verbose] > │ let v305 : (struct (int32 * int64) []) = v302 |> Array.sortBy v304 │
00:00:19 #1102 [Verbose] > │ let v306 : uint64 = System.Convert.ToUInt64 v305.Length │
00:00:19 #1103 [Verbose] > │ let v307 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1104 [Verbose] > │ while method4(v306, v307) do │
00:00:19 #1105 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:00:19 #1106 [Verbose] > │ let struct (v310 : int32, v311 : int64) = v305.[int v309] │
00:00:19 #1107 [Verbose] > │ let v312 : string = $"Test case %d{v310 + 1}. Average Time: %A{v311} │
00:00:19 #1108 [Verbose] > │ " │
00:00:19 #1109 [Verbose] > │ System.Console.WriteLine v312 │
00:00:19 #1110 [Verbose] > │ let v313 : uint64 = v309 + 1UL │
00:00:19 #1111 [Verbose] > │ v307.l0 <- v313 │
00:00:19 #1112 [Verbose] > │ () │
00:00:19 #1113 [Verbose] > │ () │
00:00:19 #1114 [Verbose] > │ and method0 () : unit = │
00:00:19 #1115 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:00:19 #1116 [Verbose] > │ let v1 : string = nameof v0 │
00:00:19 #1117 [Verbose] > │ let v2 : string = "" │
00:00:19 #1118 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1119 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1120 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:00:19 #1121 [Verbose] > │ System.Console.WriteLine v3 │
00:00:19 #1122 [Verbose] > │ let v4 : string = "a" │
00:00:19 #1123 [Verbose] > │ let v5 : string = "b" │
00:00:19 #1124 [Verbose] > │ let v6 : UH0 = UH0_1 │
00:00:19 #1125 [Verbose] > │ let v7 : UH0 = UH0_0(v5, v5, v5, v6) │
00:00:19 #1126 [Verbose] > │ let v8 : UH0 = UH0_0(v4, v4, v4, v7) │
00:00:19 #1127 [Verbose] > │ let v9 : (struct (string * string * string) []) = method1(v8) │
00:00:19 #1128 [Verbose] > │ let v10 : uint64 = System.Convert.ToUInt64 v9.Length │
00:00:19 #1129 [Verbose] > │ let v11 : (struct (string * string * string * (int64 [])) []) = │
00:00:19 #1130 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:00:19 #1131 [Verbose] > │ (System.Convert.ToInt32(v10)) │
00:00:19 #1132 [Verbose] > │ let v12 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1133 [Verbose] > │ while method4(v10, v12) do │
00:00:19 #1134 [Verbose] > │ let v14 : uint64 = v12.l0 │
00:00:19 #1135 [Verbose] > │ let struct (v15 : string, v16 : string, v17 : string) = v9.[int v14] │
00:00:19 #1136 [Verbose] > │ let v18 : string = $"%A{struct (v15, v16)}" │
00:00:19 #1137 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1138 [Verbose] > │ let v19 : string = $"Solution: {v18} " │
00:00:19 #1139 [Verbose] > │ System.Console.WriteLine v19 │
00:00:19 #1140 [Verbose] > │ let v20 : int32 = 0 │
00:00:19 #1141 [Verbose] > │ let v21 : string = "A" │
00:00:19 #1142 [Verbose] > │ let v22 : (struct (string * string) -> string) = closure1() │
00:00:19 #1143 [Verbose] > │ let v23 : int32 = 1 │
00:00:19 #1144 [Verbose] > │ let v24 : string = "B" │
00:00:19 #1145 [Verbose] > │ let v25 : (struct (string * string) -> string) = closure2() │
00:00:19 #1146 [Verbose] > │ let v26 : UH1 = UH1_1 │
00:00:19 #1147 [Verbose] > │ let v27 : UH1 = UH1_0(v23, v24, v25, v26) │
00:00:19 #1148 [Verbose] > │ let v28 : UH1 = UH1_0(v20, v21, v22, v27) │
00:00:19 #1149 [Verbose] > │ let v29 : (struct (int32 * string * (struct (string * string) -> │
00:00:19 #1150 [Verbose] > │ string)) []) = method5(v28) │
00:00:19 #1151 [Verbose] > │ let v30 : uint64 = System.Convert.ToUInt64 v29.Length │
00:00:19 #1152 [Verbose] > │ let v31 : (struct (string * int64) []) = Array.zeroCreate<struct │
00:00:19 #1153 [Verbose] > │ (string * int64)> (System.Convert.ToInt32(v30)) │
00:00:19 #1154 [Verbose] > │ let v32 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1155 [Verbose] > │ while method4(v30, v32) do │
00:00:19 #1156 [Verbose] > │ let v34 : uint64 = v32.l0 │
00:00:19 #1157 [Verbose] > │ let struct (v35 : int32, v36 : string, v37 : (struct (string * │
00:00:19 #1158 [Verbose] > │ string) -> string)) = v29.[int v34] │
00:00:19 #1159 [Verbose] > │ let mutable result = None │
00:00:19 #1160 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #1161 [Verbose] > │ #if !WASM │
00:00:19 #1162 [Verbose] > │ () │
00:00:19 #1163 [Verbose] > │ #else │
00:00:19 #1164 [Verbose] > │ () │
00:00:19 #1165 [Verbose] > │ #endif │
00:00:19 #1166 [Verbose] > │ #else │
00:00:19 #1167 [Verbose] > │ System.GC.Collect () │
00:00:19 #1168 [Verbose] > │ () │
00:00:19 #1169 [Verbose] > │ #endif │
00:00:19 #1170 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1171 [Verbose] > │ result |> Option.get │
00:00:19 #1172 [Verbose] > │ let v38 : (unit -> System.Diagnostics.Stopwatch) = │
00:00:19 #1173 [Verbose] > │ System.Diagnostics.Stopwatch │
00:00:19 #1174 [Verbose] > │ let v39 : System.Diagnostics.Stopwatch = v38 () │
00:00:19 #1175 [Verbose] > │ v39.Start () │
00:00:19 #1176 [Verbose] > │ let v40 : int64 = v39.ElapsedMilliseconds │
00:00:19 #1177 [Verbose] > │ let v41 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:00:19 #1178 [Verbose] > │ let v42 : Mut1 = {l0 = 0} : Mut1 │
00:00:19 #1179 [Verbose] > │ while method8(v42) do │
00:00:19 #1180 [Verbose] > │ let v44 : int32 = v42.l0 │
00:00:19 #1181 [Verbose] > │ v41.[int v44] <- v44 │
00:00:19 #1182 [Verbose] > │ let v45 : int32 = v44 + 1 │
00:00:19 #1183 [Verbose] > │ v42.l0 <- v45 │
00:00:19 #1184 [Verbose] > │ () │
00:00:19 #1185 [Verbose] > │ let v46 : (int32 -> string) = closure3(v15, v16, v37) │
00:00:19 #1186 [Verbose] > │ let v47 : (string []) = v41 |> Array.Parallel.map v46 │
00:00:19 #1187 [Verbose] > │ let v48 : int32 = v47.Length │
00:00:19 #1188 [Verbose] > │ let v49 : int32 = v48 - 1 │
00:00:19 #1189 [Verbose] > │ let v50 : string = v47.[int v49] │
00:00:19 #1190 [Verbose] > │ let v51 : int64 = v39.ElapsedMilliseconds │
00:00:19 #1191 [Verbose] > │ let v52 : int64 = v51 - v40 │
00:00:19 #1192 [Verbose] > │ let v53 : string = $"Test case {v35 + 1}. {v36}. Time: {v52} " │
00:00:19 #1193 [Verbose] > │ System.Console.WriteLine v53 │
00:00:19 #1194 [Verbose] > │ v31.[int v34] <- struct (v50, v52) │
00:00:19 #1195 [Verbose] > │ let v54 : uint64 = v34 + 1UL │
00:00:19 #1196 [Verbose] > │ v32.l0 <- v54 │
00:00:19 #1197 [Verbose] > │ () │
00:00:19 #1198 [Verbose] > │ let v55 : uint64 = System.Convert.ToUInt64 v31.Length │
00:00:19 #1199 [Verbose] > │ let v56 : (string []) = Array.zeroCreate<string> │
00:00:19 #1200 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #1201 [Verbose] > │ let v57 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1202 [Verbose] > │ while method4(v55, v57) do │
00:00:19 #1203 [Verbose] > │ let v59 : uint64 = v57.l0 │
00:00:19 #1204 [Verbose] > │ let struct (v60 : string, v61 : int64) = v31.[int v59] │
00:00:19 #1205 [Verbose] > │ v56.[int v59] <- v60 │
00:00:19 #1206 [Verbose] > │ let v62 : uint64 = v59 + 1UL │
00:00:19 #1207 [Verbose] > │ v57.l0 <- v62 │
00:00:19 #1208 [Verbose] > │ () │
00:00:19 #1209 [Verbose] > │ let v63 : uint64 = System.Convert.ToUInt64 v56.Length │
00:00:19 #1210 [Verbose] > │ let v64 : bool = v63 <= 1UL │
00:00:19 #1211 [Verbose] > │ if v64 then │
00:00:19 #1212 [Verbose] > │ () │
00:00:19 #1213 [Verbose] > │ else │
00:00:19 #1214 [Verbose] > │ let v65 : string = v56.[int 0UL] │
00:00:19 #1215 [Verbose] > │ let v66 : uint64 = 0UL │
00:00:19 #1216 [Verbose] > │ let v67 : bool = method9(v65, v56, v66) │
00:00:19 #1217 [Verbose] > │ if v67 then │
00:00:19 #1218 [Verbose] > │ () │
00:00:19 #1219 [Verbose] > │ else │
00:00:19 #1220 [Verbose] > │ let v68 : string = $"Challenge error: {v56}" │
00:00:19 #1221 [Verbose] > │ failwith<unit> v68 │
00:00:19 #1222 [Verbose] > │ let v69 : string = $"%A{v17}" │
00:00:19 #1223 [Verbose] > │ let v70 : (string []) = Array.zeroCreate<string> │
00:00:19 #1224 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #1225 [Verbose] > │ let v71 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1226 [Verbose] > │ while method4(v55, v71) do │
00:00:19 #1227 [Verbose] > │ let v73 : uint64 = v71.l0 │
00:00:19 #1228 [Verbose] > │ let struct (v74 : string, v75 : int64) = v31.[int v73] │
00:00:19 #1229 [Verbose] > │ v70.[int v73] <- v74 │
00:00:19 #1230 [Verbose] > │ let v76 : uint64 = v73 + 1UL │
00:00:19 #1231 [Verbose] > │ v71.l0 <- v76 │
00:00:19 #1232 [Verbose] > │ () │
00:00:19 #1233 [Verbose] > │ let v77 : string = v70.[int 0UL] │
00:00:19 #1234 [Verbose] > │ let v78 : string = $"%A{v77}" │
00:00:19 #1235 [Verbose] > │ let v79 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #1236 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:19 #1237 [Verbose] > │ let v80 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1238 [Verbose] > │ while method4(v55, v80) do │
00:00:19 #1239 [Verbose] > │ let v82 : uint64 = v80.l0 │
00:00:19 #1240 [Verbose] > │ let struct (v83 : string, v84 : int64) = v31.[int v82] │
00:00:19 #1241 [Verbose] > │ v79.[int v82] <- v84 │
00:00:19 #1242 [Verbose] > │ let v85 : uint64 = v82 + 1UL │
00:00:19 #1243 [Verbose] > │ v80.l0 <- v85 │
00:00:19 #1244 [Verbose] > │ () │
00:00:19 #1245 [Verbose] > │ v11.[int v14] <- struct (v69, v18, v78, v79) │
00:00:19 #1246 [Verbose] > │ let v86 : uint64 = v14 + 1UL │
00:00:19 #1247 [Verbose] > │ v12.l0 <- v86 │
00:00:19 #1248 [Verbose] > │ () │
00:00:19 #1249 [Verbose] > │ let v87 : uint64 = System.Convert.ToUInt64 v11.Length │
00:00:19 #1250 [Verbose] > │ let v88 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:19 #1251 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:19 #1252 [Verbose] > │ let v89 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1253 [Verbose] > │ while method4(v87, v89) do │
00:00:19 #1254 [Verbose] > │ let v91 : uint64 = v89.l0 │
00:00:19 #1255 [Verbose] > │ let struct (v92 : string, v93 : string, v94 : string, v95 : (int64 [ │
00:00:19 #1256 [Verbose] > │ ])) = v11.[int v91] │
00:00:19 #1257 [Verbose] > │ let v96 : uint64 = System.Convert.ToUInt64 v95.Length │
00:00:19 #1258 [Verbose] > │ let v97 : UH3 = UH3_1 │
00:00:19 #1259 [Verbose] > │ let v98 : Mut2 = {l0 = 0UL; l1 = v97; l2 = 0L} : Mut2 │
00:00:19 #1260 [Verbose] > │ while method10(v96, v98) do │
00:00:19 #1261 [Verbose] > │ let v100 : uint64 = v98.l0 │
00:00:19 #1262 [Verbose] > │ let struct (v101 : UH3, v102 : int64) = v98.l1, v98.l2 │
00:00:19 #1263 [Verbose] > │ let v103 : int64 = v95.[int v100] │
00:00:19 #1264 [Verbose] > │ let v104 : int64 = v102 + 1L │
00:00:19 #1265 [Verbose] > │ let v105 : uint64 = v100 + 1UL │
00:00:19 #1266 [Verbose] > │ let v106 : UH3 = UH3_0(v102, v103, v101) │
00:00:19 #1267 [Verbose] > │ v98.l0 <- v105 │
00:00:19 #1268 [Verbose] > │ v98.l1 <- v106 │
00:00:19 #1269 [Verbose] > │ v98.l2 <- v104 │
00:00:19 #1270 [Verbose] > │ () │
00:00:19 #1271 [Verbose] > │ let struct (v107 : UH3, v108 : int64) = v98.l1, v98.l2 │
00:00:19 #1272 [Verbose] > │ let v109 : UH3 = UH3_1 │
00:00:19 #1273 [Verbose] > │ let v110 : UH3 = method11(v107, v109) │
00:00:19 #1274 [Verbose] > │ let v111 : (struct (int64 * int64) []) = method12(v110) │
00:00:19 #1275 [Verbose] > │ let v112 : int32 = v111.Length │
00:00:19 #1276 [Verbose] > │ let v113 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:00:19 #1277 [Verbose] > │ (int64 * int64)> (v112) │
00:00:19 #1278 [Verbose] > │ let v114 : Mut1 = {l0 = 0} : Mut1 │
00:00:19 #1279 [Verbose] > │ while method15(v112, v114) do │
00:00:19 #1280 [Verbose] > │ let v116 : int32 = v114.l0 │
00:00:19 #1281 [Verbose] > │ let struct (v117 : int64, v118 : int64) = v111.[int v116] │
00:00:19 #1282 [Verbose] > │ let v119 : int64 = v117 + 1L │
00:00:19 #1283 [Verbose] > │ v113.[int v116] <- struct (v119, v118) │
00:00:19 #1284 [Verbose] > │ let v120 : int32 = v116 + 1 │
00:00:19 #1285 [Verbose] > │ v114.l0 <- v120 │
00:00:19 #1286 [Verbose] > │ () │
00:00:19 #1287 [Verbose] > │ let v121 : (struct (int64 * int64) -> int64) = closure4() │
00:00:19 #1288 [Verbose] > │ let v122 : (struct (int64 * int64) []) = v113 |> Array.sortBy v121 │
00:00:19 #1289 [Verbose] > │ let struct (v123 : int64, v124 : int64) = v122.[int 0] │
00:00:19 #1290 [Verbose] > │ let v125 : string = $"%A{struct (v123, v124)}" │
00:00:19 #1291 [Verbose] > │ let v126 : bool = v92 = v94 │
00:00:19 #1292 [Verbose] > │ let v131 : US0 = │
00:00:19 #1293 [Verbose] > │ if v126 then │
00:00:19 #1294 [Verbose] > │ let v127 : System.ConsoleColor = │
00:00:19 #1295 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:00:19 #1296 [Verbose] > │ US0_1(v127) │
00:00:19 #1297 [Verbose] > │ else │
00:00:19 #1298 [Verbose] > │ let v129 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:00:19 #1299 [Verbose] > │ US0_1(v129) │
00:00:19 #1300 [Verbose] > │ let v132 : UH2 = UH2_1 │
00:00:19 #1301 [Verbose] > │ let v133 : UH2 = UH2_0(v125, v132) │
00:00:19 #1302 [Verbose] > │ let v134 : UH2 = UH2_0(v94, v133) │
00:00:19 #1303 [Verbose] > │ let v135 : UH2 = UH2_0(v92, v134) │
00:00:19 #1304 [Verbose] > │ let v136 : UH2 = UH2_0(v93, v135) │
00:00:19 #1305 [Verbose] > │ v88.[int v91] <- struct (v136, v131) │
00:00:19 #1306 [Verbose] > │ let v137 : uint64 = v91 + 1UL │
00:00:19 #1307 [Verbose] > │ v89.l0 <- v137 │
00:00:19 #1308 [Verbose] > │ () │
00:00:19 #1309 [Verbose] > │ let v138 : string = "Input" │
00:00:19 #1310 [Verbose] > │ let v139 : string = "Expected" │
00:00:19 #1311 [Verbose] > │ let v140 : string = "Result" │
00:00:19 #1312 [Verbose] > │ let v141 : string = "Best" │
00:00:19 #1313 [Verbose] > │ let v142 : UH2 = UH2_1 │
00:00:19 #1314 [Verbose] > │ let v143 : UH2 = UH2_0(v141, v142) │
00:00:19 #1315 [Verbose] > │ let v144 : UH2 = UH2_0(v140, v143) │
00:00:19 #1316 [Verbose] > │ let v145 : UH2 = UH2_0(v139, v144) │
00:00:19 #1317 [Verbose] > │ let v146 : UH2 = UH2_0(v138, v145) │
00:00:19 #1318 [Verbose] > │ let v147 : US0 = US0_0 │
00:00:19 #1319 [Verbose] > │ let v148 : string = "---" │
00:00:19 #1320 [Verbose] > │ let v149 : UH2 = UH2_1 │
00:00:19 #1321 [Verbose] > │ let v150 : UH2 = UH2_0(v148, v149) │
00:00:19 #1322 [Verbose] > │ let v151 : UH2 = UH2_0(v148, v150) │
00:00:19 #1323 [Verbose] > │ let v152 : UH2 = UH2_0(v148, v151) │
00:00:19 #1324 [Verbose] > │ let v153 : UH2 = UH2_0(v148, v152) │
00:00:19 #1325 [Verbose] > │ let v154 : US0 = US0_0 │
00:00:19 #1326 [Verbose] > │ let v155 : UH4 = UH4_1 │
00:00:19 #1327 [Verbose] > │ let v156 : UH4 = UH4_0(v153, v154, v155) │
00:00:19 #1328 [Verbose] > │ let v157 : UH4 = UH4_0(v146, v147, v156) │
00:00:19 #1329 [Verbose] > │ let v158 : (struct (UH2 * US0) []) = method16(v157) │
00:00:19 #1330 [Verbose] > │ let v159 : uint64 = System.Convert.ToUInt64 v158.Length │
00:00:19 #1331 [Verbose] > │ let v160 : uint64 = System.Convert.ToUInt64 v88.Length │
00:00:19 #1332 [Verbose] > │ let v161 : uint64 = v159 + v160 │
00:00:19 #1333 [Verbose] > │ let v162 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:00:19 #1334 [Verbose] > │ US0)> (System.Convert.ToInt32(v161)) │
00:00:19 #1335 [Verbose] > │ let v163 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1336 [Verbose] > │ while method4(v161, v163) do │
00:00:19 #1337 [Verbose] > │ let v165 : uint64 = v163.l0 │
00:00:19 #1338 [Verbose] > │ let v166 : bool = v165 < v159 │
00:00:19 #1339 [Verbose] > │ let struct (v172 : UH2, v173 : US0) = │
00:00:19 #1340 [Verbose] > │ if v166 then │
00:00:19 #1341 [Verbose] > │ let struct (v167 : UH2, v168 : US0) = v158.[int v165] │
00:00:19 #1342 [Verbose] > │ struct (v167, v168) │
00:00:19 #1343 [Verbose] > │ else │
00:00:19 #1344 [Verbose] > │ let v169 : uint64 = v165 - v159 │
00:00:19 #1345 [Verbose] > │ let struct (v170 : UH2, v171 : US0) = v88.[int v169] │
00:00:19 #1346 [Verbose] > │ struct (v170, v171) │
00:00:19 #1347 [Verbose] > │ v162.[int v165] <- struct (v172, v173) │
00:00:19 #1348 [Verbose] > │ let v174 : uint64 = v165 + 1UL │
00:00:19 #1349 [Verbose] > │ v163.l0 <- v174 │
00:00:19 #1350 [Verbose] > │ () │
00:00:19 #1351 [Verbose] > │ let v175 : uint64 = System.Convert.ToUInt64 v162.Length │
00:00:19 #1352 [Verbose] > │ let v176 : ((string []) []) = Array.zeroCreate<(string [])> │
00:00:19 #1353 [Verbose] > │ (System.Convert.ToInt32(v175)) │
00:00:19 #1354 [Verbose] > │ let v177 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1355 [Verbose] > │ while method4(v175, v177) do │
00:00:19 #1356 [Verbose] > │ let v179 : uint64 = v177.l0 │
00:00:19 #1357 [Verbose] > │ let struct (v180 : UH2, v181 : US0) = v162.[int v179] │
00:00:19 #1358 [Verbose] > │ let v182 : (string []) = method19(v180) │
00:00:19 #1359 [Verbose] > │ v176.[int v179] <- v182 │
00:00:19 #1360 [Verbose] > │ let v183 : uint64 = v179 + 1UL │
00:00:19 #1361 [Verbose] > │ v177.l0 <- v183 │
00:00:19 #1362 [Verbose] > │ () │
00:00:19 #1363 [Verbose] > │ let v184 : ((string []) []) = v176 |> Array.transpose │
00:00:19 #1364 [Verbose] > │ let v185 : uint64 = System.Convert.ToUInt64 v184.Length │
00:00:19 #1365 [Verbose] > │ let v186 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #1366 [Verbose] > │ (System.Convert.ToInt32(v185)) │
00:00:19 #1367 [Verbose] > │ let v187 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1368 [Verbose] > │ while method4(v185, v187) do │
00:00:19 #1369 [Verbose] > │ let v189 : uint64 = v187.l0 │
00:00:19 #1370 [Verbose] > │ let v190 : (string []) = v184.[int v189] │
00:00:19 #1371 [Verbose] > │ let v191 : uint64 = System.Convert.ToUInt64 v190.Length │
00:00:19 #1372 [Verbose] > │ let v192 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #1373 [Verbose] > │ (System.Convert.ToInt32(v191)) │
00:00:19 #1374 [Verbose] > │ let v193 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1375 [Verbose] > │ while method4(v191, v193) do │
00:00:19 #1376 [Verbose] > │ let v195 : uint64 = v193.l0 │
00:00:19 #1377 [Verbose] > │ let v196 : string = v190.[int v195] │
00:00:19 #1378 [Verbose] > │ let v197 : int64 = System.Convert.ToInt64 v196.Length │
00:00:19 #1379 [Verbose] > │ v192.[int v195] <- v197 │
00:00:19 #1380 [Verbose] > │ let v198 : uint64 = v195 + 1UL │
00:00:19 #1381 [Verbose] > │ v193.l0 <- v198 │
00:00:19 #1382 [Verbose] > │ () │
00:00:19 #1383 [Verbose] > │ let v199 : (int64 []) = v192 |> Array.sortDescending │
00:00:19 #1384 [Verbose] > │ let v200 : int64 option = v199 |> Array.tryItem 0 │
00:00:19 #1385 [Verbose] > │ let v201 : (int64 -> US1) = closure5() │
00:00:19 #1386 [Verbose] > │ let v202 : US1 = US1_0 │
00:00:19 #1387 [Verbose] > │ let v203 : US1 = v200 |> Option.map v201 |> Option.defaultValue v202 │
00:00:19 #1388 [Verbose] > │ let v206 : int64 = │
00:00:19 #1389 [Verbose] > │ match v203 with │
00:00:19 #1390 [Verbose] > │ | US1_0 -> (* None *) │
00:00:19 #1391 [Verbose] > │ 0L │
00:00:19 #1392 [Verbose] > │ | US1_1(v204) -> (* Some *) │
00:00:19 #1393 [Verbose] > │ v204 │
00:00:19 #1394 [Verbose] > │ v186.[int v189] <- v206 │
00:00:19 #1395 [Verbose] > │ let v207 : uint64 = v189 + 1UL │
00:00:19 #1396 [Verbose] > │ v187.l0 <- v207 │
00:00:19 #1397 [Verbose] > │ () │
00:00:19 #1398 [Verbose] > │ let v208 : uint64 = System.Convert.ToUInt64 v186.Length │
00:00:19 #1399 [Verbose] > │ let v209 : UH5 = UH5_1 │
00:00:19 #1400 [Verbose] > │ let v210 : Mut3 = {l0 = 0UL; l1 = v209; l2 = 0} : Mut3 │
00:00:19 #1401 [Verbose] > │ while method22(v208, v210) do │
00:00:19 #1402 [Verbose] > │ let v212 : uint64 = v210.l0 │
00:00:19 #1403 [Verbose] > │ let struct (v213 : UH5, v214 : int32) = v210.l1, v210.l2 │
00:00:19 #1404 [Verbose] > │ let v215 : int64 = v186.[int v212] │
00:00:19 #1405 [Verbose] > │ let v216 : int32 = v214 + 1 │
00:00:19 #1406 [Verbose] > │ let v217 : uint64 = v212 + 1UL │
00:00:19 #1407 [Verbose] > │ let v218 : UH5 = UH5_0(v214, v215, v213) │
00:00:19 #1408 [Verbose] > │ v210.l0 <- v217 │
00:00:19 #1409 [Verbose] > │ v210.l1 <- v218 │
00:00:19 #1410 [Verbose] > │ v210.l2 <- v216 │
00:00:19 #1411 [Verbose] > │ () │
00:00:19 #1412 [Verbose] > │ let struct (v219 : UH5, v220 : int32) = v210.l1, v210.l2 │
00:00:19 #1413 [Verbose] > │ let v221 : UH5 = UH5_1 │
00:00:19 #1414 [Verbose] > │ let v222 : UH5 = method23(v219, v221) │
00:00:19 #1415 [Verbose] > │ let v223 : (struct (int32 * int64) []) = method24(v222) │
00:00:19 #1416 [Verbose] > │ let v224 : Map<int32, int64> = v223 |> Array.map (fun (struct (a, b)) -> │
00:00:19 #1417 [Verbose] > │ a, b) |> Map.ofArray │
00:00:19 #1418 [Verbose] > │ let v225 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:00:19 #1419 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v175)) │
00:00:19 #1420 [Verbose] > │ let v226 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1421 [Verbose] > │ while method4(v175, v226) do │
00:00:19 #1422 [Verbose] > │ let v228 : uint64 = v226.l0 │
00:00:19 #1423 [Verbose] > │ let struct (v229 : UH2, v230 : US0) = v162.[int v228] │
00:00:19 #1424 [Verbose] > │ let v231 : UH6 = UH6_1 │
00:00:19 #1425 [Verbose] > │ let v232 : int32 = 0 │
00:00:19 #1426 [Verbose] > │ let struct (v233 : UH6, v234 : int32) = method27(v229, v231, v232) │
00:00:19 #1427 [Verbose] > │ let v235 : UH6 = UH6_1 │
00:00:19 #1428 [Verbose] > │ let v236 : UH6 = method28(v233, v235) │
00:00:19 #1429 [Verbose] > │ let v237 : UH2 = UH2_1 │
00:00:19 #1430 [Verbose] > │ let v238 : UH2 = method29(v224, v236, v237) │
00:00:19 #1431 [Verbose] > │ let v239 : (string []) = method30(v238) │
00:00:19 #1432 [Verbose] > │ v225.[int v228] <- struct (v239, v230) │
00:00:19 #1433 [Verbose] > │ let v240 : uint64 = v228 + 1UL │
00:00:19 #1434 [Verbose] > │ v226.l0 <- v240 │
00:00:19 #1435 [Verbose] > │ () │
00:00:19 #1436 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1437 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v225.Length │
00:00:19 #1438 [Verbose] > │ let v242 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1439 [Verbose] > │ while method4(v241, v242) do │
00:00:19 #1440 [Verbose] > │ let v244 : uint64 = v242.l0 │
00:00:19 #1441 [Verbose] > │ let struct (v245 : (string []), v246 : US0) = v225.[int v244] │
00:00:19 #1442 [Verbose] > │ match v246 with │
00:00:19 #1443 [Verbose] > │ | US0_0 -> (* None *) │
00:00:19 #1444 [Verbose] > │ let mutable result = None │
00:00:19 #1445 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #1446 [Verbose] > │ #if !WASM │
00:00:19 #1447 [Verbose] > │ () │
00:00:19 #1448 [Verbose] > │ #else │
00:00:19 #1449 [Verbose] > │ () │
00:00:19 #1450 [Verbose] > │ #endif │
00:00:19 #1451 [Verbose] > │ #else │
00:00:19 #1452 [Verbose] > │ System.Console.ResetColor () │
00:00:19 #1453 [Verbose] > │ () │
00:00:19 #1454 [Verbose] > │ #endif │
00:00:19 #1455 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1456 [Verbose] > │ result |> Option.get │
00:00:19 #1457 [Verbose] > │ () │
00:00:19 #1458 [Verbose] > │ | US0_1(v247) -> (* Some *) │
00:00:19 #1459 [Verbose] > │ let mutable result = None │
00:00:19 #1460 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #1461 [Verbose] > │ #if !WASM │
00:00:19 #1462 [Verbose] > │ () │
00:00:19 #1463 [Verbose] > │ #else │
00:00:19 #1464 [Verbose] > │ () │
00:00:19 #1465 [Verbose] > │ #endif │
00:00:19 #1466 [Verbose] > │ #else │
00:00:19 #1467 [Verbose] > │ System.Console.ForegroundColor <- v247 │
00:00:19 #1468 [Verbose] > │ () │
00:00:19 #1469 [Verbose] > │ #endif │
00:00:19 #1470 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1471 [Verbose] > │ result |> Option.get │
00:00:19 #1472 [Verbose] > │ () │
00:00:19 #1473 [Verbose] > │ let v248 : string = "\t| " │
00:00:19 #1474 [Verbose] > │ let v249 : string = System.String.Join (v248, v245) │
00:00:19 #1475 [Verbose] > │ System.Console.WriteLine v249 │
00:00:19 #1476 [Verbose] > │ let mutable result = None │
00:00:19 #1477 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:19 #1478 [Verbose] > │ #if !WASM │
00:00:19 #1479 [Verbose] > │ () │
00:00:19 #1480 [Verbose] > │ #else │
00:00:19 #1481 [Verbose] > │ () │
00:00:19 #1482 [Verbose] > │ #endif │
00:00:19 #1483 [Verbose] > │ #else │
00:00:19 #1484 [Verbose] > │ System.Console.ResetColor () │
00:00:19 #1485 [Verbose] > │ () │
00:00:19 #1486 [Verbose] > │ #endif │
00:00:19 #1487 [Verbose] > │ |> fun x -> result <- Some x │
00:00:19 #1488 [Verbose] > │ result |> Option.get │
00:00:19 #1489 [Verbose] > │ let v250 : uint64 = v244 + 1UL │
00:00:19 #1490 [Verbose] > │ v242.l0 <- v250 │
00:00:19 #1491 [Verbose] > │ () │
00:00:19 #1492 [Verbose] > │ let v251 : ((float []) []) = Array.zeroCreate<(float [])> │
00:00:19 #1493 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:19 #1494 [Verbose] > │ let v252 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1495 [Verbose] > │ while method4(v87, v252) do │
00:00:19 #1496 [Verbose] > │ let v254 : uint64 = v252.l0 │
00:00:19 #1497 [Verbose] > │ let struct (v255 : string, v256 : string, v257 : string, v258 : │
00:00:19 #1498 [Verbose] > │ (int64 [])) = v11.[int v254] │
00:00:19 #1499 [Verbose] > │ let v259 : (int64 -> float) = float │
00:00:19 #1500 [Verbose] > │ let v260 : uint64 = System.Convert.ToUInt64 v258.Length │
00:00:19 #1501 [Verbose] > │ let v261 : (float []) = Array.zeroCreate<float> │
00:00:19 #1502 [Verbose] > │ (System.Convert.ToInt32(v260)) │
00:00:19 #1503 [Verbose] > │ let v262 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1504 [Verbose] > │ while method4(v260, v262) do │
00:00:19 #1505 [Verbose] > │ let v264 : uint64 = v262.l0 │
00:00:19 #1506 [Verbose] > │ let v265 : int64 = v258.[int v264] │
00:00:19 #1507 [Verbose] > │ let v266 : float = v259 v265 │
00:00:19 #1508 [Verbose] > │ v261.[int v264] <- v266 │
00:00:19 #1509 [Verbose] > │ let v267 : uint64 = v264 + 1UL │
00:00:19 #1510 [Verbose] > │ v262.l0 <- v267 │
00:00:19 #1511 [Verbose] > │ () │
00:00:19 #1512 [Verbose] > │ v251.[int v254] <- v261 │
00:00:19 #1513 [Verbose] > │ let v268 : uint64 = v254 + 1UL │
00:00:19 #1514 [Verbose] > │ v252.l0 <- v268 │
00:00:19 #1515 [Verbose] > │ () │
00:00:19 #1516 [Verbose] > │ let v269 : ((float []) []) = v251 |> Array.transpose │
00:00:19 #1517 [Verbose] > │ let v270 : uint64 = System.Convert.ToUInt64 v269.Length │
00:00:19 #1518 [Verbose] > │ let v271 : (float []) = Array.zeroCreate<float> │
00:00:19 #1519 [Verbose] > │ (System.Convert.ToInt32(v270)) │
00:00:19 #1520 [Verbose] > │ let v272 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1521 [Verbose] > │ while method4(v270, v272) do │
00:00:19 #1522 [Verbose] > │ let v274 : uint64 = v272.l0 │
00:00:19 #1523 [Verbose] > │ let v275 : (float []) = v269.[int v274] │
00:00:19 #1524 [Verbose] > │ let v276 : float = v275 |> Array.average │
00:00:19 #1525 [Verbose] > │ v271.[int v274] <- v276 │
00:00:19 #1526 [Verbose] > │ let v277 : uint64 = v274 + 1UL │
00:00:19 #1527 [Verbose] > │ v272.l0 <- v277 │
00:00:19 #1528 [Verbose] > │ () │
00:00:19 #1529 [Verbose] > │ let v278 : (float -> int64) = int64 │
00:00:19 #1530 [Verbose] > │ let v279 : uint64 = System.Convert.ToUInt64 v271.Length │
00:00:19 #1531 [Verbose] > │ let v280 : (int64 []) = Array.zeroCreate<int64> │
00:00:19 #1532 [Verbose] > │ (System.Convert.ToInt32(v279)) │
00:00:19 #1533 [Verbose] > │ let v281 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1534 [Verbose] > │ while method4(v279, v281) do │
00:00:19 #1535 [Verbose] > │ let v283 : uint64 = v281.l0 │
00:00:19 #1536 [Verbose] > │ let v284 : float = v271.[int v283] │
00:00:19 #1537 [Verbose] > │ let v285 : int64 = v278 v284 │
00:00:19 #1538 [Verbose] > │ v280.[int v283] <- v285 │
00:00:19 #1539 [Verbose] > │ let v286 : uint64 = v283 + 1UL │
00:00:19 #1540 [Verbose] > │ v281.l0 <- v286 │
00:00:19 #1541 [Verbose] > │ () │
00:00:19 #1542 [Verbose] > │ let v287 : uint64 = System.Convert.ToUInt64 v280.Length │
00:00:19 #1543 [Verbose] > │ let v288 : UH5 = UH5_1 │
00:00:19 #1544 [Verbose] > │ let v289 : Mut3 = {l0 = 0UL; l1 = v288; l2 = 0} : Mut3 │
00:00:19 #1545 [Verbose] > │ while method22(v287, v289) do │
00:00:19 #1546 [Verbose] > │ let v291 : uint64 = v289.l0 │
00:00:19 #1547 [Verbose] > │ let struct (v292 : UH5, v293 : int32) = v289.l1, v289.l2 │
00:00:19 #1548 [Verbose] > │ let v294 : int64 = v280.[int v291] │
00:00:19 #1549 [Verbose] > │ let v295 : int32 = v293 + 1 │
00:00:19 #1550 [Verbose] > │ let v296 : uint64 = v291 + 1UL │
00:00:19 #1551 [Verbose] > │ let v297 : UH5 = UH5_0(v293, v294, v292) │
00:00:19 #1552 [Verbose] > │ v289.l0 <- v296 │
00:00:19 #1553 [Verbose] > │ v289.l1 <- v297 │
00:00:19 #1554 [Verbose] > │ v289.l2 <- v295 │
00:00:19 #1555 [Verbose] > │ () │
00:00:19 #1556 [Verbose] > │ let struct (v298 : UH5, v299 : int32) = v289.l1, v289.l2 │
00:00:19 #1557 [Verbose] > │ let v300 : UH5 = UH5_1 │
00:00:19 #1558 [Verbose] > │ let v301 : UH5 = method23(v298, v300) │
00:00:19 #1559 [Verbose] > │ let v302 : (struct (int32 * int64) []) = method33(v301) │
00:00:19 #1560 [Verbose] > │ System.Console.WriteLine v2 │
00:00:19 #1561 [Verbose] > │ let v303 : string = "Average Ranking " │
00:00:19 #1562 [Verbose] > │ System.Console.WriteLine v303 │
00:00:19 #1563 [Verbose] > │ let v304 : (struct (int32 * int64) -> int64) = closure6() │
00:00:19 #1564 [Verbose] > │ let v305 : (struct (int32 * int64) []) = v302 |> Array.sortBy v304 │
00:00:19 #1565 [Verbose] > │ let v306 : uint64 = System.Convert.ToUInt64 v305.Length │
00:00:19 #1566 [Verbose] > │ let v307 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:19 #1567 [Verbose] > │ while method4(v306, v307) do │
00:00:19 #1568 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:00:19 #1569 [Verbose] > │ let struct (v310 : int32, v311 : int64) = v305.[int v309] │
00:00:19 #1570 [Verbose] > │ let v312 : string = $"Test case %d{v310 + 1}. Average Time: %A{v311} │
00:00:19 #1571 [Verbose] > │ " │
00:00:19 #1572 [Verbose] > │ System.Console.WriteLine v312 │
00:00:19 #1573 [Verbose] > │ let v313 : uint64 = v309 + 1UL │
00:00:19 #1574 [Verbose] > │ v307.l0 <- v313 │
00:00:19 #1575 [Verbose] > │ () │
00:00:19 #1576 [Verbose] > │ () │
00:00:19 #1577 [Verbose] > │ method0() │
00:00:19 #1578 [Verbose] > │ │
00:00:19 #1579 [Verbose] > │ │
00:00:19 #1580 [Verbose] > │ │
00:00:19 #1581 [Verbose] > │ Test: v0 │
00:00:19 #1582 [Verbose] > │ │
00:00:19 #1583 [Verbose] > │ Solution: struct ("a", "a") │
00:00:19 #1584 [Verbose] > │ Test case 1. A. Time: 100 │
00:00:19 #1585 [Verbose] > │ Test case 2. B. Time: 99 │
00:00:19 #1586 [Verbose] > │ │
00:00:19 #1587 [Verbose] > │ Solution: struct ("b", "b") │
00:00:19 #1588 [Verbose] > │ Test case 1. A. Time: 105 │
00:00:19 #1589 [Verbose] > │ Test case 2. B. Time: 115 │
00:00:19 #1590 [Verbose] > │ │
00:00:19 #1591 [Verbose] > │ Input | Expected | Result | Best │
00:00:19 #1592 [Verbose] > │ --- | --- | --- | --- │
00:00:19 #1593 [Verbose] > │ struct ("a", "a") | "a" | "a" | struct (2L, 99L) │
00:00:19 #1594 [Verbose] > │ struct ("b", "b") | "b" | "b" | struct (1L, 105L) │
00:00:19 #1595 [Verbose] > │ │
00:00:19 #1596 [Verbose] > │ Average Ranking │
00:00:19 #1597 [Verbose] > │ Test case 1. Average Time: 102L │
00:00:19 #1598 [Verbose] > │ Test case 2. Average Time: 107L │
00:00:19 #1599 [Verbose] > │ │
00:00:19 #1600 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1601 [Verbose] >
00:00:19 #1602 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1603 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1604 [Verbose] > │ ## emptyTests │
00:00:19 #1605 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1606 [Verbose] >
00:00:19 #1607 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1608 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1609 [Verbose] > │ Test: Empty │
00:00:19 #1610 [Verbose] > │ │
00:00:19 #1611 [Verbose] > │ Solution: 0 │
00:00:19 #1612 [Verbose] > │ Test case 1. A. Time: 61L │
00:00:19 #1613 [Verbose] > │ │
00:00:19 #1614 [Verbose] > │ Solution: 2 │
00:00:19 #1615 [Verbose] > │ Test case 1. A. Time: 62L │
00:00:19 #1616 [Verbose] > │ │
00:00:19 #1617 [Verbose] > │ Solution: 5 │
00:00:19 #1618 [Verbose] > │ Test case 1. A. Time: 70L │
00:00:19 #1619 [Verbose] > │ │
00:00:19 #1620 [Verbose] > │ Input | Expected | Result | Best │
00:00:19 #1621 [Verbose] > │ --- | --- | --- | --- │
00:00:19 #1622 [Verbose] > │ 0 | 0 | 0 | (1, 61) │
00:00:19 #1623 [Verbose] > │ 2 | 2 | 2 | (1, 62) │
00:00:19 #1624 [Verbose] > │ 5 | 5 | 5 | (1, 70) │
00:00:19 #1625 [Verbose] > │ │
00:00:19 #1626 [Verbose] > │ Averages │
00:00:19 #1627 [Verbose] > │ Test case 1. Average Time: 64L │
00:00:19 #1628 [Verbose] > │ │
00:00:19 #1629 [Verbose] > │ Ranking │
00:00:19 #1630 [Verbose] > │ Test case 1. Average Time: 64L │
00:00:19 #1631 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1632 [Verbose] >
00:00:19 #1633 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1634 [Verbose] > // // test
00:00:19 #1635 [Verbose] >
00:00:19 #1636 [Verbose] > inl get_solutions () =
00:00:19 #1637 [Verbose] > [[
00:00:19 #1638 [Verbose] > "A",
00:00:19 #1639 [Verbose] > fun n =>
00:00:19 #1640 [Verbose] > n + 1f64
00:00:19 #1641 [Verbose] > ]]
00:00:19 #1642 [Verbose] >
00:00:19 #1643 [Verbose] > inl rec empty_1_tests () =
00:00:19 #1644 [Verbose] > inl test_cases = [[
00:00:19 #1645 [Verbose] > 0, 1
00:00:19 #1646 [Verbose] > 2, 3
00:00:19 #1647 [Verbose] > 5, 6
00:00:19 #1648 [Verbose] > ]]
00:00:19 #1649 [Verbose] >
00:00:19 #1650 [Verbose] > inl solutions = get_solutions ()
00:00:19 #1651 [Verbose] >
00:00:19 #1652 [Verbose] > // inl is_fast () = true
00:00:19 #1653 [Verbose] >
00:00:19 #1654 [Verbose] > inl count =
00:00:19 #1655 [Verbose] > if is_fast ()
00:00:19 #1656 [Verbose] > then 1000i32
00:00:19 #1657 [Verbose] > else 2000000i32
00:00:19 #1658 [Verbose] >
00:00:19 #1659 [Verbose] > run_all (nameof empty_1_tests) count solutions test_cases
00:00:19 #1660 [Verbose] > |> sort_result_list
00:00:19 #1661 [Verbose] >
00:00:19 #1662 [Verbose] > empty_1_tests ()
00:00:25 #1663 [Verbose] >
00:00:25 #1664 [Verbose] > ╭─[ 5.31s - stdout ]───────────────────────────────────────────────────────────╮
00:00:25 #1665 [Verbose] > │ type UH0 = │
00:00:25 #1666 [Verbose] > │ | UH0_0 of float * float * UH0 │
00:00:25 #1667 [Verbose] > │ | UH0_1 │
00:00:25 #1668 [Verbose] > │ and Mut0 = {mutable l0 : uint64} │
00:00:25 #1669 [Verbose] > │ and UH1 = │
00:00:25 #1670 [Verbose] > │ | UH1_0 of int32 * string * (float -> float) * UH1 │
00:00:25 #1671 [Verbose] > │ | UH1_1 │
00:00:25 #1672 [Verbose] > │ and Mut1 = {mutable l0 : int32} │
00:00:25 #1673 [Verbose] > │ and UH2 = │
00:00:25 #1674 [Verbose] > │ | UH2_0 of string * UH2 │
00:00:25 #1675 [Verbose] > │ | UH2_1 │
00:00:25 #1676 [Verbose] > │ and [<Struct>] US0 = │
00:00:25 #1677 [Verbose] > │ | US0_0 │
00:00:25 #1678 [Verbose] > │ | US0_1 of f1_0 : System.ConsoleColor │
00:00:25 #1679 [Verbose] > │ and UH3 = │
00:00:25 #1680 [Verbose] > │ | UH3_0 of int64 * int64 * UH3 │
00:00:25 #1681 [Verbose] > │ | UH3_1 │
00:00:25 #1682 [Verbose] > │ and Mut2 = {mutable l0 : uint64; mutable l1 : UH3; mutable l2 : int64} │
00:00:25 #1683 [Verbose] > │ and UH4 = │
00:00:25 #1684 [Verbose] > │ | UH4_0 of UH2 * US0 * UH4 │
00:00:25 #1685 [Verbose] > │ | UH4_1 │
00:00:25 #1686 [Verbose] > │ and [<Struct>] US1 = │
00:00:25 #1687 [Verbose] > │ | US1_0 │
00:00:25 #1688 [Verbose] > │ | US1_1 of f1_0 : int64 │
00:00:25 #1689 [Verbose] > │ and UH5 = │
00:00:25 #1690 [Verbose] > │ | UH5_0 of int32 * int64 * UH5 │
00:00:25 #1691 [Verbose] > │ | UH5_1 │
00:00:25 #1692 [Verbose] > │ and Mut3 = {mutable l0 : uint64; mutable l1 : UH5; mutable l2 : int32} │
00:00:25 #1693 [Verbose] > │ and UH6 = │
00:00:25 #1694 [Verbose] > │ | UH6_0 of int32 * string * UH6 │
00:00:25 #1695 [Verbose] > │ | UH6_1 │
00:00:25 #1696 [Verbose] > │ let rec method2 (v0 : UH0, v1 : uint64) : uint64 = │
00:00:25 #1697 [Verbose] > │ match v0 with │
00:00:25 #1698 [Verbose] > │ | UH0_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1699 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:00:25 #1700 [Verbose] > │ method2(v4, v5) │
00:00:25 #1701 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:25 #1702 [Verbose] > │ v1 │
00:00:25 #1703 [Verbose] > │ and method3 (v0 : (struct (float * float) []), v1 : UH0, v2 : uint64) : │
00:00:25 #1704 [Verbose] > │ uint64 = │
00:00:25 #1705 [Verbose] > │ match v1 with │
00:00:25 #1706 [Verbose] > │ | UH0_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1707 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:25 #1708 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:00:25 #1709 [Verbose] > │ method3(v0, v5, v6) │
00:00:25 #1710 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:25 #1711 [Verbose] > │ v2 │
00:00:25 #1712 [Verbose] > │ and method1 (v0 : UH0) : (struct (float * float) []) = │
00:00:25 #1713 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:25 #1714 [Verbose] > │ let v2 : uint64 = method2(v0, v1) │
00:00:25 #1715 [Verbose] > │ let v3 : (struct (float * float) []) = Array.zeroCreate<struct (float * │
00:00:25 #1716 [Verbose] > │ float)> (System.Convert.ToInt32(v2)) │
00:00:25 #1717 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:25 #1718 [Verbose] > │ let v5 : uint64 = method3(v3, v0, v4) │
00:00:25 #1719 [Verbose] > │ v3 │
00:00:25 #1720 [Verbose] > │ and method4 (v0 : uint64, v1 : Mut0) : bool = │
00:00:25 #1721 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:25 #1722 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:25 #1723 [Verbose] > │ v3 │
00:00:25 #1724 [Verbose] > │ and closure1 () (v0 : float) : float = │
00:00:25 #1725 [Verbose] > │ let v1 : float = v0 + 1.0 │
00:00:25 #1726 [Verbose] > │ v1 │
00:00:25 #1727 [Verbose] > │ and method6 (v0 : UH1, v1 : uint64) : uint64 = │
00:00:25 #1728 [Verbose] > │ match v0 with │
00:00:25 #1729 [Verbose] > │ | UH1_0(v2, v3, v4, v5) -> (* Cons *) │
00:00:25 #1730 [Verbose] > │ let v6 : uint64 = v1 + 1UL │
00:00:25 #1731 [Verbose] > │ method6(v5, v6) │
00:00:25 #1732 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:25 #1733 [Verbose] > │ v1 │
00:00:25 #1734 [Verbose] > │ and method7 (v0 : (struct (int32 * string * (float -> float)) []), v1 : UH1, │
00:00:25 #1735 [Verbose] > │ v2 : uint64) : uint64 = │
00:00:25 #1736 [Verbose] > │ match v1 with │
00:00:25 #1737 [Verbose] > │ | UH1_0(v3, v4, v5, v6) -> (* Cons *) │
00:00:25 #1738 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5) │
00:00:25 #1739 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:00:25 #1740 [Verbose] > │ method7(v0, v6, v7) │
00:00:25 #1741 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:25 #1742 [Verbose] > │ v2 │
00:00:25 #1743 [Verbose] > │ and method5 (v0 : UH1) : (struct (int32 * string * (float -> float)) []) = │
00:00:25 #1744 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:25 #1745 [Verbose] > │ let v2 : uint64 = method6(v0, v1) │
00:00:25 #1746 [Verbose] > │ let v3 : (struct (int32 * string * (float -> float)) []) = │
00:00:25 #1747 [Verbose] > │ Array.zeroCreate<struct (int32 * string * (float -> float))> │
00:00:25 #1748 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:25 #1749 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:25 #1750 [Verbose] > │ let v5 : uint64 = method7(v3, v0, v4) │
00:00:25 #1751 [Verbose] > │ v3 │
00:00:25 #1752 [Verbose] > │ and method8 (v0 : Mut1) : bool = │
00:00:25 #1753 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:25 #1754 [Verbose] > │ let v2 : bool = v1 < 2000001 │
00:00:25 #1755 [Verbose] > │ v2 │
00:00:25 #1756 [Verbose] > │ and closure2 (v0 : float, v1 : (float -> float)) (v2 : int32) : float = │
00:00:25 #1757 [Verbose] > │ v1 v0 │
00:00:25 #1758 [Verbose] > │ and method9 (v0 : float, v1 : (float []), v2 : uint64) : bool = │
00:00:25 #1759 [Verbose] > │ let v3 : uint64 = System.Convert.ToUInt64 v1.Length │
00:00:25 #1760 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:25 #1761 [Verbose] > │ if v4 then │
00:00:25 #1762 [Verbose] > │ let v5 : float = v1.[int v2] │
00:00:25 #1763 [Verbose] > │ let v6 : bool = v0 = v5 │
00:00:25 #1764 [Verbose] > │ if v6 then │
00:00:25 #1765 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:00:25 #1766 [Verbose] > │ method9(v0, v1, v7) │
00:00:25 #1767 [Verbose] > │ else │
00:00:25 #1768 [Verbose] > │ false │
00:00:25 #1769 [Verbose] > │ else │
00:00:25 #1770 [Verbose] > │ true │
00:00:25 #1771 [Verbose] > │ and method10 (v0 : uint64, v1 : Mut2) : bool = │
00:00:25 #1772 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:25 #1773 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:25 #1774 [Verbose] > │ v3 │
00:00:25 #1775 [Verbose] > │ and method11 (v0 : UH3, v1 : UH3) : UH3 = │
00:00:25 #1776 [Verbose] > │ match v0 with │
00:00:25 #1777 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1778 [Verbose] > │ let v5 : UH3 = UH3_0(v2, v3, v1) │
00:00:25 #1779 [Verbose] > │ method11(v4, v5) │
00:00:25 #1780 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:25 #1781 [Verbose] > │ v1 │
00:00:25 #1782 [Verbose] > │ and method13 (v0 : UH3, v1 : int32) : int32 = │
00:00:25 #1783 [Verbose] > │ match v0 with │
00:00:25 #1784 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1785 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:25 #1786 [Verbose] > │ method13(v4, v5) │
00:00:25 #1787 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:25 #1788 [Verbose] > │ v1 │
00:00:25 #1789 [Verbose] > │ and method14 (v0 : (struct (int64 * int64) []), v1 : UH3, v2 : int32) : │
00:00:25 #1790 [Verbose] > │ int32 = │
00:00:25 #1791 [Verbose] > │ match v1 with │
00:00:25 #1792 [Verbose] > │ | UH3_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1793 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:25 #1794 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:25 #1795 [Verbose] > │ method14(v0, v5, v6) │
00:00:25 #1796 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:25 #1797 [Verbose] > │ v2 │
00:00:25 #1798 [Verbose] > │ and method12 (v0 : UH3) : (struct (int64 * int64) []) = │
00:00:25 #1799 [Verbose] > │ let v1 : int32 = 0 │
00:00:25 #1800 [Verbose] > │ let v2 : int32 = method13(v0, v1) │
00:00:25 #1801 [Verbose] > │ let v3 : (struct (int64 * int64) []) = Array.zeroCreate<struct (int64 * │
00:00:25 #1802 [Verbose] > │ int64)> (v2) │
00:00:25 #1803 [Verbose] > │ let v4 : int32 = 0 │
00:00:25 #1804 [Verbose] > │ let v5 : int32 = method14(v3, v0, v4) │
00:00:25 #1805 [Verbose] > │ v3 │
00:00:25 #1806 [Verbose] > │ and method15 (v0 : int32, v1 : Mut1) : bool = │
00:00:25 #1807 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:25 #1808 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:25 #1809 [Verbose] > │ v3 │
00:00:25 #1810 [Verbose] > │ and closure3 () struct (v0 : int64, v1 : int64) : int64 = │
00:00:25 #1811 [Verbose] > │ v1 │
00:00:25 #1812 [Verbose] > │ and method17 (v0 : UH4, v1 : uint64) : uint64 = │
00:00:25 #1813 [Verbose] > │ match v0 with │
00:00:25 #1814 [Verbose] > │ | UH4_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1815 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:00:25 #1816 [Verbose] > │ method17(v4, v5) │
00:00:25 #1817 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:25 #1818 [Verbose] > │ v1 │
00:00:25 #1819 [Verbose] > │ and method18 (v0 : (struct (UH2 * US0) []), v1 : UH4, v2 : uint64) : uint64 │
00:00:25 #1820 [Verbose] > │ = │
00:00:25 #1821 [Verbose] > │ match v1 with │
00:00:25 #1822 [Verbose] > │ | UH4_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1823 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:25 #1824 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:00:25 #1825 [Verbose] > │ method18(v0, v5, v6) │
00:00:25 #1826 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:25 #1827 [Verbose] > │ v2 │
00:00:25 #1828 [Verbose] > │ and method16 (v0 : UH4) : (struct (UH2 * US0) []) = │
00:00:25 #1829 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:25 #1830 [Verbose] > │ let v2 : uint64 = method17(v0, v1) │
00:00:25 #1831 [Verbose] > │ let v3 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:25 #1832 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:25 #1833 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:25 #1834 [Verbose] > │ let v5 : uint64 = method18(v3, v0, v4) │
00:00:25 #1835 [Verbose] > │ v3 │
00:00:25 #1836 [Verbose] > │ and method20 (v0 : UH2, v1 : uint64) : uint64 = │
00:00:25 #1837 [Verbose] > │ match v0 with │
00:00:25 #1838 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:25 #1839 [Verbose] > │ let v4 : uint64 = v1 + 1UL │
00:00:25 #1840 [Verbose] > │ method20(v3, v4) │
00:00:25 #1841 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:25 #1842 [Verbose] > │ v1 │
00:00:25 #1843 [Verbose] > │ and method21 (v0 : (string []), v1 : UH2, v2 : uint64) : uint64 = │
00:00:25 #1844 [Verbose] > │ match v1 with │
00:00:25 #1845 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:25 #1846 [Verbose] > │ v0.[int v2] <- v3 │
00:00:25 #1847 [Verbose] > │ let v5 : uint64 = v2 + 1UL │
00:00:25 #1848 [Verbose] > │ method21(v0, v4, v5) │
00:00:25 #1849 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:25 #1850 [Verbose] > │ v2 │
00:00:25 #1851 [Verbose] > │ and method19 (v0 : UH2) : (string []) = │
00:00:25 #1852 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:25 #1853 [Verbose] > │ let v2 : uint64 = method20(v0, v1) │
00:00:25 #1854 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> │
00:00:25 #1855 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:00:25 #1856 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:25 #1857 [Verbose] > │ let v5 : uint64 = method21(v3, v0, v4) │
00:00:25 #1858 [Verbose] > │ v3 │
00:00:25 #1859 [Verbose] > │ and closure4 () (v0 : int64) : US1 = │
00:00:25 #1860 [Verbose] > │ US1_1(v0) │
00:00:25 #1861 [Verbose] > │ and method22 (v0 : uint64, v1 : Mut3) : bool = │
00:00:25 #1862 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:00:25 #1863 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:25 #1864 [Verbose] > │ v3 │
00:00:25 #1865 [Verbose] > │ and method23 (v0 : UH5, v1 : UH5) : UH5 = │
00:00:25 #1866 [Verbose] > │ match v0 with │
00:00:25 #1867 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1868 [Verbose] > │ let v5 : UH5 = UH5_0(v2, v3, v1) │
00:00:25 #1869 [Verbose] > │ method23(v4, v5) │
00:00:25 #1870 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:25 #1871 [Verbose] > │ v1 │
00:00:25 #1872 [Verbose] > │ and method25 (v0 : UH5, v1 : int32) : int32 = │
00:00:25 #1873 [Verbose] > │ match v0 with │
00:00:25 #1874 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1875 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:25 #1876 [Verbose] > │ method25(v4, v5) │
00:00:25 #1877 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:25 #1878 [Verbose] > │ v1 │
00:00:25 #1879 [Verbose] > │ and method26 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : int32) : │
00:00:25 #1880 [Verbose] > │ int32 = │
00:00:25 #1881 [Verbose] > │ match v1 with │
00:00:25 #1882 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1883 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:25 #1884 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:25 #1885 [Verbose] > │ method26(v0, v5, v6) │
00:00:25 #1886 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:25 #1887 [Verbose] > │ v2 │
00:00:25 #1888 [Verbose] > │ and method24 (v0 : UH5) : (struct (int32 * int64) []) = │
00:00:25 #1889 [Verbose] > │ let v1 : int32 = 0 │
00:00:25 #1890 [Verbose] > │ let v2 : int32 = method25(v0, v1) │
00:00:25 #1891 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:00:25 #1892 [Verbose] > │ int64)> (v2) │
00:00:25 #1893 [Verbose] > │ let v4 : int32 = 0 │
00:00:25 #1894 [Verbose] > │ let v5 : int32 = method26(v3, v0, v4) │
00:00:25 #1895 [Verbose] > │ v3 │
00:00:25 #1896 [Verbose] > │ and method27 (v0 : UH2, v1 : UH6, v2 : int32) : struct (UH6 * int32) = │
00:00:25 #1897 [Verbose] > │ match v0 with │
00:00:25 #1898 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:25 #1899 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:25 #1900 [Verbose] > │ let v6 : UH6 = UH6_0(v2, v3, v1) │
00:00:25 #1901 [Verbose] > │ method27(v4, v6, v5) │
00:00:25 #1902 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:25 #1903 [Verbose] > │ struct (v1, v2) │
00:00:25 #1904 [Verbose] > │ and method28 (v0 : UH6, v1 : UH6) : UH6 = │
00:00:25 #1905 [Verbose] > │ match v0 with │
00:00:25 #1906 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1907 [Verbose] > │ let v5 : UH6 = UH6_0(v2, v3, v1) │
00:00:25 #1908 [Verbose] > │ method28(v4, v5) │
00:00:25 #1909 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:25 #1910 [Verbose] > │ v1 │
00:00:25 #1911 [Verbose] > │ and method29 (v0 : Map<int32, int64>, v1 : UH6, v2 : UH2) : UH2 = │
00:00:25 #1912 [Verbose] > │ match v1 with │
00:00:25 #1913 [Verbose] > │ | UH6_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1914 [Verbose] > │ let v6 : UH2 = method29(v0, v5, v2) │
00:00:25 #1915 [Verbose] > │ let v7 : int64 = v0.[v3] │
00:00:25 #1916 [Verbose] > │ let v8 : int32 = int32 v7 │
00:00:25 #1917 [Verbose] > │ let v9 : string = v4.PadRight v8 │
00:00:25 #1918 [Verbose] > │ UH2_0(v9, v6) │
00:00:25 #1919 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:25 #1920 [Verbose] > │ v2 │
00:00:25 #1921 [Verbose] > │ and method31 (v0 : UH2, v1 : int32) : int32 = │
00:00:25 #1922 [Verbose] > │ match v0 with │
00:00:25 #1923 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:25 #1924 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:25 #1925 [Verbose] > │ method31(v3, v4) │
00:00:25 #1926 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:25 #1927 [Verbose] > │ v1 │
00:00:25 #1928 [Verbose] > │ and method32 (v0 : (string []), v1 : UH2, v2 : int32) : int32 = │
00:00:25 #1929 [Verbose] > │ match v1 with │
00:00:25 #1930 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:25 #1931 [Verbose] > │ v0.[int v2] <- v3 │
00:00:25 #1932 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:25 #1933 [Verbose] > │ method32(v0, v4, v5) │
00:00:25 #1934 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:25 #1935 [Verbose] > │ v2 │
00:00:25 #1936 [Verbose] > │ and method30 (v0 : UH2) : (string []) = │
00:00:25 #1937 [Verbose] > │ let v1 : int32 = 0 │
00:00:25 #1938 [Verbose] > │ let v2 : int32 = method31(v0, v1) │
00:00:25 #1939 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> (v2) │
00:00:25 #1940 [Verbose] > │ let v4 : int32 = 0 │
00:00:25 #1941 [Verbose] > │ let v5 : int32 = method32(v3, v0, v4) │
00:00:25 #1942 [Verbose] > │ v3 │
00:00:25 #1943 [Verbose] > │ and method34 (v0 : UH5, v1 : uint64) : uint64 = │
00:00:25 #1944 [Verbose] > │ match v0 with │
00:00:25 #1945 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:00:25 #1946 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:00:25 #1947 [Verbose] > │ method34(v4, v5) │
00:00:25 #1948 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:25 #1949 [Verbose] > │ v1 │
00:00:25 #1950 [Verbose] > │ and method35 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : uint64) : │
00:00:25 #1951 [Verbose] > │ uint64 = │
00:00:25 #1952 [Verbose] > │ match v1 with │
00:00:25 #1953 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:00:25 #1954 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:25 #1955 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:00:25 #1956 [Verbose] > │ method35(v0, v5, v6) │
00:00:25 #1957 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:25 #1958 [Verbose] > │ v2 │
00:00:25 #1959 [Verbose] > │ and method33 (v0 : UH5) : (struct (int32 * int64) []) = │
00:00:25 #1960 [Verbose] > │ let v1 : uint64 = 0UL │
00:00:25 #1961 [Verbose] > │ let v2 : uint64 = method34(v0, v1) │
00:00:25 #1962 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:00:25 #1963 [Verbose] > │ int64)> (System.Convert.ToInt32(v2)) │
00:00:25 #1964 [Verbose] > │ let v4 : uint64 = 0UL │
00:00:25 #1965 [Verbose] > │ let v5 : uint64 = method35(v3, v0, v4) │
00:00:25 #1966 [Verbose] > │ v3 │
00:00:25 #1967 [Verbose] > │ and closure5 () struct (v0 : int32, v1 : int64) : int64 = │
00:00:25 #1968 [Verbose] > │ v1 │
00:00:25 #1969 [Verbose] > │ and closure0 () () : unit = │
00:00:25 #1970 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:00:25 #1971 [Verbose] > │ let v1 : string = nameof v0 │
00:00:25 #1972 [Verbose] > │ let v2 : string = "" │
00:00:25 #1973 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #1974 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #1975 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:00:25 #1976 [Verbose] > │ System.Console.WriteLine v3 │
00:00:25 #1977 [Verbose] > │ let v4 : float = 0.0 │
00:00:25 #1978 [Verbose] > │ let v5 : float = 1.0 │
00:00:25 #1979 [Verbose] > │ let v6 : float = 2.0 │
00:00:25 #1980 [Verbose] > │ let v7 : float = 3.0 │
00:00:25 #1981 [Verbose] > │ let v8 : float = 5.0 │
00:00:25 #1982 [Verbose] > │ let v9 : float = 6.0 │
00:00:25 #1983 [Verbose] > │ let v10 : UH0 = UH0_1 │
00:00:25 #1984 [Verbose] > │ let v11 : UH0 = UH0_0(v8, v9, v10) │
00:00:25 #1985 [Verbose] > │ let v12 : UH0 = UH0_0(v6, v7, v11) │
00:00:25 #1986 [Verbose] > │ let v13 : UH0 = UH0_0(v4, v5, v12) │
00:00:25 #1987 [Verbose] > │ let v14 : (struct (float * float) []) = method1(v13) │
00:00:25 #1988 [Verbose] > │ let v15 : uint64 = System.Convert.ToUInt64 v14.Length │
00:00:25 #1989 [Verbose] > │ let v16 : (struct (string * string * string * (int64 [])) []) = │
00:00:25 #1990 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:00:25 #1991 [Verbose] > │ (System.Convert.ToInt32(v15)) │
00:00:25 #1992 [Verbose] > │ let v17 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #1993 [Verbose] > │ while method4(v15, v17) do │
00:00:25 #1994 [Verbose] > │ let v19 : uint64 = v17.l0 │
00:00:25 #1995 [Verbose] > │ let struct (v20 : float, v21 : float) = v14.[int v19] │
00:00:25 #1996 [Verbose] > │ let v22 : string = $"%A{v20}" │
00:00:25 #1997 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #1998 [Verbose] > │ let v23 : string = $"Solution: {v22} " │
00:00:25 #1999 [Verbose] > │ System.Console.WriteLine v23 │
00:00:25 #2000 [Verbose] > │ let v24 : int32 = 0 │
00:00:25 #2001 [Verbose] > │ let v25 : string = "A" │
00:00:25 #2002 [Verbose] > │ let v26 : (float -> float) = closure1() │
00:00:25 #2003 [Verbose] > │ let v27 : UH1 = UH1_1 │
00:00:25 #2004 [Verbose] > │ let v28 : UH1 = UH1_0(v24, v25, v26, v27) │
00:00:25 #2005 [Verbose] > │ let v29 : (struct (int32 * string * (float -> float)) []) = │
00:00:25 #2006 [Verbose] > │ method5(v28) │
00:00:25 #2007 [Verbose] > │ let v30 : uint64 = System.Convert.ToUInt64 v29.Length │
00:00:25 #2008 [Verbose] > │ let v31 : (struct (float * int64) []) = Array.zeroCreate<struct │
00:00:25 #2009 [Verbose] > │ (float * int64)> (System.Convert.ToInt32(v30)) │
00:00:25 #2010 [Verbose] > │ let v32 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2011 [Verbose] > │ while method4(v30, v32) do │
00:00:25 #2012 [Verbose] > │ let v34 : uint64 = v32.l0 │
00:00:25 #2013 [Verbose] > │ let struct (v35 : int32, v36 : string, v37 : (float -> float)) = │
00:00:25 #2014 [Verbose] > │ v29.[int v34] │
00:00:25 #2015 [Verbose] > │ let mutable result = None │
00:00:25 #2016 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2017 [Verbose] > │ #if !WASM │
00:00:25 #2018 [Verbose] > │ () │
00:00:25 #2019 [Verbose] > │ #else │
00:00:25 #2020 [Verbose] > │ () │
00:00:25 #2021 [Verbose] > │ #endif │
00:00:25 #2022 [Verbose] > │ #else │
00:00:25 #2023 [Verbose] > │ System.GC.Collect () │
00:00:25 #2024 [Verbose] > │ () │
00:00:25 #2025 [Verbose] > │ #endif │
00:00:25 #2026 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2027 [Verbose] > │ result |> Option.get │
00:00:25 #2028 [Verbose] > │ let v38 : (unit -> System.Diagnostics.Stopwatch) = │
00:00:25 #2029 [Verbose] > │ System.Diagnostics.Stopwatch │
00:00:25 #2030 [Verbose] > │ let v39 : System.Diagnostics.Stopwatch = v38 () │
00:00:25 #2031 [Verbose] > │ v39.Start () │
00:00:25 #2032 [Verbose] > │ let v40 : int64 = v39.ElapsedMilliseconds │
00:00:25 #2033 [Verbose] > │ let v41 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:00:25 #2034 [Verbose] > │ let v42 : Mut1 = {l0 = 0} : Mut1 │
00:00:25 #2035 [Verbose] > │ while method8(v42) do │
00:00:25 #2036 [Verbose] > │ let v44 : int32 = v42.l0 │
00:00:25 #2037 [Verbose] > │ v41.[int v44] <- v44 │
00:00:25 #2038 [Verbose] > │ let v45 : int32 = v44 + 1 │
00:00:25 #2039 [Verbose] > │ v42.l0 <- v45 │
00:00:25 #2040 [Verbose] > │ () │
00:00:25 #2041 [Verbose] > │ let v46 : (int32 -> float) = closure2(v20, v37) │
00:00:25 #2042 [Verbose] > │ let v47 : (float []) = v41 |> Array.Parallel.map v46 │
00:00:25 #2043 [Verbose] > │ let v48 : int32 = v47.Length │
00:00:25 #2044 [Verbose] > │ let v49 : int32 = v48 - 1 │
00:00:25 #2045 [Verbose] > │ let v50 : float = v47.[int v49] │
00:00:25 #2046 [Verbose] > │ let v51 : int64 = v39.ElapsedMilliseconds │
00:00:25 #2047 [Verbose] > │ let v52 : int64 = v51 - v40 │
00:00:25 #2048 [Verbose] > │ let v53 : string = $"Test case {v35 + 1}. {v36}. Time: {v52} " │
00:00:25 #2049 [Verbose] > │ System.Console.WriteLine v53 │
00:00:25 #2050 [Verbose] > │ v31.[int v34] <- struct (v50, v52) │
00:00:25 #2051 [Verbose] > │ let v54 : uint64 = v34 + 1UL │
00:00:25 #2052 [Verbose] > │ v32.l0 <- v54 │
00:00:25 #2053 [Verbose] > │ () │
00:00:25 #2054 [Verbose] > │ let v55 : uint64 = System.Convert.ToUInt64 v31.Length │
00:00:25 #2055 [Verbose] > │ let v56 : (float []) = Array.zeroCreate<float> │
00:00:25 #2056 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2057 [Verbose] > │ let v57 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2058 [Verbose] > │ while method4(v55, v57) do │
00:00:25 #2059 [Verbose] > │ let v59 : uint64 = v57.l0 │
00:00:25 #2060 [Verbose] > │ let struct (v60 : float, v61 : int64) = v31.[int v59] │
00:00:25 #2061 [Verbose] > │ v56.[int v59] <- v60 │
00:00:25 #2062 [Verbose] > │ let v62 : uint64 = v59 + 1UL │
00:00:25 #2063 [Verbose] > │ v57.l0 <- v62 │
00:00:25 #2064 [Verbose] > │ () │
00:00:25 #2065 [Verbose] > │ let v63 : uint64 = System.Convert.ToUInt64 v56.Length │
00:00:25 #2066 [Verbose] > │ let v64 : bool = v63 <= 1UL │
00:00:25 #2067 [Verbose] > │ if v64 then │
00:00:25 #2068 [Verbose] > │ () │
00:00:25 #2069 [Verbose] > │ else │
00:00:25 #2070 [Verbose] > │ let v65 : float = v56.[int 0UL] │
00:00:25 #2071 [Verbose] > │ let v66 : uint64 = 0UL │
00:00:25 #2072 [Verbose] > │ let v67 : bool = method9(v65, v56, v66) │
00:00:25 #2073 [Verbose] > │ if v67 then │
00:00:25 #2074 [Verbose] > │ () │
00:00:25 #2075 [Verbose] > │ else │
00:00:25 #2076 [Verbose] > │ let v68 : string = $"Challenge error: {v56}" │
00:00:25 #2077 [Verbose] > │ failwith<unit> v68 │
00:00:25 #2078 [Verbose] > │ let v69 : string = $"%A{v21}" │
00:00:25 #2079 [Verbose] > │ let v70 : (float []) = Array.zeroCreate<float> │
00:00:25 #2080 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2081 [Verbose] > │ let v71 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2082 [Verbose] > │ while method4(v55, v71) do │
00:00:25 #2083 [Verbose] > │ let v73 : uint64 = v71.l0 │
00:00:25 #2084 [Verbose] > │ let struct (v74 : float, v75 : int64) = v31.[int v73] │
00:00:25 #2085 [Verbose] > │ v70.[int v73] <- v74 │
00:00:25 #2086 [Verbose] > │ let v76 : uint64 = v73 + 1UL │
00:00:25 #2087 [Verbose] > │ v71.l0 <- v76 │
00:00:25 #2088 [Verbose] > │ () │
00:00:25 #2089 [Verbose] > │ let v77 : float = v70.[int 0UL] │
00:00:25 #2090 [Verbose] > │ let v78 : string = $"%A{v77}" │
00:00:25 #2091 [Verbose] > │ let v79 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2092 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2093 [Verbose] > │ let v80 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2094 [Verbose] > │ while method4(v55, v80) do │
00:00:25 #2095 [Verbose] > │ let v82 : uint64 = v80.l0 │
00:00:25 #2096 [Verbose] > │ let struct (v83 : float, v84 : int64) = v31.[int v82] │
00:00:25 #2097 [Verbose] > │ v79.[int v82] <- v84 │
00:00:25 #2098 [Verbose] > │ let v85 : uint64 = v82 + 1UL │
00:00:25 #2099 [Verbose] > │ v80.l0 <- v85 │
00:00:25 #2100 [Verbose] > │ () │
00:00:25 #2101 [Verbose] > │ v16.[int v19] <- struct (v69, v22, v78, v79) │
00:00:25 #2102 [Verbose] > │ let v86 : uint64 = v19 + 1UL │
00:00:25 #2103 [Verbose] > │ v17.l0 <- v86 │
00:00:25 #2104 [Verbose] > │ () │
00:00:25 #2105 [Verbose] > │ let v87 : uint64 = System.Convert.ToUInt64 v16.Length │
00:00:25 #2106 [Verbose] > │ let v88 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:25 #2107 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:25 #2108 [Verbose] > │ let v89 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2109 [Verbose] > │ while method4(v87, v89) do │
00:00:25 #2110 [Verbose] > │ let v91 : uint64 = v89.l0 │
00:00:25 #2111 [Verbose] > │ let struct (v92 : string, v93 : string, v94 : string, v95 : (int64 [ │
00:00:25 #2112 [Verbose] > │ ])) = v16.[int v91] │
00:00:25 #2113 [Verbose] > │ let v96 : uint64 = System.Convert.ToUInt64 v95.Length │
00:00:25 #2114 [Verbose] > │ let v97 : UH3 = UH3_1 │
00:00:25 #2115 [Verbose] > │ let v98 : Mut2 = {l0 = 0UL; l1 = v97; l2 = 0L} : Mut2 │
00:00:25 #2116 [Verbose] > │ while method10(v96, v98) do │
00:00:25 #2117 [Verbose] > │ let v100 : uint64 = v98.l0 │
00:00:25 #2118 [Verbose] > │ let struct (v101 : UH3, v102 : int64) = v98.l1, v98.l2 │
00:00:25 #2119 [Verbose] > │ let v103 : int64 = v95.[int v100] │
00:00:25 #2120 [Verbose] > │ let v104 : int64 = v102 + 1L │
00:00:25 #2121 [Verbose] > │ let v105 : uint64 = v100 + 1UL │
00:00:25 #2122 [Verbose] > │ let v106 : UH3 = UH3_0(v102, v103, v101) │
00:00:25 #2123 [Verbose] > │ v98.l0 <- v105 │
00:00:25 #2124 [Verbose] > │ v98.l1 <- v106 │
00:00:25 #2125 [Verbose] > │ v98.l2 <- v104 │
00:00:25 #2126 [Verbose] > │ () │
00:00:25 #2127 [Verbose] > │ let struct (v107 : UH3, v108 : int64) = v98.l1, v98.l2 │
00:00:25 #2128 [Verbose] > │ let v109 : UH3 = UH3_1 │
00:00:25 #2129 [Verbose] > │ let v110 : UH3 = method11(v107, v109) │
00:00:25 #2130 [Verbose] > │ let v111 : (struct (int64 * int64) []) = method12(v110) │
00:00:25 #2131 [Verbose] > │ let v112 : int32 = v111.Length │
00:00:25 #2132 [Verbose] > │ let v113 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:00:25 #2133 [Verbose] > │ (int64 * int64)> (v112) │
00:00:25 #2134 [Verbose] > │ let v114 : Mut1 = {l0 = 0} : Mut1 │
00:00:25 #2135 [Verbose] > │ while method15(v112, v114) do │
00:00:25 #2136 [Verbose] > │ let v116 : int32 = v114.l0 │
00:00:25 #2137 [Verbose] > │ let struct (v117 : int64, v118 : int64) = v111.[int v116] │
00:00:25 #2138 [Verbose] > │ let v119 : int64 = v117 + 1L │
00:00:25 #2139 [Verbose] > │ v113.[int v116] <- struct (v119, v118) │
00:00:25 #2140 [Verbose] > │ let v120 : int32 = v116 + 1 │
00:00:25 #2141 [Verbose] > │ v114.l0 <- v120 │
00:00:25 #2142 [Verbose] > │ () │
00:00:25 #2143 [Verbose] > │ let v121 : (struct (int64 * int64) -> int64) = closure3() │
00:00:25 #2144 [Verbose] > │ let v122 : (struct (int64 * int64) []) = v113 |> Array.sortBy v121 │
00:00:25 #2145 [Verbose] > │ let struct (v123 : int64, v124 : int64) = v122.[int 0] │
00:00:25 #2146 [Verbose] > │ let v125 : string = $"%A{struct (v123, v124)}" │
00:00:25 #2147 [Verbose] > │ let v126 : bool = v92 = v94 │
00:00:25 #2148 [Verbose] > │ let v131 : US0 = │
00:00:25 #2149 [Verbose] > │ if v126 then │
00:00:25 #2150 [Verbose] > │ let v127 : System.ConsoleColor = │
00:00:25 #2151 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:00:25 #2152 [Verbose] > │ US0_1(v127) │
00:00:25 #2153 [Verbose] > │ else │
00:00:25 #2154 [Verbose] > │ let v129 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:00:25 #2155 [Verbose] > │ US0_1(v129) │
00:00:25 #2156 [Verbose] > │ let v132 : UH2 = UH2_1 │
00:00:25 #2157 [Verbose] > │ let v133 : UH2 = UH2_0(v125, v132) │
00:00:25 #2158 [Verbose] > │ let v134 : UH2 = UH2_0(v94, v133) │
00:00:25 #2159 [Verbose] > │ let v135 : UH2 = UH2_0(v92, v134) │
00:00:25 #2160 [Verbose] > │ let v136 : UH2 = UH2_0(v93, v135) │
00:00:25 #2161 [Verbose] > │ v88.[int v91] <- struct (v136, v131) │
00:00:25 #2162 [Verbose] > │ let v137 : uint64 = v91 + 1UL │
00:00:25 #2163 [Verbose] > │ v89.l0 <- v137 │
00:00:25 #2164 [Verbose] > │ () │
00:00:25 #2165 [Verbose] > │ let v138 : string = "Input" │
00:00:25 #2166 [Verbose] > │ let v139 : string = "Expected" │
00:00:25 #2167 [Verbose] > │ let v140 : string = "Result" │
00:00:25 #2168 [Verbose] > │ let v141 : string = "Best" │
00:00:25 #2169 [Verbose] > │ let v142 : UH2 = UH2_1 │
00:00:25 #2170 [Verbose] > │ let v143 : UH2 = UH2_0(v141, v142) │
00:00:25 #2171 [Verbose] > │ let v144 : UH2 = UH2_0(v140, v143) │
00:00:25 #2172 [Verbose] > │ let v145 : UH2 = UH2_0(v139, v144) │
00:00:25 #2173 [Verbose] > │ let v146 : UH2 = UH2_0(v138, v145) │
00:00:25 #2174 [Verbose] > │ let v147 : US0 = US0_0 │
00:00:25 #2175 [Verbose] > │ let v148 : string = "---" │
00:00:25 #2176 [Verbose] > │ let v149 : UH2 = UH2_1 │
00:00:25 #2177 [Verbose] > │ let v150 : UH2 = UH2_0(v148, v149) │
00:00:25 #2178 [Verbose] > │ let v151 : UH2 = UH2_0(v148, v150) │
00:00:25 #2179 [Verbose] > │ let v152 : UH2 = UH2_0(v148, v151) │
00:00:25 #2180 [Verbose] > │ let v153 : UH2 = UH2_0(v148, v152) │
00:00:25 #2181 [Verbose] > │ let v154 : US0 = US0_0 │
00:00:25 #2182 [Verbose] > │ let v155 : UH4 = UH4_1 │
00:00:25 #2183 [Verbose] > │ let v156 : UH4 = UH4_0(v153, v154, v155) │
00:00:25 #2184 [Verbose] > │ let v157 : UH4 = UH4_0(v146, v147, v156) │
00:00:25 #2185 [Verbose] > │ let v158 : (struct (UH2 * US0) []) = method16(v157) │
00:00:25 #2186 [Verbose] > │ let v159 : uint64 = System.Convert.ToUInt64 v158.Length │
00:00:25 #2187 [Verbose] > │ let v160 : uint64 = System.Convert.ToUInt64 v88.Length │
00:00:25 #2188 [Verbose] > │ let v161 : uint64 = v159 + v160 │
00:00:25 #2189 [Verbose] > │ let v162 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:00:25 #2190 [Verbose] > │ US0)> (System.Convert.ToInt32(v161)) │
00:00:25 #2191 [Verbose] > │ let v163 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2192 [Verbose] > │ while method4(v161, v163) do │
00:00:25 #2193 [Verbose] > │ let v165 : uint64 = v163.l0 │
00:00:25 #2194 [Verbose] > │ let v166 : bool = v165 < v159 │
00:00:25 #2195 [Verbose] > │ let struct (v172 : UH2, v173 : US0) = │
00:00:25 #2196 [Verbose] > │ if v166 then │
00:00:25 #2197 [Verbose] > │ let struct (v167 : UH2, v168 : US0) = v158.[int v165] │
00:00:25 #2198 [Verbose] > │ struct (v167, v168) │
00:00:25 #2199 [Verbose] > │ else │
00:00:25 #2200 [Verbose] > │ let v169 : uint64 = v165 - v159 │
00:00:25 #2201 [Verbose] > │ let struct (v170 : UH2, v171 : US0) = v88.[int v169] │
00:00:25 #2202 [Verbose] > │ struct (v170, v171) │
00:00:25 #2203 [Verbose] > │ v162.[int v165] <- struct (v172, v173) │
00:00:25 #2204 [Verbose] > │ let v174 : uint64 = v165 + 1UL │
00:00:25 #2205 [Verbose] > │ v163.l0 <- v174 │
00:00:25 #2206 [Verbose] > │ () │
00:00:25 #2207 [Verbose] > │ let v175 : uint64 = System.Convert.ToUInt64 v162.Length │
00:00:25 #2208 [Verbose] > │ let v176 : ((string []) []) = Array.zeroCreate<(string [])> │
00:00:25 #2209 [Verbose] > │ (System.Convert.ToInt32(v175)) │
00:00:25 #2210 [Verbose] > │ let v177 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2211 [Verbose] > │ while method4(v175, v177) do │
00:00:25 #2212 [Verbose] > │ let v179 : uint64 = v177.l0 │
00:00:25 #2213 [Verbose] > │ let struct (v180 : UH2, v181 : US0) = v162.[int v179] │
00:00:25 #2214 [Verbose] > │ let v182 : (string []) = method19(v180) │
00:00:25 #2215 [Verbose] > │ v176.[int v179] <- v182 │
00:00:25 #2216 [Verbose] > │ let v183 : uint64 = v179 + 1UL │
00:00:25 #2217 [Verbose] > │ v177.l0 <- v183 │
00:00:25 #2218 [Verbose] > │ () │
00:00:25 #2219 [Verbose] > │ let v184 : ((string []) []) = v176 |> Array.transpose │
00:00:25 #2220 [Verbose] > │ let v185 : uint64 = System.Convert.ToUInt64 v184.Length │
00:00:25 #2221 [Verbose] > │ let v186 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2222 [Verbose] > │ (System.Convert.ToInt32(v185)) │
00:00:25 #2223 [Verbose] > │ let v187 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2224 [Verbose] > │ while method4(v185, v187) do │
00:00:25 #2225 [Verbose] > │ let v189 : uint64 = v187.l0 │
00:00:25 #2226 [Verbose] > │ let v190 : (string []) = v184.[int v189] │
00:00:25 #2227 [Verbose] > │ let v191 : uint64 = System.Convert.ToUInt64 v190.Length │
00:00:25 #2228 [Verbose] > │ let v192 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2229 [Verbose] > │ (System.Convert.ToInt32(v191)) │
00:00:25 #2230 [Verbose] > │ let v193 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2231 [Verbose] > │ while method4(v191, v193) do │
00:00:25 #2232 [Verbose] > │ let v195 : uint64 = v193.l0 │
00:00:25 #2233 [Verbose] > │ let v196 : string = v190.[int v195] │
00:00:25 #2234 [Verbose] > │ let v197 : int64 = System.Convert.ToInt64 v196.Length │
00:00:25 #2235 [Verbose] > │ v192.[int v195] <- v197 │
00:00:25 #2236 [Verbose] > │ let v198 : uint64 = v195 + 1UL │
00:00:25 #2237 [Verbose] > │ v193.l0 <- v198 │
00:00:25 #2238 [Verbose] > │ () │
00:00:25 #2239 [Verbose] > │ let v199 : (int64 []) = v192 |> Array.sortDescending │
00:00:25 #2240 [Verbose] > │ let v200 : int64 option = v199 |> Array.tryItem 0 │
00:00:25 #2241 [Verbose] > │ let v201 : (int64 -> US1) = closure4() │
00:00:25 #2242 [Verbose] > │ let v202 : US1 = US1_0 │
00:00:25 #2243 [Verbose] > │ let v203 : US1 = v200 |> Option.map v201 |> Option.defaultValue v202 │
00:00:25 #2244 [Verbose] > │ let v206 : int64 = │
00:00:25 #2245 [Verbose] > │ match v203 with │
00:00:25 #2246 [Verbose] > │ | US1_0 -> (* None *) │
00:00:25 #2247 [Verbose] > │ 0L │
00:00:25 #2248 [Verbose] > │ | US1_1(v204) -> (* Some *) │
00:00:25 #2249 [Verbose] > │ v204 │
00:00:25 #2250 [Verbose] > │ v186.[int v189] <- v206 │
00:00:25 #2251 [Verbose] > │ let v207 : uint64 = v189 + 1UL │
00:00:25 #2252 [Verbose] > │ v187.l0 <- v207 │
00:00:25 #2253 [Verbose] > │ () │
00:00:25 #2254 [Verbose] > │ let v208 : uint64 = System.Convert.ToUInt64 v186.Length │
00:00:25 #2255 [Verbose] > │ let v209 : UH5 = UH5_1 │
00:00:25 #2256 [Verbose] > │ let v210 : Mut3 = {l0 = 0UL; l1 = v209; l2 = 0} : Mut3 │
00:00:25 #2257 [Verbose] > │ while method22(v208, v210) do │
00:00:25 #2258 [Verbose] > │ let v212 : uint64 = v210.l0 │
00:00:25 #2259 [Verbose] > │ let struct (v213 : UH5, v214 : int32) = v210.l1, v210.l2 │
00:00:25 #2260 [Verbose] > │ let v215 : int64 = v186.[int v212] │
00:00:25 #2261 [Verbose] > │ let v216 : int32 = v214 + 1 │
00:00:25 #2262 [Verbose] > │ let v217 : uint64 = v212 + 1UL │
00:00:25 #2263 [Verbose] > │ let v218 : UH5 = UH5_0(v214, v215, v213) │
00:00:25 #2264 [Verbose] > │ v210.l0 <- v217 │
00:00:25 #2265 [Verbose] > │ v210.l1 <- v218 │
00:00:25 #2266 [Verbose] > │ v210.l2 <- v216 │
00:00:25 #2267 [Verbose] > │ () │
00:00:25 #2268 [Verbose] > │ let struct (v219 : UH5, v220 : int32) = v210.l1, v210.l2 │
00:00:25 #2269 [Verbose] > │ let v221 : UH5 = UH5_1 │
00:00:25 #2270 [Verbose] > │ let v222 : UH5 = method23(v219, v221) │
00:00:25 #2271 [Verbose] > │ let v223 : (struct (int32 * int64) []) = method24(v222) │
00:00:25 #2272 [Verbose] > │ let v224 : Map<int32, int64> = v223 |> Array.map (fun (struct (a, b)) -> │
00:00:25 #2273 [Verbose] > │ a, b) |> Map.ofArray │
00:00:25 #2274 [Verbose] > │ let v225 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:00:25 #2275 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v175)) │
00:00:25 #2276 [Verbose] > │ let v226 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2277 [Verbose] > │ while method4(v175, v226) do │
00:00:25 #2278 [Verbose] > │ let v228 : uint64 = v226.l0 │
00:00:25 #2279 [Verbose] > │ let struct (v229 : UH2, v230 : US0) = v162.[int v228] │
00:00:25 #2280 [Verbose] > │ let v231 : UH6 = UH6_1 │
00:00:25 #2281 [Verbose] > │ let v232 : int32 = 0 │
00:00:25 #2282 [Verbose] > │ let struct (v233 : UH6, v234 : int32) = method27(v229, v231, v232) │
00:00:25 #2283 [Verbose] > │ let v235 : UH6 = UH6_1 │
00:00:25 #2284 [Verbose] > │ let v236 : UH6 = method28(v233, v235) │
00:00:25 #2285 [Verbose] > │ let v237 : UH2 = UH2_1 │
00:00:25 #2286 [Verbose] > │ let v238 : UH2 = method29(v224, v236, v237) │
00:00:25 #2287 [Verbose] > │ let v239 : (string []) = method30(v238) │
00:00:25 #2288 [Verbose] > │ v225.[int v228] <- struct (v239, v230) │
00:00:25 #2289 [Verbose] > │ let v240 : uint64 = v228 + 1UL │
00:00:25 #2290 [Verbose] > │ v226.l0 <- v240 │
00:00:25 #2291 [Verbose] > │ () │
00:00:25 #2292 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2293 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v225.Length │
00:00:25 #2294 [Verbose] > │ let v242 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2295 [Verbose] > │ while method4(v241, v242) do │
00:00:25 #2296 [Verbose] > │ let v244 : uint64 = v242.l0 │
00:00:25 #2297 [Verbose] > │ let struct (v245 : (string []), v246 : US0) = v225.[int v244] │
00:00:25 #2298 [Verbose] > │ match v246 with │
00:00:25 #2299 [Verbose] > │ | US0_0 -> (* None *) │
00:00:25 #2300 [Verbose] > │ let mutable result = None │
00:00:25 #2301 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2302 [Verbose] > │ #if !WASM │
00:00:25 #2303 [Verbose] > │ () │
00:00:25 #2304 [Verbose] > │ #else │
00:00:25 #2305 [Verbose] > │ () │
00:00:25 #2306 [Verbose] > │ #endif │
00:00:25 #2307 [Verbose] > │ #else │
00:00:25 #2308 [Verbose] > │ System.Console.ResetColor () │
00:00:25 #2309 [Verbose] > │ () │
00:00:25 #2310 [Verbose] > │ #endif │
00:00:25 #2311 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2312 [Verbose] > │ result |> Option.get │
00:00:25 #2313 [Verbose] > │ () │
00:00:25 #2314 [Verbose] > │ | US0_1(v247) -> (* Some *) │
00:00:25 #2315 [Verbose] > │ let mutable result = None │
00:00:25 #2316 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2317 [Verbose] > │ #if !WASM │
00:00:25 #2318 [Verbose] > │ () │
00:00:25 #2319 [Verbose] > │ #else │
00:00:25 #2320 [Verbose] > │ () │
00:00:25 #2321 [Verbose] > │ #endif │
00:00:25 #2322 [Verbose] > │ #else │
00:00:25 #2323 [Verbose] > │ System.Console.ForegroundColor <- v247 │
00:00:25 #2324 [Verbose] > │ () │
00:00:25 #2325 [Verbose] > │ #endif │
00:00:25 #2326 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2327 [Verbose] > │ result |> Option.get │
00:00:25 #2328 [Verbose] > │ () │
00:00:25 #2329 [Verbose] > │ let v248 : string = "\t| " │
00:00:25 #2330 [Verbose] > │ let v249 : string = System.String.Join (v248, v245) │
00:00:25 #2331 [Verbose] > │ System.Console.WriteLine v249 │
00:00:25 #2332 [Verbose] > │ let mutable result = None │
00:00:25 #2333 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2334 [Verbose] > │ #if !WASM │
00:00:25 #2335 [Verbose] > │ () │
00:00:25 #2336 [Verbose] > │ #else │
00:00:25 #2337 [Verbose] > │ () │
00:00:25 #2338 [Verbose] > │ #endif │
00:00:25 #2339 [Verbose] > │ #else │
00:00:25 #2340 [Verbose] > │ System.Console.ResetColor () │
00:00:25 #2341 [Verbose] > │ () │
00:00:25 #2342 [Verbose] > │ #endif │
00:00:25 #2343 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2344 [Verbose] > │ result |> Option.get │
00:00:25 #2345 [Verbose] > │ let v250 : uint64 = v244 + 1UL │
00:00:25 #2346 [Verbose] > │ v242.l0 <- v250 │
00:00:25 #2347 [Verbose] > │ () │
00:00:25 #2348 [Verbose] > │ let v251 : ((float []) []) = Array.zeroCreate<(float [])> │
00:00:25 #2349 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:25 #2350 [Verbose] > │ let v252 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2351 [Verbose] > │ while method4(v87, v252) do │
00:00:25 #2352 [Verbose] > │ let v254 : uint64 = v252.l0 │
00:00:25 #2353 [Verbose] > │ let struct (v255 : string, v256 : string, v257 : string, v258 : │
00:00:25 #2354 [Verbose] > │ (int64 [])) = v16.[int v254] │
00:00:25 #2355 [Verbose] > │ let v259 : (int64 -> float) = float │
00:00:25 #2356 [Verbose] > │ let v260 : uint64 = System.Convert.ToUInt64 v258.Length │
00:00:25 #2357 [Verbose] > │ let v261 : (float []) = Array.zeroCreate<float> │
00:00:25 #2358 [Verbose] > │ (System.Convert.ToInt32(v260)) │
00:00:25 #2359 [Verbose] > │ let v262 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2360 [Verbose] > │ while method4(v260, v262) do │
00:00:25 #2361 [Verbose] > │ let v264 : uint64 = v262.l0 │
00:00:25 #2362 [Verbose] > │ let v265 : int64 = v258.[int v264] │
00:00:25 #2363 [Verbose] > │ let v266 : float = v259 v265 │
00:00:25 #2364 [Verbose] > │ v261.[int v264] <- v266 │
00:00:25 #2365 [Verbose] > │ let v267 : uint64 = v264 + 1UL │
00:00:25 #2366 [Verbose] > │ v262.l0 <- v267 │
00:00:25 #2367 [Verbose] > │ () │
00:00:25 #2368 [Verbose] > │ v251.[int v254] <- v261 │
00:00:25 #2369 [Verbose] > │ let v268 : uint64 = v254 + 1UL │
00:00:25 #2370 [Verbose] > │ v252.l0 <- v268 │
00:00:25 #2371 [Verbose] > │ () │
00:00:25 #2372 [Verbose] > │ let v269 : ((float []) []) = v251 |> Array.transpose │
00:00:25 #2373 [Verbose] > │ let v270 : uint64 = System.Convert.ToUInt64 v269.Length │
00:00:25 #2374 [Verbose] > │ let v271 : (float []) = Array.zeroCreate<float> │
00:00:25 #2375 [Verbose] > │ (System.Convert.ToInt32(v270)) │
00:00:25 #2376 [Verbose] > │ let v272 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2377 [Verbose] > │ while method4(v270, v272) do │
00:00:25 #2378 [Verbose] > │ let v274 : uint64 = v272.l0 │
00:00:25 #2379 [Verbose] > │ let v275 : (float []) = v269.[int v274] │
00:00:25 #2380 [Verbose] > │ let v276 : float = v275 |> Array.average │
00:00:25 #2381 [Verbose] > │ v271.[int v274] <- v276 │
00:00:25 #2382 [Verbose] > │ let v277 : uint64 = v274 + 1UL │
00:00:25 #2383 [Verbose] > │ v272.l0 <- v277 │
00:00:25 #2384 [Verbose] > │ () │
00:00:25 #2385 [Verbose] > │ let v278 : (float -> int64) = int64 │
00:00:25 #2386 [Verbose] > │ let v279 : uint64 = System.Convert.ToUInt64 v271.Length │
00:00:25 #2387 [Verbose] > │ let v280 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2388 [Verbose] > │ (System.Convert.ToInt32(v279)) │
00:00:25 #2389 [Verbose] > │ let v281 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2390 [Verbose] > │ while method4(v279, v281) do │
00:00:25 #2391 [Verbose] > │ let v283 : uint64 = v281.l0 │
00:00:25 #2392 [Verbose] > │ let v284 : float = v271.[int v283] │
00:00:25 #2393 [Verbose] > │ let v285 : int64 = v278 v284 │
00:00:25 #2394 [Verbose] > │ v280.[int v283] <- v285 │
00:00:25 #2395 [Verbose] > │ let v286 : uint64 = v283 + 1UL │
00:00:25 #2396 [Verbose] > │ v281.l0 <- v286 │
00:00:25 #2397 [Verbose] > │ () │
00:00:25 #2398 [Verbose] > │ let v287 : uint64 = System.Convert.ToUInt64 v280.Length │
00:00:25 #2399 [Verbose] > │ let v288 : UH5 = UH5_1 │
00:00:25 #2400 [Verbose] > │ let v289 : Mut3 = {l0 = 0UL; l1 = v288; l2 = 0} : Mut3 │
00:00:25 #2401 [Verbose] > │ while method22(v287, v289) do │
00:00:25 #2402 [Verbose] > │ let v291 : uint64 = v289.l0 │
00:00:25 #2403 [Verbose] > │ let struct (v292 : UH5, v293 : int32) = v289.l1, v289.l2 │
00:00:25 #2404 [Verbose] > │ let v294 : int64 = v280.[int v291] │
00:00:25 #2405 [Verbose] > │ let v295 : int32 = v293 + 1 │
00:00:25 #2406 [Verbose] > │ let v296 : uint64 = v291 + 1UL │
00:00:25 #2407 [Verbose] > │ let v297 : UH5 = UH5_0(v293, v294, v292) │
00:00:25 #2408 [Verbose] > │ v289.l0 <- v296 │
00:00:25 #2409 [Verbose] > │ v289.l1 <- v297 │
00:00:25 #2410 [Verbose] > │ v289.l2 <- v295 │
00:00:25 #2411 [Verbose] > │ () │
00:00:25 #2412 [Verbose] > │ let struct (v298 : UH5, v299 : int32) = v289.l1, v289.l2 │
00:00:25 #2413 [Verbose] > │ let v300 : UH5 = UH5_1 │
00:00:25 #2414 [Verbose] > │ let v301 : UH5 = method23(v298, v300) │
00:00:25 #2415 [Verbose] > │ let v302 : (struct (int32 * int64) []) = method33(v301) │
00:00:25 #2416 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2417 [Verbose] > │ let v303 : string = "Average Ranking " │
00:00:25 #2418 [Verbose] > │ System.Console.WriteLine v303 │
00:00:25 #2419 [Verbose] > │ let v304 : (struct (int32 * int64) -> int64) = closure5() │
00:00:25 #2420 [Verbose] > │ let v305 : (struct (int32 * int64) []) = v302 |> Array.sortBy v304 │
00:00:25 #2421 [Verbose] > │ let v306 : uint64 = System.Convert.ToUInt64 v305.Length │
00:00:25 #2422 [Verbose] > │ let v307 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2423 [Verbose] > │ while method4(v306, v307) do │
00:00:25 #2424 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:00:25 #2425 [Verbose] > │ let struct (v310 : int32, v311 : int64) = v305.[int v309] │
00:00:25 #2426 [Verbose] > │ let v312 : string = $"Test case %d{v310 + 1}. Average Time: %A{v311} │
00:00:25 #2427 [Verbose] > │ " │
00:00:25 #2428 [Verbose] > │ System.Console.WriteLine v312 │
00:00:25 #2429 [Verbose] > │ let v313 : uint64 = v309 + 1UL │
00:00:25 #2430 [Verbose] > │ v307.l0 <- v313 │
00:00:25 #2431 [Verbose] > │ () │
00:00:25 #2432 [Verbose] > │ () │
00:00:25 #2433 [Verbose] > │ and method0 () : unit = │
00:00:25 #2434 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:00:25 #2435 [Verbose] > │ let v1 : string = nameof v0 │
00:00:25 #2436 [Verbose] > │ let v2 : string = "" │
00:00:25 #2437 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2438 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2439 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:00:25 #2440 [Verbose] > │ System.Console.WriteLine v3 │
00:00:25 #2441 [Verbose] > │ let v4 : float = 0.0 │
00:00:25 #2442 [Verbose] > │ let v5 : float = 1.0 │
00:00:25 #2443 [Verbose] > │ let v6 : float = 2.0 │
00:00:25 #2444 [Verbose] > │ let v7 : float = 3.0 │
00:00:25 #2445 [Verbose] > │ let v8 : float = 5.0 │
00:00:25 #2446 [Verbose] > │ let v9 : float = 6.0 │
00:00:25 #2447 [Verbose] > │ let v10 : UH0 = UH0_1 │
00:00:25 #2448 [Verbose] > │ let v11 : UH0 = UH0_0(v8, v9, v10) │
00:00:25 #2449 [Verbose] > │ let v12 : UH0 = UH0_0(v6, v7, v11) │
00:00:25 #2450 [Verbose] > │ let v13 : UH0 = UH0_0(v4, v5, v12) │
00:00:25 #2451 [Verbose] > │ let v14 : (struct (float * float) []) = method1(v13) │
00:00:25 #2452 [Verbose] > │ let v15 : uint64 = System.Convert.ToUInt64 v14.Length │
00:00:25 #2453 [Verbose] > │ let v16 : (struct (string * string * string * (int64 [])) []) = │
00:00:25 #2454 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:00:25 #2455 [Verbose] > │ (System.Convert.ToInt32(v15)) │
00:00:25 #2456 [Verbose] > │ let v17 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2457 [Verbose] > │ while method4(v15, v17) do │
00:00:25 #2458 [Verbose] > │ let v19 : uint64 = v17.l0 │
00:00:25 #2459 [Verbose] > │ let struct (v20 : float, v21 : float) = v14.[int v19] │
00:00:25 #2460 [Verbose] > │ let v22 : string = $"%A{v20}" │
00:00:25 #2461 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2462 [Verbose] > │ let v23 : string = $"Solution: {v22} " │
00:00:25 #2463 [Verbose] > │ System.Console.WriteLine v23 │
00:00:25 #2464 [Verbose] > │ let v24 : int32 = 0 │
00:00:25 #2465 [Verbose] > │ let v25 : string = "A" │
00:00:25 #2466 [Verbose] > │ let v26 : (float -> float) = closure1() │
00:00:25 #2467 [Verbose] > │ let v27 : UH1 = UH1_1 │
00:00:25 #2468 [Verbose] > │ let v28 : UH1 = UH1_0(v24, v25, v26, v27) │
00:00:25 #2469 [Verbose] > │ let v29 : (struct (int32 * string * (float -> float)) []) = │
00:00:25 #2470 [Verbose] > │ method5(v28) │
00:00:25 #2471 [Verbose] > │ let v30 : uint64 = System.Convert.ToUInt64 v29.Length │
00:00:25 #2472 [Verbose] > │ let v31 : (struct (float * int64) []) = Array.zeroCreate<struct │
00:00:25 #2473 [Verbose] > │ (float * int64)> (System.Convert.ToInt32(v30)) │
00:00:25 #2474 [Verbose] > │ let v32 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2475 [Verbose] > │ while method4(v30, v32) do │
00:00:25 #2476 [Verbose] > │ let v34 : uint64 = v32.l0 │
00:00:25 #2477 [Verbose] > │ let struct (v35 : int32, v36 : string, v37 : (float -> float)) = │
00:00:25 #2478 [Verbose] > │ v29.[int v34] │
00:00:25 #2479 [Verbose] > │ let mutable result = None │
00:00:25 #2480 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2481 [Verbose] > │ #if !WASM │
00:00:25 #2482 [Verbose] > │ () │
00:00:25 #2483 [Verbose] > │ #else │
00:00:25 #2484 [Verbose] > │ () │
00:00:25 #2485 [Verbose] > │ #endif │
00:00:25 #2486 [Verbose] > │ #else │
00:00:25 #2487 [Verbose] > │ System.GC.Collect () │
00:00:25 #2488 [Verbose] > │ () │
00:00:25 #2489 [Verbose] > │ #endif │
00:00:25 #2490 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2491 [Verbose] > │ result |> Option.get │
00:00:25 #2492 [Verbose] > │ let v38 : (unit -> System.Diagnostics.Stopwatch) = │
00:00:25 #2493 [Verbose] > │ System.Diagnostics.Stopwatch │
00:00:25 #2494 [Verbose] > │ let v39 : System.Diagnostics.Stopwatch = v38 () │
00:00:25 #2495 [Verbose] > │ v39.Start () │
00:00:25 #2496 [Verbose] > │ let v40 : int64 = v39.ElapsedMilliseconds │
00:00:25 #2497 [Verbose] > │ let v41 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:00:25 #2498 [Verbose] > │ let v42 : Mut1 = {l0 = 0} : Mut1 │
00:00:25 #2499 [Verbose] > │ while method8(v42) do │
00:00:25 #2500 [Verbose] > │ let v44 : int32 = v42.l0 │
00:00:25 #2501 [Verbose] > │ v41.[int v44] <- v44 │
00:00:25 #2502 [Verbose] > │ let v45 : int32 = v44 + 1 │
00:00:25 #2503 [Verbose] > │ v42.l0 <- v45 │
00:00:25 #2504 [Verbose] > │ () │
00:00:25 #2505 [Verbose] > │ let v46 : (int32 -> float) = closure2(v20, v37) │
00:00:25 #2506 [Verbose] > │ let v47 : (float []) = v41 |> Array.Parallel.map v46 │
00:00:25 #2507 [Verbose] > │ let v48 : int32 = v47.Length │
00:00:25 #2508 [Verbose] > │ let v49 : int32 = v48 - 1 │
00:00:25 #2509 [Verbose] > │ let v50 : float = v47.[int v49] │
00:00:25 #2510 [Verbose] > │ let v51 : int64 = v39.ElapsedMilliseconds │
00:00:25 #2511 [Verbose] > │ let v52 : int64 = v51 - v40 │
00:00:25 #2512 [Verbose] > │ let v53 : string = $"Test case {v35 + 1}. {v36}. Time: {v52} " │
00:00:25 #2513 [Verbose] > │ System.Console.WriteLine v53 │
00:00:25 #2514 [Verbose] > │ v31.[int v34] <- struct (v50, v52) │
00:00:25 #2515 [Verbose] > │ let v54 : uint64 = v34 + 1UL │
00:00:25 #2516 [Verbose] > │ v32.l0 <- v54 │
00:00:25 #2517 [Verbose] > │ () │
00:00:25 #2518 [Verbose] > │ let v55 : uint64 = System.Convert.ToUInt64 v31.Length │
00:00:25 #2519 [Verbose] > │ let v56 : (float []) = Array.zeroCreate<float> │
00:00:25 #2520 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2521 [Verbose] > │ let v57 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2522 [Verbose] > │ while method4(v55, v57) do │
00:00:25 #2523 [Verbose] > │ let v59 : uint64 = v57.l0 │
00:00:25 #2524 [Verbose] > │ let struct (v60 : float, v61 : int64) = v31.[int v59] │
00:00:25 #2525 [Verbose] > │ v56.[int v59] <- v60 │
00:00:25 #2526 [Verbose] > │ let v62 : uint64 = v59 + 1UL │
00:00:25 #2527 [Verbose] > │ v57.l0 <- v62 │
00:00:25 #2528 [Verbose] > │ () │
00:00:25 #2529 [Verbose] > │ let v63 : uint64 = System.Convert.ToUInt64 v56.Length │
00:00:25 #2530 [Verbose] > │ let v64 : bool = v63 <= 1UL │
00:00:25 #2531 [Verbose] > │ if v64 then │
00:00:25 #2532 [Verbose] > │ () │
00:00:25 #2533 [Verbose] > │ else │
00:00:25 #2534 [Verbose] > │ let v65 : float = v56.[int 0UL] │
00:00:25 #2535 [Verbose] > │ let v66 : uint64 = 0UL │
00:00:25 #2536 [Verbose] > │ let v67 : bool = method9(v65, v56, v66) │
00:00:25 #2537 [Verbose] > │ if v67 then │
00:00:25 #2538 [Verbose] > │ () │
00:00:25 #2539 [Verbose] > │ else │
00:00:25 #2540 [Verbose] > │ let v68 : string = $"Challenge error: {v56}" │
00:00:25 #2541 [Verbose] > │ failwith<unit> v68 │
00:00:25 #2542 [Verbose] > │ let v69 : string = $"%A{v21}" │
00:00:25 #2543 [Verbose] > │ let v70 : (float []) = Array.zeroCreate<float> │
00:00:25 #2544 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2545 [Verbose] > │ let v71 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2546 [Verbose] > │ while method4(v55, v71) do │
00:00:25 #2547 [Verbose] > │ let v73 : uint64 = v71.l0 │
00:00:25 #2548 [Verbose] > │ let struct (v74 : float, v75 : int64) = v31.[int v73] │
00:00:25 #2549 [Verbose] > │ v70.[int v73] <- v74 │
00:00:25 #2550 [Verbose] > │ let v76 : uint64 = v73 + 1UL │
00:00:25 #2551 [Verbose] > │ v71.l0 <- v76 │
00:00:25 #2552 [Verbose] > │ () │
00:00:25 #2553 [Verbose] > │ let v77 : float = v70.[int 0UL] │
00:00:25 #2554 [Verbose] > │ let v78 : string = $"%A{v77}" │
00:00:25 #2555 [Verbose] > │ let v79 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2556 [Verbose] > │ (System.Convert.ToInt32(v55)) │
00:00:25 #2557 [Verbose] > │ let v80 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2558 [Verbose] > │ while method4(v55, v80) do │
00:00:25 #2559 [Verbose] > │ let v82 : uint64 = v80.l0 │
00:00:25 #2560 [Verbose] > │ let struct (v83 : float, v84 : int64) = v31.[int v82] │
00:00:25 #2561 [Verbose] > │ v79.[int v82] <- v84 │
00:00:25 #2562 [Verbose] > │ let v85 : uint64 = v82 + 1UL │
00:00:25 #2563 [Verbose] > │ v80.l0 <- v85 │
00:00:25 #2564 [Verbose] > │ () │
00:00:25 #2565 [Verbose] > │ v16.[int v19] <- struct (v69, v22, v78, v79) │
00:00:25 #2566 [Verbose] > │ let v86 : uint64 = v19 + 1UL │
00:00:25 #2567 [Verbose] > │ v17.l0 <- v86 │
00:00:25 #2568 [Verbose] > │ () │
00:00:25 #2569 [Verbose] > │ let v87 : uint64 = System.Convert.ToUInt64 v16.Length │
00:00:25 #2570 [Verbose] > │ let v88 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:00:25 #2571 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:25 #2572 [Verbose] > │ let v89 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2573 [Verbose] > │ while method4(v87, v89) do │
00:00:25 #2574 [Verbose] > │ let v91 : uint64 = v89.l0 │
00:00:25 #2575 [Verbose] > │ let struct (v92 : string, v93 : string, v94 : string, v95 : (int64 [ │
00:00:25 #2576 [Verbose] > │ ])) = v16.[int v91] │
00:00:25 #2577 [Verbose] > │ let v96 : uint64 = System.Convert.ToUInt64 v95.Length │
00:00:25 #2578 [Verbose] > │ let v97 : UH3 = UH3_1 │
00:00:25 #2579 [Verbose] > │ let v98 : Mut2 = {l0 = 0UL; l1 = v97; l2 = 0L} : Mut2 │
00:00:25 #2580 [Verbose] > │ while method10(v96, v98) do │
00:00:25 #2581 [Verbose] > │ let v100 : uint64 = v98.l0 │
00:00:25 #2582 [Verbose] > │ let struct (v101 : UH3, v102 : int64) = v98.l1, v98.l2 │
00:00:25 #2583 [Verbose] > │ let v103 : int64 = v95.[int v100] │
00:00:25 #2584 [Verbose] > │ let v104 : int64 = v102 + 1L │
00:00:25 #2585 [Verbose] > │ let v105 : uint64 = v100 + 1UL │
00:00:25 #2586 [Verbose] > │ let v106 : UH3 = UH3_0(v102, v103, v101) │
00:00:25 #2587 [Verbose] > │ v98.l0 <- v105 │
00:00:25 #2588 [Verbose] > │ v98.l1 <- v106 │
00:00:25 #2589 [Verbose] > │ v98.l2 <- v104 │
00:00:25 #2590 [Verbose] > │ () │
00:00:25 #2591 [Verbose] > │ let struct (v107 : UH3, v108 : int64) = v98.l1, v98.l2 │
00:00:25 #2592 [Verbose] > │ let v109 : UH3 = UH3_1 │
00:00:25 #2593 [Verbose] > │ let v110 : UH3 = method11(v107, v109) │
00:00:25 #2594 [Verbose] > │ let v111 : (struct (int64 * int64) []) = method12(v110) │
00:00:25 #2595 [Verbose] > │ let v112 : int32 = v111.Length │
00:00:25 #2596 [Verbose] > │ let v113 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:00:25 #2597 [Verbose] > │ (int64 * int64)> (v112) │
00:00:25 #2598 [Verbose] > │ let v114 : Mut1 = {l0 = 0} : Mut1 │
00:00:25 #2599 [Verbose] > │ while method15(v112, v114) do │
00:00:25 #2600 [Verbose] > │ let v116 : int32 = v114.l0 │
00:00:25 #2601 [Verbose] > │ let struct (v117 : int64, v118 : int64) = v111.[int v116] │
00:00:25 #2602 [Verbose] > │ let v119 : int64 = v117 + 1L │
00:00:25 #2603 [Verbose] > │ v113.[int v116] <- struct (v119, v118) │
00:00:25 #2604 [Verbose] > │ let v120 : int32 = v116 + 1 │
00:00:25 #2605 [Verbose] > │ v114.l0 <- v120 │
00:00:25 #2606 [Verbose] > │ () │
00:00:25 #2607 [Verbose] > │ let v121 : (struct (int64 * int64) -> int64) = closure3() │
00:00:25 #2608 [Verbose] > │ let v122 : (struct (int64 * int64) []) = v113 |> Array.sortBy v121 │
00:00:25 #2609 [Verbose] > │ let struct (v123 : int64, v124 : int64) = v122.[int 0] │
00:00:25 #2610 [Verbose] > │ let v125 : string = $"%A{struct (v123, v124)}" │
00:00:25 #2611 [Verbose] > │ let v126 : bool = v92 = v94 │
00:00:25 #2612 [Verbose] > │ let v131 : US0 = │
00:00:25 #2613 [Verbose] > │ if v126 then │
00:00:25 #2614 [Verbose] > │ let v127 : System.ConsoleColor = │
00:00:25 #2615 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:00:25 #2616 [Verbose] > │ US0_1(v127) │
00:00:25 #2617 [Verbose] > │ else │
00:00:25 #2618 [Verbose] > │ let v129 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:00:25 #2619 [Verbose] > │ US0_1(v129) │
00:00:25 #2620 [Verbose] > │ let v132 : UH2 = UH2_1 │
00:00:25 #2621 [Verbose] > │ let v133 : UH2 = UH2_0(v125, v132) │
00:00:25 #2622 [Verbose] > │ let v134 : UH2 = UH2_0(v94, v133) │
00:00:25 #2623 [Verbose] > │ let v135 : UH2 = UH2_0(v92, v134) │
00:00:25 #2624 [Verbose] > │ let v136 : UH2 = UH2_0(v93, v135) │
00:00:25 #2625 [Verbose] > │ v88.[int v91] <- struct (v136, v131) │
00:00:25 #2626 [Verbose] > │ let v137 : uint64 = v91 + 1UL │
00:00:25 #2627 [Verbose] > │ v89.l0 <- v137 │
00:00:25 #2628 [Verbose] > │ () │
00:00:25 #2629 [Verbose] > │ let v138 : string = "Input" │
00:00:25 #2630 [Verbose] > │ let v139 : string = "Expected" │
00:00:25 #2631 [Verbose] > │ let v140 : string = "Result" │
00:00:25 #2632 [Verbose] > │ let v141 : string = "Best" │
00:00:25 #2633 [Verbose] > │ let v142 : UH2 = UH2_1 │
00:00:25 #2634 [Verbose] > │ let v143 : UH2 = UH2_0(v141, v142) │
00:00:25 #2635 [Verbose] > │ let v144 : UH2 = UH2_0(v140, v143) │
00:00:25 #2636 [Verbose] > │ let v145 : UH2 = UH2_0(v139, v144) │
00:00:25 #2637 [Verbose] > │ let v146 : UH2 = UH2_0(v138, v145) │
00:00:25 #2638 [Verbose] > │ let v147 : US0 = US0_0 │
00:00:25 #2639 [Verbose] > │ let v148 : string = "---" │
00:00:25 #2640 [Verbose] > │ let v149 : UH2 = UH2_1 │
00:00:25 #2641 [Verbose] > │ let v150 : UH2 = UH2_0(v148, v149) │
00:00:25 #2642 [Verbose] > │ let v151 : UH2 = UH2_0(v148, v150) │
00:00:25 #2643 [Verbose] > │ let v152 : UH2 = UH2_0(v148, v151) │
00:00:25 #2644 [Verbose] > │ let v153 : UH2 = UH2_0(v148, v152) │
00:00:25 #2645 [Verbose] > │ let v154 : US0 = US0_0 │
00:00:25 #2646 [Verbose] > │ let v155 : UH4 = UH4_1 │
00:00:25 #2647 [Verbose] > │ let v156 : UH4 = UH4_0(v153, v154, v155) │
00:00:25 #2648 [Verbose] > │ let v157 : UH4 = UH4_0(v146, v147, v156) │
00:00:25 #2649 [Verbose] > │ let v158 : (struct (UH2 * US0) []) = method16(v157) │
00:00:25 #2650 [Verbose] > │ let v159 : uint64 = System.Convert.ToUInt64 v158.Length │
00:00:25 #2651 [Verbose] > │ let v160 : uint64 = System.Convert.ToUInt64 v88.Length │
00:00:25 #2652 [Verbose] > │ let v161 : uint64 = v159 + v160 │
00:00:25 #2653 [Verbose] > │ let v162 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:00:25 #2654 [Verbose] > │ US0)> (System.Convert.ToInt32(v161)) │
00:00:25 #2655 [Verbose] > │ let v163 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2656 [Verbose] > │ while method4(v161, v163) do │
00:00:25 #2657 [Verbose] > │ let v165 : uint64 = v163.l0 │
00:00:25 #2658 [Verbose] > │ let v166 : bool = v165 < v159 │
00:00:25 #2659 [Verbose] > │ let struct (v172 : UH2, v173 : US0) = │
00:00:25 #2660 [Verbose] > │ if v166 then │
00:00:25 #2661 [Verbose] > │ let struct (v167 : UH2, v168 : US0) = v158.[int v165] │
00:00:25 #2662 [Verbose] > │ struct (v167, v168) │
00:00:25 #2663 [Verbose] > │ else │
00:00:25 #2664 [Verbose] > │ let v169 : uint64 = v165 - v159 │
00:00:25 #2665 [Verbose] > │ let struct (v170 : UH2, v171 : US0) = v88.[int v169] │
00:00:25 #2666 [Verbose] > │ struct (v170, v171) │
00:00:25 #2667 [Verbose] > │ v162.[int v165] <- struct (v172, v173) │
00:00:25 #2668 [Verbose] > │ let v174 : uint64 = v165 + 1UL │
00:00:25 #2669 [Verbose] > │ v163.l0 <- v174 │
00:00:25 #2670 [Verbose] > │ () │
00:00:25 #2671 [Verbose] > │ let v175 : uint64 = System.Convert.ToUInt64 v162.Length │
00:00:25 #2672 [Verbose] > │ let v176 : ((string []) []) = Array.zeroCreate<(string [])> │
00:00:25 #2673 [Verbose] > │ (System.Convert.ToInt32(v175)) │
00:00:25 #2674 [Verbose] > │ let v177 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2675 [Verbose] > │ while method4(v175, v177) do │
00:00:25 #2676 [Verbose] > │ let v179 : uint64 = v177.l0 │
00:00:25 #2677 [Verbose] > │ let struct (v180 : UH2, v181 : US0) = v162.[int v179] │
00:00:25 #2678 [Verbose] > │ let v182 : (string []) = method19(v180) │
00:00:25 #2679 [Verbose] > │ v176.[int v179] <- v182 │
00:00:25 #2680 [Verbose] > │ let v183 : uint64 = v179 + 1UL │
00:00:25 #2681 [Verbose] > │ v177.l0 <- v183 │
00:00:25 #2682 [Verbose] > │ () │
00:00:25 #2683 [Verbose] > │ let v184 : ((string []) []) = v176 |> Array.transpose │
00:00:25 #2684 [Verbose] > │ let v185 : uint64 = System.Convert.ToUInt64 v184.Length │
00:00:25 #2685 [Verbose] > │ let v186 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2686 [Verbose] > │ (System.Convert.ToInt32(v185)) │
00:00:25 #2687 [Verbose] > │ let v187 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2688 [Verbose] > │ while method4(v185, v187) do │
00:00:25 #2689 [Verbose] > │ let v189 : uint64 = v187.l0 │
00:00:25 #2690 [Verbose] > │ let v190 : (string []) = v184.[int v189] │
00:00:25 #2691 [Verbose] > │ let v191 : uint64 = System.Convert.ToUInt64 v190.Length │
00:00:25 #2692 [Verbose] > │ let v192 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2693 [Verbose] > │ (System.Convert.ToInt32(v191)) │
00:00:25 #2694 [Verbose] > │ let v193 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2695 [Verbose] > │ while method4(v191, v193) do │
00:00:25 #2696 [Verbose] > │ let v195 : uint64 = v193.l0 │
00:00:25 #2697 [Verbose] > │ let v196 : string = v190.[int v195] │
00:00:25 #2698 [Verbose] > │ let v197 : int64 = System.Convert.ToInt64 v196.Length │
00:00:25 #2699 [Verbose] > │ v192.[int v195] <- v197 │
00:00:25 #2700 [Verbose] > │ let v198 : uint64 = v195 + 1UL │
00:00:25 #2701 [Verbose] > │ v193.l0 <- v198 │
00:00:25 #2702 [Verbose] > │ () │
00:00:25 #2703 [Verbose] > │ let v199 : (int64 []) = v192 |> Array.sortDescending │
00:00:25 #2704 [Verbose] > │ let v200 : int64 option = v199 |> Array.tryItem 0 │
00:00:25 #2705 [Verbose] > │ let v201 : (int64 -> US1) = closure4() │
00:00:25 #2706 [Verbose] > │ let v202 : US1 = US1_0 │
00:00:25 #2707 [Verbose] > │ let v203 : US1 = v200 |> Option.map v201 |> Option.defaultValue v202 │
00:00:25 #2708 [Verbose] > │ let v206 : int64 = │
00:00:25 #2709 [Verbose] > │ match v203 with │
00:00:25 #2710 [Verbose] > │ | US1_0 -> (* None *) │
00:00:25 #2711 [Verbose] > │ 0L │
00:00:25 #2712 [Verbose] > │ | US1_1(v204) -> (* Some *) │
00:00:25 #2713 [Verbose] > │ v204 │
00:00:25 #2714 [Verbose] > │ v186.[int v189] <- v206 │
00:00:25 #2715 [Verbose] > │ let v207 : uint64 = v189 + 1UL │
00:00:25 #2716 [Verbose] > │ v187.l0 <- v207 │
00:00:25 #2717 [Verbose] > │ () │
00:00:25 #2718 [Verbose] > │ let v208 : uint64 = System.Convert.ToUInt64 v186.Length │
00:00:25 #2719 [Verbose] > │ let v209 : UH5 = UH5_1 │
00:00:25 #2720 [Verbose] > │ let v210 : Mut3 = {l0 = 0UL; l1 = v209; l2 = 0} : Mut3 │
00:00:25 #2721 [Verbose] > │ while method22(v208, v210) do │
00:00:25 #2722 [Verbose] > │ let v212 : uint64 = v210.l0 │
00:00:25 #2723 [Verbose] > │ let struct (v213 : UH5, v214 : int32) = v210.l1, v210.l2 │
00:00:25 #2724 [Verbose] > │ let v215 : int64 = v186.[int v212] │
00:00:25 #2725 [Verbose] > │ let v216 : int32 = v214 + 1 │
00:00:25 #2726 [Verbose] > │ let v217 : uint64 = v212 + 1UL │
00:00:25 #2727 [Verbose] > │ let v218 : UH5 = UH5_0(v214, v215, v213) │
00:00:25 #2728 [Verbose] > │ v210.l0 <- v217 │
00:00:25 #2729 [Verbose] > │ v210.l1 <- v218 │
00:00:25 #2730 [Verbose] > │ v210.l2 <- v216 │
00:00:25 #2731 [Verbose] > │ () │
00:00:25 #2732 [Verbose] > │ let struct (v219 : UH5, v220 : int32) = v210.l1, v210.l2 │
00:00:25 #2733 [Verbose] > │ let v221 : UH5 = UH5_1 │
00:00:25 #2734 [Verbose] > │ let v222 : UH5 = method23(v219, v221) │
00:00:25 #2735 [Verbose] > │ let v223 : (struct (int32 * int64) []) = method24(v222) │
00:00:25 #2736 [Verbose] > │ let v224 : Map<int32, int64> = v223 |> Array.map (fun (struct (a, b)) -> │
00:00:25 #2737 [Verbose] > │ a, b) |> Map.ofArray │
00:00:25 #2738 [Verbose] > │ let v225 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:00:25 #2739 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v175)) │
00:00:25 #2740 [Verbose] > │ let v226 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2741 [Verbose] > │ while method4(v175, v226) do │
00:00:25 #2742 [Verbose] > │ let v228 : uint64 = v226.l0 │
00:00:25 #2743 [Verbose] > │ let struct (v229 : UH2, v230 : US0) = v162.[int v228] │
00:00:25 #2744 [Verbose] > │ let v231 : UH6 = UH6_1 │
00:00:25 #2745 [Verbose] > │ let v232 : int32 = 0 │
00:00:25 #2746 [Verbose] > │ let struct (v233 : UH6, v234 : int32) = method27(v229, v231, v232) │
00:00:25 #2747 [Verbose] > │ let v235 : UH6 = UH6_1 │
00:00:25 #2748 [Verbose] > │ let v236 : UH6 = method28(v233, v235) │
00:00:25 #2749 [Verbose] > │ let v237 : UH2 = UH2_1 │
00:00:25 #2750 [Verbose] > │ let v238 : UH2 = method29(v224, v236, v237) │
00:00:25 #2751 [Verbose] > │ let v239 : (string []) = method30(v238) │
00:00:25 #2752 [Verbose] > │ v225.[int v228] <- struct (v239, v230) │
00:00:25 #2753 [Verbose] > │ let v240 : uint64 = v228 + 1UL │
00:00:25 #2754 [Verbose] > │ v226.l0 <- v240 │
00:00:25 #2755 [Verbose] > │ () │
00:00:25 #2756 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2757 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v225.Length │
00:00:25 #2758 [Verbose] > │ let v242 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2759 [Verbose] > │ while method4(v241, v242) do │
00:00:25 #2760 [Verbose] > │ let v244 : uint64 = v242.l0 │
00:00:25 #2761 [Verbose] > │ let struct (v245 : (string []), v246 : US0) = v225.[int v244] │
00:00:25 #2762 [Verbose] > │ match v246 with │
00:00:25 #2763 [Verbose] > │ | US0_0 -> (* None *) │
00:00:25 #2764 [Verbose] > │ let mutable result = None │
00:00:25 #2765 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2766 [Verbose] > │ #if !WASM │
00:00:25 #2767 [Verbose] > │ () │
00:00:25 #2768 [Verbose] > │ #else │
00:00:25 #2769 [Verbose] > │ () │
00:00:25 #2770 [Verbose] > │ #endif │
00:00:25 #2771 [Verbose] > │ #else │
00:00:25 #2772 [Verbose] > │ System.Console.ResetColor () │
00:00:25 #2773 [Verbose] > │ () │
00:00:25 #2774 [Verbose] > │ #endif │
00:00:25 #2775 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2776 [Verbose] > │ result |> Option.get │
00:00:25 #2777 [Verbose] > │ () │
00:00:25 #2778 [Verbose] > │ | US0_1(v247) -> (* Some *) │
00:00:25 #2779 [Verbose] > │ let mutable result = None │
00:00:25 #2780 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2781 [Verbose] > │ #if !WASM │
00:00:25 #2782 [Verbose] > │ () │
00:00:25 #2783 [Verbose] > │ #else │
00:00:25 #2784 [Verbose] > │ () │
00:00:25 #2785 [Verbose] > │ #endif │
00:00:25 #2786 [Verbose] > │ #else │
00:00:25 #2787 [Verbose] > │ System.Console.ForegroundColor <- v247 │
00:00:25 #2788 [Verbose] > │ () │
00:00:25 #2789 [Verbose] > │ #endif │
00:00:25 #2790 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2791 [Verbose] > │ result |> Option.get │
00:00:25 #2792 [Verbose] > │ () │
00:00:25 #2793 [Verbose] > │ let v248 : string = "\t| " │
00:00:25 #2794 [Verbose] > │ let v249 : string = System.String.Join (v248, v245) │
00:00:25 #2795 [Verbose] > │ System.Console.WriteLine v249 │
00:00:25 #2796 [Verbose] > │ let mutable result = None │
00:00:25 #2797 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:00:25 #2798 [Verbose] > │ #if !WASM │
00:00:25 #2799 [Verbose] > │ () │
00:00:25 #2800 [Verbose] > │ #else │
00:00:25 #2801 [Verbose] > │ () │
00:00:25 #2802 [Verbose] > │ #endif │
00:00:25 #2803 [Verbose] > │ #else │
00:00:25 #2804 [Verbose] > │ System.Console.ResetColor () │
00:00:25 #2805 [Verbose] > │ () │
00:00:25 #2806 [Verbose] > │ #endif │
00:00:25 #2807 [Verbose] > │ |> fun x -> result <- Some x │
00:00:25 #2808 [Verbose] > │ result |> Option.get │
00:00:25 #2809 [Verbose] > │ let v250 : uint64 = v244 + 1UL │
00:00:25 #2810 [Verbose] > │ v242.l0 <- v250 │
00:00:25 #2811 [Verbose] > │ () │
00:00:25 #2812 [Verbose] > │ let v251 : ((float []) []) = Array.zeroCreate<(float [])> │
00:00:25 #2813 [Verbose] > │ (System.Convert.ToInt32(v87)) │
00:00:25 #2814 [Verbose] > │ let v252 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2815 [Verbose] > │ while method4(v87, v252) do │
00:00:25 #2816 [Verbose] > │ let v254 : uint64 = v252.l0 │
00:00:25 #2817 [Verbose] > │ let struct (v255 : string, v256 : string, v257 : string, v258 : │
00:00:25 #2818 [Verbose] > │ (int64 [])) = v16.[int v254] │
00:00:25 #2819 [Verbose] > │ let v259 : (int64 -> float) = float │
00:00:25 #2820 [Verbose] > │ let v260 : uint64 = System.Convert.ToUInt64 v258.Length │
00:00:25 #2821 [Verbose] > │ let v261 : (float []) = Array.zeroCreate<float> │
00:00:25 #2822 [Verbose] > │ (System.Convert.ToInt32(v260)) │
00:00:25 #2823 [Verbose] > │ let v262 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2824 [Verbose] > │ while method4(v260, v262) do │
00:00:25 #2825 [Verbose] > │ let v264 : uint64 = v262.l0 │
00:00:25 #2826 [Verbose] > │ let v265 : int64 = v258.[int v264] │
00:00:25 #2827 [Verbose] > │ let v266 : float = v259 v265 │
00:00:25 #2828 [Verbose] > │ v261.[int v264] <- v266 │
00:00:25 #2829 [Verbose] > │ let v267 : uint64 = v264 + 1UL │
00:00:25 #2830 [Verbose] > │ v262.l0 <- v267 │
00:00:25 #2831 [Verbose] > │ () │
00:00:25 #2832 [Verbose] > │ v251.[int v254] <- v261 │
00:00:25 #2833 [Verbose] > │ let v268 : uint64 = v254 + 1UL │
00:00:25 #2834 [Verbose] > │ v252.l0 <- v268 │
00:00:25 #2835 [Verbose] > │ () │
00:00:25 #2836 [Verbose] > │ let v269 : ((float []) []) = v251 |> Array.transpose │
00:00:25 #2837 [Verbose] > │ let v270 : uint64 = System.Convert.ToUInt64 v269.Length │
00:00:25 #2838 [Verbose] > │ let v271 : (float []) = Array.zeroCreate<float> │
00:00:25 #2839 [Verbose] > │ (System.Convert.ToInt32(v270)) │
00:00:25 #2840 [Verbose] > │ let v272 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2841 [Verbose] > │ while method4(v270, v272) do │
00:00:25 #2842 [Verbose] > │ let v274 : uint64 = v272.l0 │
00:00:25 #2843 [Verbose] > │ let v275 : (float []) = v269.[int v274] │
00:00:25 #2844 [Verbose] > │ let v276 : float = v275 |> Array.average │
00:00:25 #2845 [Verbose] > │ v271.[int v274] <- v276 │
00:00:25 #2846 [Verbose] > │ let v277 : uint64 = v274 + 1UL │
00:00:25 #2847 [Verbose] > │ v272.l0 <- v277 │
00:00:25 #2848 [Verbose] > │ () │
00:00:25 #2849 [Verbose] > │ let v278 : (float -> int64) = int64 │
00:00:25 #2850 [Verbose] > │ let v279 : uint64 = System.Convert.ToUInt64 v271.Length │
00:00:25 #2851 [Verbose] > │ let v280 : (int64 []) = Array.zeroCreate<int64> │
00:00:25 #2852 [Verbose] > │ (System.Convert.ToInt32(v279)) │
00:00:25 #2853 [Verbose] > │ let v281 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2854 [Verbose] > │ while method4(v279, v281) do │
00:00:25 #2855 [Verbose] > │ let v283 : uint64 = v281.l0 │
00:00:25 #2856 [Verbose] > │ let v284 : float = v271.[int v283] │
00:00:25 #2857 [Verbose] > │ let v285 : int64 = v278 v284 │
00:00:25 #2858 [Verbose] > │ v280.[int v283] <- v285 │
00:00:25 #2859 [Verbose] > │ let v286 : uint64 = v283 + 1UL │
00:00:25 #2860 [Verbose] > │ v281.l0 <- v286 │
00:00:25 #2861 [Verbose] > │ () │
00:00:25 #2862 [Verbose] > │ let v287 : uint64 = System.Convert.ToUInt64 v280.Length │
00:00:25 #2863 [Verbose] > │ let v288 : UH5 = UH5_1 │
00:00:25 #2864 [Verbose] > │ let v289 : Mut3 = {l0 = 0UL; l1 = v288; l2 = 0} : Mut3 │
00:00:25 #2865 [Verbose] > │ while method22(v287, v289) do │
00:00:25 #2866 [Verbose] > │ let v291 : uint64 = v289.l0 │
00:00:25 #2867 [Verbose] > │ let struct (v292 : UH5, v293 : int32) = v289.l1, v289.l2 │
00:00:25 #2868 [Verbose] > │ let v294 : int64 = v280.[int v291] │
00:00:25 #2869 [Verbose] > │ let v295 : int32 = v293 + 1 │
00:00:25 #2870 [Verbose] > │ let v296 : uint64 = v291 + 1UL │
00:00:25 #2871 [Verbose] > │ let v297 : UH5 = UH5_0(v293, v294, v292) │
00:00:25 #2872 [Verbose] > │ v289.l0 <- v296 │
00:00:25 #2873 [Verbose] > │ v289.l1 <- v297 │
00:00:25 #2874 [Verbose] > │ v289.l2 <- v295 │
00:00:25 #2875 [Verbose] > │ () │
00:00:25 #2876 [Verbose] > │ let struct (v298 : UH5, v299 : int32) = v289.l1, v289.l2 │
00:00:25 #2877 [Verbose] > │ let v300 : UH5 = UH5_1 │
00:00:25 #2878 [Verbose] > │ let v301 : UH5 = method23(v298, v300) │
00:00:25 #2879 [Verbose] > │ let v302 : (struct (int32 * int64) []) = method33(v301) │
00:00:25 #2880 [Verbose] > │ System.Console.WriteLine v2 │
00:00:25 #2881 [Verbose] > │ let v303 : string = "Average Ranking " │
00:00:25 #2882 [Verbose] > │ System.Console.WriteLine v303 │
00:00:25 #2883 [Verbose] > │ let v304 : (struct (int32 * int64) -> int64) = closure5() │
00:00:25 #2884 [Verbose] > │ let v305 : (struct (int32 * int64) []) = v302 |> Array.sortBy v304 │
00:00:25 #2885 [Verbose] > │ let v306 : uint64 = System.Convert.ToUInt64 v305.Length │
00:00:25 #2886 [Verbose] > │ let v307 : Mut0 = {l0 = 0UL} : Mut0 │
00:00:25 #2887 [Verbose] > │ while method4(v306, v307) do │
00:00:25 #2888 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:00:25 #2889 [Verbose] > │ let struct (v310 : int32, v311 : int64) = v305.[int v309] │
00:00:25 #2890 [Verbose] > │ let v312 : string = $"Test case %d{v310 + 1}. Average Time: %A{v311} │
00:00:25 #2891 [Verbose] > │ " │
00:00:25 #2892 [Verbose] > │ System.Console.WriteLine v312 │
00:00:25 #2893 [Verbose] > │ let v313 : uint64 = v309 + 1UL │
00:00:25 #2894 [Verbose] > │ v307.l0 <- v313 │
00:00:25 #2895 [Verbose] > │ () │
00:00:25 #2896 [Verbose] > │ () │
00:00:25 #2897 [Verbose] > │ method0() │
00:00:25 #2898 [Verbose] > │ │
00:00:25 #2899 [Verbose] > │ │
00:00:25 #2900 [Verbose] > │ │
00:00:25 #2901 [Verbose] > │ Test: v0 │
00:00:25 #2902 [Verbose] > │ │
00:00:25 #2903 [Verbose] > │ Solution: 0.0 │
00:00:25 #2904 [Verbose] > │ Test case 1. A. Time: 25 │
00:00:25 #2905 [Verbose] > │ │
00:00:25 #2906 [Verbose] > │ Solution: 2.0 │
00:00:25 #2907 [Verbose] > │ Test case 1. A. Time: 11 │
00:00:25 #2908 [Verbose] > │ │
00:00:25 #2909 [Verbose] > │ Solution: 5.0 │
00:00:25 #2910 [Verbose] > │ Test case 1. A. Time: 11 │
00:00:25 #2911 [Verbose] > │ │
00:00:25 #2912 [Verbose] > │ Input | Expected | Result | Best │
00:00:25 #2913 [Verbose] > │ --- | --- | --- | --- │
00:00:25 #2914 [Verbose] > │ 0.0 | 1.0 | 1.0 | struct (1L, 25L) │
00:00:25 #2915 [Verbose] > │ 2.0 | 3.0 | 3.0 | struct (1L, 11L) │
00:00:25 #2916 [Verbose] > │ 5.0 | 6.0 | 6.0 | struct (1L, 11L) │
00:00:25 #2917 [Verbose] > │ │
00:00:25 #2918 [Verbose] > │ Average Ranking │
00:00:25 #2919 [Verbose] > │ Test case 1. Average Time: 15L │
00:00:25 #2920 [Verbose] > │ │
00:00:25 #2921 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2922 [Verbose] > [NbConvertApp] Converting notebook benchmark.dib.ipynb to html
00:00:27 #2923 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:27 #2924 [Verbose] > validate(nb)
00:00:28 #2925 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:28 #2926 [Verbose] > return _pygments_highlight(
00:00:28 #2927 [Verbose] > [NbConvertApp] Writing 406227 bytes to benchmark.dib.html
00:00:29 #2928 [Debug] executeAsync / exitCode: 0 / output.Length: 221255
00:00:29 #2929 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 stream.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # stream │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 3.95s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > union rec stream t =
00:00:06 #22 [Verbose] > | StreamCons : t * (() -> stream t)
00:00:06 #23 [Verbose] > | StreamNil
00:00:06 #24 [Verbose] >
00:00:06 #25 [Verbose] > ╭─[ 223.11ms - stdout ]────────────────────────────────────────────────────────╮
00:00:06 #26 [Verbose] > │ () │
00:00:06 #27 [Verbose] > │ │
00:00:06 #28 [Verbose] > │ │
00:00:06 #29 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #30 [Verbose] >
00:00:06 #31 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 #32 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 #33 [Verbose] > │ ## fold │
00:00:06 #34 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #35 [Verbose] >
00:00:06 #36 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #37 [Verbose] > inl fold fn init s =
00:00:06 #38 [Verbose] > inl rec body acc = function
00:00:06 #39 [Verbose] > | StreamCons (st, fn') => loop (fn acc st) (fn' ())
00:00:06 #40 [Verbose] > | StreamNil => acc
00:00:06 #41 [Verbose] > and inl loop acc = join_body body acc
00:00:06 #42 [Verbose] > loop init s
00:00:07 #43 [Verbose] >
00:00:07 #44 [Verbose] > ╭─[ 174.96ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #45 [Verbose] > │ () │
00:00:07 #46 [Verbose] > │ │
00:00:07 #47 [Verbose] > │ │
00:00:07 #48 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #49 [Verbose] >
00:00:07 #50 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #51 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #52 [Verbose] > │ ## fold_back │
00:00:07 #53 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #54 [Verbose] >
00:00:07 #55 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #56 [Verbose] > inl fold_back fn s init =
00:00:07 #57 [Verbose] > inl rec body acc = function
00:00:07 #58 [Verbose] > | StreamCons (st, fn') => fn st (loop acc (fn' ()))
00:00:07 #59 [Verbose] > | StreamNil => acc
00:00:07 #60 [Verbose] > and inl loop acc = join_body body acc
00:00:07 #61 [Verbose] > loop init s
00:00:07 #62 [Verbose] >
00:00:07 #63 [Verbose] > ╭─[ 228.28ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #64 [Verbose] > │ () │
00:00:07 #65 [Verbose] > │ │
00:00:07 #66 [Verbose] > │ │
00:00:07 #67 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #68 [Verbose] >
00:00:07 #69 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #70 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #71 [Verbose] > │ ## to_list │
00:00:07 #72 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #73 [Verbose] >
00:00:07 #74 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #75 [Verbose] > inl to_list s =
00:00:07 #76 [Verbose] > (s, [[]])
00:00:07 #77 [Verbose] > ||> fold_back fun x acc =>
00:00:07 #78 [Verbose] > x :: acc
00:00:07 #79 [Verbose] >
00:00:07 #80 [Verbose] > ╭─[ 260.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #81 [Verbose] > │ () │
00:00:07 #82 [Verbose] > │ │
00:00:07 #83 [Verbose] > │ │
00:00:07 #84 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #85 [Verbose] >
00:00:07 #86 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #87 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #88 [Verbose] > │ ## rev │
00:00:07 #89 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #90 [Verbose] >
00:00:07 #91 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #92 [Verbose] > inl rev s =
00:00:07 #93 [Verbose] > (StreamNil, s)
00:00:07 #94 [Verbose] > ||> fold fun s x =>
00:00:07 #95 [Verbose] > StreamCons (x, fun () => s)
00:00:07 #96 [Verbose] >
00:00:07 #97 [Verbose] > ╭─[ 201.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #98 [Verbose] > │ () │
00:00:07 #99 [Verbose] > │ │
00:00:07 #100 [Verbose] > │ │
00:00:07 #101 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #102 [Verbose] >
00:00:07 #103 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #104 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #105 [Verbose] > │ ## from_list │
00:00:07 #106 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #107 [Verbose] >
00:00:07 #108 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #109 [Verbose] > inl from_list list =
00:00:07 #110 [Verbose] > (list, StreamNil)
00:00:07 #111 [Verbose] > ||> listm.foldBack fun x acc =>
00:00:07 #112 [Verbose] > StreamCons (x, fun () => acc)
00:00:08 #113 [Verbose] >
00:00:08 #114 [Verbose] > ╭─[ 213.04ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #115 [Verbose] > │ () │
00:00:08 #116 [Verbose] > │ │
00:00:08 #117 [Verbose] > │ │
00:00:08 #118 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #119 [Verbose] >
00:00:08 #120 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #121 [Verbose] > // // test
00:00:08 #122 [Verbose] >
00:00:08 #123 [Verbose] > listm.init 3i32 id
00:00:08 #124 [Verbose] > |> from_list
00:00:08 #125 [Verbose] > |> rev
00:00:08 #126 [Verbose] > |> to_list
00:00:08 #127 [Verbose] > |> _assert_eq [[ 2; 1; 0 ]]
00:00:09 #128 [Verbose] >
00:00:09 #129 [Verbose] > ╭─[ 1.10s - stdout ]───────────────────────────────────────────────────────────╮
00:00:09 #130 [Verbose] > │ type UH0 = │
00:00:09 #131 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:09 #132 [Verbose] > │ | UH0_1 │
00:00:09 #133 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #134 [Verbose] > │ true │
00:00:09 #135 [Verbose] > │ and method0 () : unit = │
00:00:09 #136 [Verbose] > │ let v18 : bool = method1() │
00:00:09 #137 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:09 #138 [Verbose] > │ let v20 : UH0 = UH0_0(0, v19) │
00:00:09 #139 [Verbose] > │ let v21 : UH0 = UH0_0(1, v20) │
00:00:09 #140 [Verbose] > │ let v22 : UH0 = UH0_0(2, v21) │
00:00:09 #141 [Verbose] > │ let v23 : UH0 = UH0_1 │
00:00:09 #142 [Verbose] > │ let v24 : UH0 = UH0_0(0, v23) │
00:00:09 #143 [Verbose] > │ let v25 : UH0 = UH0_0(1, v24) │
00:00:09 #144 [Verbose] > │ let v26 : UH0 = UH0_0(2, v25) │
00:00:09 #145 [Verbose] > │ let v27 : string = $"__expect / actual: %A{v22} / expected: %A{v26}" │
00:00:09 #146 [Verbose] > │ let v28 : bool = v18 = false │
00:00:09 #147 [Verbose] > │ if v28 then │
00:00:09 #148 [Verbose] > │ failwith<unit> v27 │
00:00:09 #149 [Verbose] > │ method0() │
00:00:09 #150 [Verbose] > │ │
00:00:09 #151 [Verbose] > │ │
00:00:09 #152 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #153 [Verbose] >
00:00:09 #154 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #155 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #156 [Verbose] > │ ## try_item │
00:00:09 #157 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #158 [Verbose] >
00:00:09 #159 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #160 [Verbose] > inl try_item i s =
00:00:09 #161 [Verbose] > inl rec body i = function
00:00:09 #162 [Verbose] > | StreamCons (x, _) when i <= 0 => Some x
00:00:09 #163 [Verbose] > | StreamCons (_, fn) => loop (i - 1) (fn ())
00:00:09 #164 [Verbose] > | StreamNil => None
00:00:09 #165 [Verbose] > and inl loop acc s' =
00:00:09 #166 [Verbose] > match var_is acc, var_is s' with
00:00:09 #167 [Verbose] > | false, false => body acc s'
00:00:09 #168 [Verbose] > | _ =>
00:00:09 #169 [Verbose] > inl acc = dyn acc
00:00:09 #170 [Verbose] > inl s' = dyn s'
00:00:09 #171 [Verbose] > join body acc s'
00:00:09 #172 [Verbose] > loop i s
00:00:09 #173 [Verbose] >
00:00:09 #174 [Verbose] > inl item i =
00:00:09 #175 [Verbose] > try_item i >> optionm.value
00:00:09 #176 [Verbose] >
00:00:09 #177 [Verbose] > ╭─[ 243.44ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #178 [Verbose] > │ () │
00:00:09 #179 [Verbose] > │ │
00:00:09 #180 [Verbose] > │ │
00:00:09 #181 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #182 [Verbose] >
00:00:09 #183 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #184 [Verbose] > // // test
00:00:09 #185 [Verbose] >
00:00:09 #186 [Verbose] > listm.init 10i32 id
00:00:09 #187 [Verbose] > |> from_list
00:00:09 #188 [Verbose] > |> item 9i32
00:00:09 #189 [Verbose] > |> _assert_eq 9
00:00:09 #190 [Verbose] >
00:00:09 #191 [Verbose] > ╭─[ 186.06ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #192 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #193 [Verbose] > │ true │
00:00:09 #194 [Verbose] > │ and method0 () : unit = │
00:00:09 #195 [Verbose] > │ let v0 : bool = method1() │
00:00:09 #196 [Verbose] > │ let v1 : string = $"__expect / actual: %A{9} / expected: %A{9}" │
00:00:09 #197 [Verbose] > │ let v2 : bool = v0 = false │
00:00:09 #198 [Verbose] > │ if v2 then │
00:00:09 #199 [Verbose] > │ failwith<unit> v1 │
00:00:09 #200 [Verbose] > │ method0() │
00:00:09 #201 [Verbose] > │ │
00:00:09 #202 [Verbose] > │ │
00:00:09 #203 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #204 [Verbose] >
00:00:09 #205 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #206 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #207 [Verbose] > │ ## new_infinite_stream │
00:00:09 #208 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #209 [Verbose] >
00:00:09 #210 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #211 [Verbose] > inl new_infinite_stream fn =
00:00:09 #212 [Verbose] > inl rec loop n =
00:00:09 #213 [Verbose] > StreamCons (fn n, fun () => loop (n + 1))
00:00:09 #214 [Verbose] > loop 0
00:00:09 #215 [Verbose] >
00:00:09 #216 [Verbose] > inl new_infinite_stream_ fn =
00:00:09 #217 [Verbose] > let rec loop n =
00:00:09 #218 [Verbose] > StreamCons (fn n, fun () => loop (n + 1))
00:00:09 #219 [Verbose] > loop 0
00:00:09 #220 [Verbose] >
00:00:09 #221 [Verbose] > ╭─[ 220.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #222 [Verbose] > │ () │
00:00:09 #223 [Verbose] > │ │
00:00:09 #224 [Verbose] > │ │
00:00:09 #225 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #226 [Verbose] >
00:00:09 #227 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #228 [Verbose] > // // test
00:00:09 #229 [Verbose] >
00:00:09 #230 [Verbose] > new_infinite_stream print_and_return
00:00:09 #231 [Verbose] > |> item 4i32
00:00:09 #232 [Verbose] > |> _assert_eq 4i32
00:00:10 #233 [Verbose] >
00:00:10 #234 [Verbose] > ╭─[ 293.71ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #235 [Verbose] > │ let rec method1 () : bool = │
00:00:10 #236 [Verbose] > │ true │
00:00:10 #237 [Verbose] > │ and method0 () : unit = │
00:00:10 #238 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:10 #239 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:10 #240 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:10 #241 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:10 #242 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:10 #243 [Verbose] > │ let v0 : bool = method1() │
00:00:10 #244 [Verbose] > │ let v1 : string = $"__expect / actual: %A{4} / expected: %A{4}" │
00:00:10 #245 [Verbose] > │ let v2 : bool = v0 = false │
00:00:10 #246 [Verbose] > │ if v2 then │
00:00:10 #247 [Verbose] > │ failwith<unit> v1 │
00:00:10 #248 [Verbose] > │ method0() │
00:00:10 #249 [Verbose] > │ │
00:00:10 #250 [Verbose] > │ print_and_return / x: 0 │
00:00:10 #251 [Verbose] > │ print_and_return / x: 1 │
00:00:10 #252 [Verbose] > │ print_and_return / x: 2 │
00:00:10 #253 [Verbose] > │ print_and_return / x: 3 │
00:00:10 #254 [Verbose] > │ print_and_return / x: 4 │
00:00:10 #255 [Verbose] > │ │
00:00:10 #256 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #257 [Verbose] >
00:00:10 #258 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #259 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #260 [Verbose] > │ ## new_finite_stream │
00:00:10 #261 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #262 [Verbose] >
00:00:10 #263 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #264 [Verbose] > inl new_finite_stream fn max =
00:00:10 #265 [Verbose] > inl rec loop n =
00:00:10 #266 [Verbose] > if n >= max
00:00:10 #267 [Verbose] > then StreamNil
00:00:10 #268 [Verbose] > else StreamCons (fn n, fun () => loop (n + 1))
00:00:10 #269 [Verbose] > loop 0
00:00:10 #270 [Verbose] >
00:00:10 #271 [Verbose] > ╭─[ 345.87ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #272 [Verbose] > │ () │
00:00:10 #273 [Verbose] > │ │
00:00:10 #274 [Verbose] > │ │
00:00:10 #275 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #276 [Verbose] >
00:00:10 #277 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #278 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #279 [Verbose] > │ ## memoize │
00:00:10 #280 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #281 [Verbose] >
00:00:10 #282 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #283 [Verbose] > union memoized_stream t =
00:00:10 #284 [Verbose] > | NotComputed : () -> stream t
00:00:10 #285 [Verbose] > | Computed : stream t
00:00:10 #286 [Verbose] >
00:00:10 #287 [Verbose] > inl memoize s =
00:00:10 #288 [Verbose] > inl rec body s =
00:00:10 #289 [Verbose] > inl state = mut (NotComputed s)
00:00:10 #290 [Verbose] > fun () =>
00:00:10 #291 [Verbose] > match *state with
00:00:10 #292 [Verbose] > | Computed x => x
00:00:10 #293 [Verbose] > | NotComputed fn =>
00:00:10 #294 [Verbose] > inl new_state =
00:00:10 #295 [Verbose] > match fn () with
00:00:10 #296 [Verbose] > | StreamNil => StreamNil
00:00:10 #297 [Verbose] > | StreamCons (x, fn) => StreamCons (x, loop fn)
00:00:10 #298 [Verbose] > state <- Computed new_state
00:00:10 #299 [Verbose] > new_state
00:00:10 #300 [Verbose] > and inl loop s' = join_body_unit body s s'
00:00:10 #301 [Verbose] > loop (fun () => s)
00:00:10 #302 [Verbose] >
00:00:10 #303 [Verbose] > ╭─[ 198.02ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #304 [Verbose] > │ () │
00:00:10 #305 [Verbose] > │ │
00:00:10 #306 [Verbose] > │ │
00:00:10 #307 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #308 [Verbose] >
00:00:10 #309 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #310 [Verbose] > // // test
00:00:10 #311 [Verbose] >
00:00:10 #312 [Verbose] > inl memo_stream = new_finite_stream print_and_return 10 |> memoize
00:00:10 #313 [Verbose] >
00:00:10 #314 [Verbose] > memo_stream ()
00:00:10 #315 [Verbose] > |> item 3i32
00:00:10 #316 [Verbose] > |> _assert_eq 3i32
00:00:10 #317 [Verbose] >
00:00:10 #318 [Verbose] > memo_stream ()
00:00:10 #319 [Verbose] > |> item 5i32
00:00:10 #320 [Verbose] > |> _assert_eq 5i32
00:00:11 #321 [Verbose] >
00:00:11 #322 [Verbose] > ╭─[ 653.95ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #323 [Verbose] > │ type UH0 = │
00:00:11 #324 [Verbose] > │ | UH0_0 of int32 * (unit -> UH0) │
00:00:11 #325 [Verbose] > │ | UH0_1 │
00:00:11 #326 [Verbose] > │ and [<Struct>] US0 = │
00:00:11 #327 [Verbose] > │ | US0_0 of f0_0 : UH0 │
00:00:11 #328 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH0) │
00:00:11 #329 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:11 #330 [Verbose] > │ and [<Struct>] US1 = │
00:00:11 #331 [Verbose] > │ | US1_0 │
00:00:11 #332 [Verbose] > │ | US1_1 of f1_0 : int32 │
00:00:11 #333 [Verbose] > │ let rec closure10 () () : UH0 = │
00:00:11 #334 [Verbose] > │ UH0_1 │
00:00:11 #335 [Verbose] > │ and closure9 () () : UH0 = │
00:00:11 #336 [Verbose] > │ printfn $"print_and_return / x: {9}" │
00:00:11 #337 [Verbose] > │ let v0 : (unit -> UH0) = closure10() │
00:00:11 #338 [Verbose] > │ UH0_0(9, v0) │
00:00:11 #339 [Verbose] > │ and closure8 () () : UH0 = │
00:00:11 #340 [Verbose] > │ printfn $"print_and_return / x: {8}" │
00:00:11 #341 [Verbose] > │ let v0 : (unit -> UH0) = closure9() │
00:00:11 #342 [Verbose] > │ UH0_0(8, v0) │
00:00:11 #343 [Verbose] > │ and closure7 () () : UH0 = │
00:00:11 #344 [Verbose] > │ printfn $"print_and_return / x: {7}" │
00:00:11 #345 [Verbose] > │ let v0 : (unit -> UH0) = closure8() │
00:00:11 #346 [Verbose] > │ UH0_0(7, v0) │
00:00:11 #347 [Verbose] > │ and closure6 () () : UH0 = │
00:00:11 #348 [Verbose] > │ printfn $"print_and_return / x: {6}" │
00:00:11 #349 [Verbose] > │ let v0 : (unit -> UH0) = closure7() │
00:00:11 #350 [Verbose] > │ UH0_0(6, v0) │
00:00:11 #351 [Verbose] > │ and closure5 () () : UH0 = │
00:00:11 #352 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:11 #353 [Verbose] > │ let v0 : (unit -> UH0) = closure6() │
00:00:11 #354 [Verbose] > │ UH0_0(5, v0) │
00:00:11 #355 [Verbose] > │ and closure4 () () : UH0 = │
00:00:11 #356 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:11 #357 [Verbose] > │ let v0 : (unit -> UH0) = closure5() │
00:00:11 #358 [Verbose] > │ UH0_0(4, v0) │
00:00:11 #359 [Verbose] > │ and closure3 () () : UH0 = │
00:00:11 #360 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:11 #361 [Verbose] > │ let v0 : (unit -> UH0) = closure4() │
00:00:11 #362 [Verbose] > │ UH0_0(3, v0) │
00:00:11 #363 [Verbose] > │ and closure2 () () : UH0 = │
00:00:11 #364 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:11 #365 [Verbose] > │ let v0 : (unit -> UH0) = closure3() │
00:00:11 #366 [Verbose] > │ UH0_0(2, v0) │
00:00:11 #367 [Verbose] > │ and closure1 () () : UH0 = │
00:00:11 #368 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:11 #369 [Verbose] > │ let v0 : (unit -> UH0) = closure2() │
00:00:11 #370 [Verbose] > │ UH0_0(1, v0) │
00:00:11 #371 [Verbose] > │ and closure0 () () : UH0 = │
00:00:11 #372 [Verbose] > │ let v0 : (unit -> UH0) = closure1() │
00:00:11 #373 [Verbose] > │ UH0_0(0, v0) │
00:00:11 #374 [Verbose] > │ and closure11 (v0 : Mut0) () : UH0 = │
00:00:11 #375 [Verbose] > │ let v1 : US0 = v0.l0 │
00:00:11 #376 [Verbose] > │ match v1 with │
00:00:11 #377 [Verbose] > │ | US0_0(v2) -> (* Computed *) │
00:00:11 #378 [Verbose] > │ v2 │
00:00:11 #379 [Verbose] > │ | US0_1(v3) -> (* NotComputed *) │
00:00:11 #380 [Verbose] > │ let v4 : UH0 = v3 () │
00:00:11 #381 [Verbose] > │ let v13 : UH0 = │
00:00:11 #382 [Verbose] > │ match v4 with │
00:00:11 #383 [Verbose] > │ | UH0_0(v6, v7) -> (* StreamCons *) │
00:00:11 #384 [Verbose] > │ let v8 : US0 = US0_1(v7) │
00:00:11 #385 [Verbose] > │ let v9 : Mut0 = {l0 = v8} : Mut0 │
00:00:11 #386 [Verbose] > │ let v10 : (unit -> UH0) = closure11(v9) │
00:00:11 #387 [Verbose] > │ UH0_0(v6, v10) │
00:00:11 #388 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #389 [Verbose] > │ UH0_1 │
00:00:11 #390 [Verbose] > │ let v14 : US0 = US0_0(v13) │
00:00:11 #391 [Verbose] > │ v0.l0 <- v14 │
00:00:11 #392 [Verbose] > │ v13 │
00:00:11 #393 [Verbose] > │ and method1 (v0 : int32, v1 : UH0) : US1 = │
00:00:11 #394 [Verbose] > │ match v1 with │
00:00:11 #395 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:11 #396 [Verbose] > │ let v4 : bool = v0 <= 0 │
00:00:11 #397 [Verbose] > │ if v4 then │
00:00:11 #398 [Verbose] > │ US1_1(v2) │
00:00:11 #399 [Verbose] > │ else │
00:00:11 #400 [Verbose] > │ let v6 : int32 = v0 - 1 │
00:00:11 #401 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:11 #402 [Verbose] > │ method1(v6, v7) │
00:00:11 #403 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #404 [Verbose] > │ US1_0 │
00:00:11 #405 [Verbose] > │ and method2 (v0 : bool) : bool = │
00:00:11 #406 [Verbose] > │ v0 │
00:00:11 #407 [Verbose] > │ and method0 () : unit = │
00:00:11 #408 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:11 #409 [Verbose] > │ let v0 : (unit -> UH0) = closure0() │
00:00:11 #410 [Verbose] > │ let v1 : US0 = US0_1(v0) │
00:00:11 #411 [Verbose] > │ let v2 : Mut0 = {l0 = v1} : Mut0 │
00:00:11 #412 [Verbose] > │ let v3 : US0 = v2.l0 │
00:00:11 #413 [Verbose] > │ let v18 : UH0 = │
00:00:11 #414 [Verbose] > │ match v3 with │
00:00:11 #415 [Verbose] > │ | US0_0(v4) -> (* Computed *) │
00:00:11 #416 [Verbose] > │ v4 │
00:00:11 #417 [Verbose] > │ | US0_1(v5) -> (* NotComputed *) │
00:00:11 #418 [Verbose] > │ let v6 : UH0 = v5 () │
00:00:11 #419 [Verbose] > │ let v15 : UH0 = │
00:00:11 #420 [Verbose] > │ match v6 with │
00:00:11 #421 [Verbose] > │ | UH0_0(v8, v9) -> (* StreamCons *) │
00:00:11 #422 [Verbose] > │ let v10 : US0 = US0_1(v9) │
00:00:11 #423 [Verbose] > │ let v11 : Mut0 = {l0 = v10} : Mut0 │
00:00:11 #424 [Verbose] > │ let v12 : (unit -> UH0) = closure11(v11) │
00:00:11 #425 [Verbose] > │ UH0_0(v8, v12) │
00:00:11 #426 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #427 [Verbose] > │ UH0_1 │
00:00:11 #428 [Verbose] > │ let v16 : US0 = US0_0(v15) │
00:00:11 #429 [Verbose] > │ v2.l0 <- v16 │
00:00:11 #430 [Verbose] > │ v15 │
00:00:11 #431 [Verbose] > │ let v19 : int32 = 3 │
00:00:11 #432 [Verbose] > │ let v20 : US1 = method1(v19, v18) │
00:00:11 #433 [Verbose] > │ let v24 : int32 = │
00:00:11 #434 [Verbose] > │ match v20 with │
00:00:11 #435 [Verbose] > │ | US1_0 -> (* None *) │
00:00:11 #436 [Verbose] > │ failwith<int32> "Option does not have a value." │
00:00:11 #437 [Verbose] > │ | US1_1(v21) -> (* Some *) │
00:00:11 #438 [Verbose] > │ v21 │
00:00:11 #439 [Verbose] > │ let v25 : bool = v24 = 3 │
00:00:11 #440 [Verbose] > │ let v26 : bool = method2(v25) │
00:00:11 #441 [Verbose] > │ let v27 : string = $"__expect / actual: %A{v24} / expected: %A{3}" │
00:00:11 #442 [Verbose] > │ let v28 : bool = v26 = false │
00:00:11 #443 [Verbose] > │ if v28 then │
00:00:11 #444 [Verbose] > │ failwith<unit> v27 │
00:00:11 #445 [Verbose] > │ let v29 : US0 = v2.l0 │
00:00:11 #446 [Verbose] > │ let v44 : UH0 = │
00:00:11 #447 [Verbose] > │ match v29 with │
00:00:11 #448 [Verbose] > │ | US0_0(v30) -> (* Computed *) │
00:00:11 #449 [Verbose] > │ v30 │
00:00:11 #450 [Verbose] > │ | US0_1(v31) -> (* NotComputed *) │
00:00:11 #451 [Verbose] > │ let v32 : UH0 = v31 () │
00:00:11 #452 [Verbose] > │ let v41 : UH0 = │
00:00:11 #453 [Verbose] > │ match v32 with │
00:00:11 #454 [Verbose] > │ | UH0_0(v34, v35) -> (* StreamCons *) │
00:00:11 #455 [Verbose] > │ let v36 : US0 = US0_1(v35) │
00:00:11 #456 [Verbose] > │ let v37 : Mut0 = {l0 = v36} : Mut0 │
00:00:11 #457 [Verbose] > │ let v38 : (unit -> UH0) = closure11(v37) │
00:00:11 #458 [Verbose] > │ UH0_0(v34, v38) │
00:00:11 #459 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #460 [Verbose] > │ UH0_1 │
00:00:11 #461 [Verbose] > │ let v42 : US0 = US0_0(v41) │
00:00:11 #462 [Verbose] > │ v2.l0 <- v42 │
00:00:11 #463 [Verbose] > │ v41 │
00:00:11 #464 [Verbose] > │ let v45 : int32 = 5 │
00:00:11 #465 [Verbose] > │ let v46 : US1 = method1(v45, v44) │
00:00:11 #466 [Verbose] > │ let v50 : int32 = │
00:00:11 #467 [Verbose] > │ match v46 with │
00:00:11 #468 [Verbose] > │ | US1_0 -> (* None *) │
00:00:11 #469 [Verbose] > │ failwith<int32> "Option does not have a value." │
00:00:11 #470 [Verbose] > │ | US1_1(v47) -> (* Some *) │
00:00:11 #471 [Verbose] > │ v47 │
00:00:11 #472 [Verbose] > │ let v51 : bool = v50 = 5 │
00:00:11 #473 [Verbose] > │ let v52 : bool = method2(v51) │
00:00:11 #474 [Verbose] > │ let v53 : string = $"__expect / actual: %A{v50} / expected: %A{5}" │
00:00:11 #475 [Verbose] > │ let v54 : bool = v52 = false │
00:00:11 #476 [Verbose] > │ if v54 then │
00:00:11 #477 [Verbose] > │ failwith<unit> v53 │
00:00:11 #478 [Verbose] > │ method0() │
00:00:11 #479 [Verbose] > │ │
00:00:11 #480 [Verbose] > │ print_and_return / x: 0 │
00:00:11 #481 [Verbose] > │ print_and_return / x: 1 │
00:00:11 #482 [Verbose] > │ print_and_return / x: 2 │
00:00:11 #483 [Verbose] > │ print_and_return / x: 3 │
00:00:11 #484 [Verbose] > │ print_and_return / x: 4 │
00:00:11 #485 [Verbose] > │ print_and_return / x: 5 │
00:00:11 #486 [Verbose] > │ │
00:00:11 #487 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #488 [Verbose] >
00:00:11 #489 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #490 [Verbose] > // // test
00:00:11 #491 [Verbose] >
00:00:11 #492 [Verbose] > inl memo_stream = new_infinite_stream_ print_and_return |> memoize
00:00:11 #493 [Verbose] >
00:00:11 #494 [Verbose] > memo_stream ()
00:00:11 #495 [Verbose] > |> item 3i32
00:00:11 #496 [Verbose] > |> _assert_eq 3i32
00:00:11 #497 [Verbose] >
00:00:11 #498 [Verbose] > memo_stream ()
00:00:11 #499 [Verbose] > |> item 5i32
00:00:11 #500 [Verbose] > |> _assert_eq 5i32
00:00:11 #501 [Verbose] >
00:00:11 #502 [Verbose] > ╭─[ 279.99ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #503 [Verbose] > │ type UH0 = │
00:00:11 #504 [Verbose] > │ | UH0_0 of int32 * (unit -> UH0) │
00:00:11 #505 [Verbose] > │ | UH0_1 │
00:00:11 #506 [Verbose] > │ and [<Struct>] US0 = │
00:00:11 #507 [Verbose] > │ | US0_0 of f0_0 : UH0 │
00:00:11 #508 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH0) │
00:00:11 #509 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:11 #510 [Verbose] > │ and [<Struct>] US1 = │
00:00:11 #511 [Verbose] > │ | US1_0 │
00:00:11 #512 [Verbose] > │ | US1_1 of f1_0 : int32 │
00:00:11 #513 [Verbose] > │ let rec closure0 (v0 : int32) () : UH0 = │
00:00:11 #514 [Verbose] > │ let v1 : int32 = v0 + 1 │
00:00:11 #515 [Verbose] > │ method1(v1) │
00:00:11 #516 [Verbose] > │ and method1 (v0 : int32) : UH0 = │
00:00:11 #517 [Verbose] > │ printfn $"print_and_return / x: {v0}" │
00:00:11 #518 [Verbose] > │ let v1 : (unit -> UH0) = closure0(v0) │
00:00:11 #519 [Verbose] > │ UH0_0(v0, v1) │
00:00:11 #520 [Verbose] > │ and closure1 (v0 : UH0) () : UH0 = │
00:00:11 #521 [Verbose] > │ v0 │
00:00:11 #522 [Verbose] > │ and closure2 (v0 : UH0, v1 : Mut0) () : UH0 = │
00:00:11 #523 [Verbose] > │ let v2 : US0 = v1.l0 │
00:00:11 #524 [Verbose] > │ match v2 with │
00:00:11 #525 [Verbose] > │ | US0_0(v3) -> (* Computed *) │
00:00:11 #526 [Verbose] > │ v3 │
00:00:11 #527 [Verbose] > │ | US0_1(v4) -> (* NotComputed *) │
00:00:11 #528 [Verbose] > │ let v5 : UH0 = v4 () │
00:00:11 #529 [Verbose] > │ let v12 : UH0 = │
00:00:11 #530 [Verbose] > │ match v5 with │
00:00:11 #531 [Verbose] > │ | UH0_0(v7, v8) -> (* StreamCons *) │
00:00:11 #532 [Verbose] > │ let v9 : (unit -> UH0) = method2(v0, v8) │
00:00:11 #533 [Verbose] > │ UH0_0(v7, v9) │
00:00:11 #534 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #535 [Verbose] > │ UH0_1 │
00:00:11 #536 [Verbose] > │ let v13 : US0 = US0_0(v12) │
00:00:11 #537 [Verbose] > │ v1.l0 <- v13 │
00:00:11 #538 [Verbose] > │ v12 │
00:00:11 #539 [Verbose] > │ and method2 (v0 : UH0, v1 : (unit -> UH0)) : (unit -> UH0) = │
00:00:11 #540 [Verbose] > │ let v2 : US0 = US0_1(v1) │
00:00:11 #541 [Verbose] > │ let v3 : Mut0 = {l0 = v2} : Mut0 │
00:00:11 #542 [Verbose] > │ closure2(v0, v3) │
00:00:11 #543 [Verbose] > │ and method3 (v0 : int32, v1 : UH0) : US1 = │
00:00:11 #544 [Verbose] > │ match v1 with │
00:00:11 #545 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:11 #546 [Verbose] > │ let v4 : bool = v0 <= 0 │
00:00:11 #547 [Verbose] > │ if v4 then │
00:00:11 #548 [Verbose] > │ US1_1(v2) │
00:00:11 #549 [Verbose] > │ else │
00:00:11 #550 [Verbose] > │ let v6 : int32 = v0 - 1 │
00:00:11 #551 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:11 #552 [Verbose] > │ method3(v6, v7) │
00:00:11 #553 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:11 #554 [Verbose] > │ US1_0 │
00:00:11 #555 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:11 #556 [Verbose] > │ v0 │
00:00:11 #557 [Verbose] > │ and method0 () : unit = │
00:00:11 #558 [Verbose] > │ let v0 : int32 = 0 │
00:00:11 #559 [Verbose] > │ let v1 : UH0 = method1(v0) │
00:00:11 #560 [Verbose] > │ let v2 : (unit -> UH0) = closure1(v1) │
00:00:11 #561 [Verbose] > │ let v3 : (unit -> UH0) = method2(v1, v2) │
00:00:11 #562 [Verbose] > │ let v4 : UH0 = v3 () │
00:00:11 #563 [Verbose] > │ let v5 : int32 = 3 │
00:00:11 #564 [Verbose] > │ let v6 : US1 = method3(v5, v4) │
00:00:11 #565 [Verbose] > │ let v10 : int32 = │
00:00:11 #566 [Verbose] > │ match v6 with │
00:00:11 #567 [Verbose] > │ | US1_0 -> (* None *) │
00:00:11 #568 [Verbose] > │ failwith<int32> "Option does not have a value." │
00:00:11 #569 [Verbose] > │ | US1_1(v7) -> (* Some *) │
00:00:11 #570 [Verbose] > │ v7 │
00:00:11 #571 [Verbose] > │ let v11 : bool = v10 = 3 │
00:00:11 #572 [Verbose] > │ let v12 : bool = method4(v11) │
00:00:11 #573 [Verbose] > │ let v13 : string = $"__expect / actual: %A{v10} / expected: %A{3}" │
00:00:11 #574 [Verbose] > │ let v14 : bool = v12 = false │
00:00:11 #575 [Verbose] > │ if v14 then │
00:00:11 #576 [Verbose] > │ failwith<unit> v13 │
00:00:11 #577 [Verbose] > │ let v15 : UH0 = v3 () │
00:00:11 #578 [Verbose] > │ let v16 : int32 = 5 │
00:00:11 #579 [Verbose] > │ let v17 : US1 = method3(v16, v15) │
00:00:11 #580 [Verbose] > │ let v21 : int32 = │
00:00:11 #581 [Verbose] > │ match v17 with │
00:00:11 #582 [Verbose] > │ | US1_0 -> (* None *) │
00:00:11 #583 [Verbose] > │ failwith<int32> "Option does not have a value." │
00:00:11 #584 [Verbose] > │ | US1_1(v18) -> (* Some *) │
00:00:11 #585 [Verbose] > │ v18 │
00:00:11 #586 [Verbose] > │ let v22 : bool = v21 = 5 │
00:00:11 #587 [Verbose] > │ let v23 : bool = method4(v22) │
00:00:11 #588 [Verbose] > │ let v24 : string = $"__expect / actual: %A{v21} / expected: %A{5}" │
00:00:11 #589 [Verbose] > │ let v25 : bool = v23 = false │
00:00:11 #590 [Verbose] > │ if v25 then │
00:00:11 #591 [Verbose] > │ failwith<unit> v24 │
00:00:11 #592 [Verbose] > │ method0() │
00:00:11 #593 [Verbose] > │ │
00:00:11 #594 [Verbose] > │ print_and_return / x: 0 │
00:00:11 #595 [Verbose] > │ print_and_return / x: 1 │
00:00:11 #596 [Verbose] > │ print_and_return / x: 2 │
00:00:11 #597 [Verbose] > │ print_and_return / x: 3 │
00:00:11 #598 [Verbose] > │ print_and_return / x: 4 │
00:00:11 #599 [Verbose] > │ print_and_return / x: 5 │
00:00:11 #600 [Verbose] > │ │
00:00:11 #601 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #602 [Verbose] >
00:00:11 #603 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #604 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #605 [Verbose] > │ ## unfold │
00:00:11 #606 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #607 [Verbose] >
00:00:11 #608 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #609 [Verbose] > inl unfold f x0 =
00:00:11 #610 [Verbose] > inl rec body x =
00:00:11 #611 [Verbose] > match f x with
00:00:11 #612 [Verbose] > | Some (x', y) => StreamCons (x', fun () => loop y)
00:00:11 #613 [Verbose] > | None => StreamNil
00:00:11 #614 [Verbose] > and inl loop x = join_body_unit body x0 x
00:00:11 #615 [Verbose] > loop x0
00:00:11 #616 [Verbose] >
00:00:11 #617 [Verbose] > ╭─[ 208.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #618 [Verbose] > │ () │
00:00:11 #619 [Verbose] > │ │
00:00:11 #620 [Verbose] > │ │
00:00:11 #621 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #622 [Verbose] >
00:00:11 #623 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #624 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #625 [Verbose] > │ ## iterate │
00:00:11 #626 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #627 [Verbose] >
00:00:11 #628 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #629 [Verbose] > inl iterate f =
00:00:11 #630 [Verbose] > unfold (fun x => Some (x, f x))
00:00:12 #631 [Verbose] >
00:00:12 #632 [Verbose] > ╭─[ 238.00ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #633 [Verbose] > │ () │
00:00:12 #634 [Verbose] > │ │
00:00:12 #635 [Verbose] > │ │
00:00:12 #636 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #637 [Verbose] >
00:00:12 #638 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #639 [Verbose] > // // test
00:00:12 #640 [Verbose] >
00:00:12 #641 [Verbose] > iterate ((*) 2) 1i32
00:00:12 #642 [Verbose] > |> item 10i32
00:00:12 #643 [Verbose] > |> _assert_eq 1024
00:00:12 #644 [Verbose] >
00:00:12 #645 [Verbose] > ╭─[ 221.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #646 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #647 [Verbose] > │ true │
00:00:12 #648 [Verbose] > │ and method0 () : unit = │
00:00:12 #649 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #650 [Verbose] > │ let v1 : string = $"__expect / actual: %A{1024} / expected: %A{1024}" │
00:00:12 #651 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #652 [Verbose] > │ if v2 then │
00:00:12 #653 [Verbose] > │ failwith<unit> v1 │
00:00:12 #654 [Verbose] > │ method0() │
00:00:12 #655 [Verbose] > │ │
00:00:12 #656 [Verbose] > │ │
00:00:12 #657 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #658 [Verbose] >
00:00:12 #659 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #660 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #661 [Verbose] > │ ## take_while │
00:00:12 #662 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #663 [Verbose] >
00:00:12 #664 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #665 [Verbose] > inl take_while cond s =
00:00:12 #666 [Verbose] > inl rec body i = function
00:00:12 #667 [Verbose] > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop
00:00:12 #668 [Verbose] > (i + 1) (fn ()))
00:00:12 #669 [Verbose] > | _ => StreamNil
00:00:12 #670 [Verbose] > and inl loop i = join_body body i
00:00:12 #671 [Verbose] > loop 0 s
00:00:12 #672 [Verbose] >
00:00:12 #673 [Verbose] > ╭─[ 191.49ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #674 [Verbose] > │ () │
00:00:12 #675 [Verbose] > │ │
00:00:12 #676 [Verbose] > │ │
00:00:12 #677 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #678 [Verbose] >
00:00:12 #679 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #680 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #681 [Verbose] > │ ## sum │
00:00:12 #682 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #683 [Verbose] >
00:00:12 #684 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #685 [Verbose] > inl sum seq =
00:00:12 #686 [Verbose] > seq |> fold (+) 0
00:00:12 #687 [Verbose] >
00:00:12 #688 [Verbose] > ╭─[ 184.48ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #689 [Verbose] > │ () │
00:00:12 #690 [Verbose] > │ │
00:00:12 #691 [Verbose] > │ │
00:00:12 #692 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #693 [Verbose] >
00:00:12 #694 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #695 [Verbose] > // // test
00:00:12 #696 [Verbose] >
00:00:12 #697 [Verbose] > listm.init 10i32 id
00:00:12 #698 [Verbose] > |> from_list
00:00:12 #699 [Verbose] > |> sum
00:00:12 #700 [Verbose] > |> _assert_eq 45
00:00:13 #701 [Verbose] >
00:00:13 #702 [Verbose] > ╭─[ 218.30ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #703 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #704 [Verbose] > │ true │
00:00:13 #705 [Verbose] > │ and method0 () : unit = │
00:00:13 #706 [Verbose] > │ let v0 : bool = method1() │
00:00:13 #707 [Verbose] > │ let v1 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:13 #708 [Verbose] > │ let v2 : bool = v0 = false │
00:00:13 #709 [Verbose] > │ if v2 then │
00:00:13 #710 [Verbose] > │ failwith<unit> v1 │
00:00:13 #711 [Verbose] > │ method0() │
00:00:13 #712 [Verbose] > │ │
00:00:13 #713 [Verbose] > │ │
00:00:13 #714 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #715 [Verbose] >
00:00:13 #716 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #717 [Verbose] > // // test
00:00:13 #718 [Verbose] >
00:00:13 #719 [Verbose] > new_finite_stream print_and_return 10i32
00:00:13 #720 [Verbose] > |> take_while (fun n (_ : i32) => n < 5)
00:00:13 #721 [Verbose] > |> sum
00:00:13 #722 [Verbose] > |> _assert_eq 10
00:00:13 #723 [Verbose] >
00:00:13 #724 [Verbose] > ╭─[ 241.56ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #725 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #726 [Verbose] > │ true │
00:00:13 #727 [Verbose] > │ and method0 () : unit = │
00:00:13 #728 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:13 #729 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:13 #730 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:13 #731 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:13 #732 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:13 #733 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:13 #734 [Verbose] > │ let v0 : bool = method1() │
00:00:13 #735 [Verbose] > │ let v1 : string = $"__expect / actual: %A{10} / expected: %A{10}" │
00:00:13 #736 [Verbose] > │ let v2 : bool = v0 = false │
00:00:13 #737 [Verbose] > │ if v2 then │
00:00:13 #738 [Verbose] > │ failwith<unit> v1 │
00:00:13 #739 [Verbose] > │ method0() │
00:00:13 #740 [Verbose] > │ │
00:00:13 #741 [Verbose] > │ print_and_return / x: 0 │
00:00:13 #742 [Verbose] > │ print_and_return / x: 1 │
00:00:13 #743 [Verbose] > │ print_and_return / x: 2 │
00:00:13 #744 [Verbose] > │ print_and_return / x: 3 │
00:00:13 #745 [Verbose] > │ print_and_return / x: 4 │
00:00:13 #746 [Verbose] > │ print_and_return / x: 5 │
00:00:13 #747 [Verbose] > │ │
00:00:13 #748 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #749 [Verbose] >
00:00:13 #750 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #751 [Verbose] > // // test
00:00:13 #752 [Verbose] >
00:00:13 #753 [Verbose] > new_infinite_stream print_and_return
00:00:13 #754 [Verbose] > |> take_while (fun n (_ : i32) => n < 5i32)
00:00:13 #755 [Verbose] > |> sum
00:00:13 #756 [Verbose] > |> _assert_eq 10
00:00:13 #757 [Verbose] >
00:00:13 #758 [Verbose] > ╭─[ 250.67ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #759 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #760 [Verbose] > │ true │
00:00:13 #761 [Verbose] > │ and method0 () : unit = │
00:00:13 #762 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:13 #763 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:13 #764 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:13 #765 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:13 #766 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:13 #767 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:13 #768 [Verbose] > │ let v0 : bool = method1() │
00:00:13 #769 [Verbose] > │ let v1 : string = $"__expect / actual: %A{10} / expected: %A{10}" │
00:00:13 #770 [Verbose] > │ let v2 : bool = v0 = false │
00:00:13 #771 [Verbose] > │ if v2 then │
00:00:13 #772 [Verbose] > │ failwith<unit> v1 │
00:00:13 #773 [Verbose] > │ method0() │
00:00:13 #774 [Verbose] > │ │
00:00:13 #775 [Verbose] > │ print_and_return / x: 0 │
00:00:13 #776 [Verbose] > │ print_and_return / x: 1 │
00:00:13 #777 [Verbose] > │ print_and_return / x: 2 │
00:00:13 #778 [Verbose] > │ print_and_return / x: 3 │
00:00:13 #779 [Verbose] > │ print_and_return / x: 4 │
00:00:13 #780 [Verbose] > │ print_and_return / x: 5 │
00:00:13 #781 [Verbose] > │ │
00:00:13 #782 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #783 [Verbose] >
00:00:13 #784 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #785 [Verbose] > // // test
00:00:13 #786 [Verbose] >
00:00:13 #787 [Verbose] > iterate ((*) 6) 1i32
00:00:13 #788 [Verbose] > |> take_while (fun _ i => i <= 7i32)
00:00:13 #789 [Verbose] > |> to_list
00:00:13 #790 [Verbose] > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]]
00:00:13 #791 [Verbose] >
00:00:13 #792 [Verbose] > ╭─[ 302.36ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #793 [Verbose] > │ type UH0 = │
00:00:13 #794 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:13 #795 [Verbose] > │ | UH0_1 │
00:00:13 #796 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #797 [Verbose] > │ true │
00:00:13 #798 [Verbose] > │ and method0 () : unit = │
00:00:13 #799 [Verbose] > │ let v63 : bool = method1() │
00:00:13 #800 [Verbose] > │ let v64 : UH0 = UH0_1 │
00:00:13 #801 [Verbose] > │ let v65 : UH0 = UH0_0(279936, v64) │
00:00:13 #802 [Verbose] > │ let v66 : UH0 = UH0_0(46656, v65) │
00:00:13 #803 [Verbose] > │ let v67 : UH0 = UH0_0(7776, v66) │
00:00:13 #804 [Verbose] > │ let v68 : UH0 = UH0_0(1296, v67) │
00:00:13 #805 [Verbose] > │ let v69 : UH0 = UH0_0(216, v68) │
00:00:13 #806 [Verbose] > │ let v70 : UH0 = UH0_0(36, v69) │
00:00:13 #807 [Verbose] > │ let v71 : UH0 = UH0_0(6, v70) │
00:00:13 #808 [Verbose] > │ let v72 : UH0 = UH0_0(1, v71) │
00:00:13 #809 [Verbose] > │ let v73 : UH0 = UH0_1 │
00:00:13 #810 [Verbose] > │ let v74 : UH0 = UH0_0(279936, v73) │
00:00:13 #811 [Verbose] > │ let v75 : UH0 = UH0_0(46656, v74) │
00:00:13 #812 [Verbose] > │ let v76 : UH0 = UH0_0(7776, v75) │
00:00:13 #813 [Verbose] > │ let v77 : UH0 = UH0_0(1296, v76) │
00:00:13 #814 [Verbose] > │ let v78 : UH0 = UH0_0(216, v77) │
00:00:13 #815 [Verbose] > │ let v79 : UH0 = UH0_0(36, v78) │
00:00:13 #816 [Verbose] > │ let v80 : UH0 = UH0_0(6, v79) │
00:00:13 #817 [Verbose] > │ let v81 : UH0 = UH0_0(1, v80) │
00:00:13 #818 [Verbose] > │ let v82 : string = $"__expect / actual: %A{v72} / expected: %A{v81}" │
00:00:13 #819 [Verbose] > │ let v83 : bool = v63 = false │
00:00:13 #820 [Verbose] > │ if v83 then │
00:00:13 #821 [Verbose] > │ failwith<unit> v82 │
00:00:13 #822 [Verbose] > │ method0() │
00:00:13 #823 [Verbose] > │ │
00:00:13 #824 [Verbose] > │ │
00:00:13 #825 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #826 [Verbose] >
00:00:13 #827 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #828 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #829 [Verbose] > │ ## indexed │
00:00:13 #830 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #831 [Verbose] >
00:00:13 #832 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #833 [Verbose] > inl indexed s =
00:00:13 #834 [Verbose] > ((StreamNil, 0), s)
00:00:13 #835 [Verbose] > ||> fold fun (acc, i) x =>
00:00:13 #836 [Verbose] > StreamCons ((i, x), fun () => acc), i + 1
00:00:13 #837 [Verbose] > |> fst
00:00:13 #838 [Verbose] > |> rev
00:00:14 #839 [Verbose] >
00:00:14 #840 [Verbose] > ╭─[ 204.98ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #841 [Verbose] > │ () │
00:00:14 #842 [Verbose] > │ │
00:00:14 #843 [Verbose] > │ │
00:00:14 #844 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #845 [Verbose] >
00:00:14 #846 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #847 [Verbose] > // // test
00:00:14 #848 [Verbose] >
00:00:14 #849 [Verbose] > listm.init 10i32 ((*) 2)
00:00:14 #850 [Verbose] > |> from_list
00:00:14 #851 [Verbose] > |> indexed
00:00:14 #852 [Verbose] > |> item 5i32
00:00:14 #853 [Verbose] > |> _assert_eq (5i32, 10i32)
00:00:14 #854 [Verbose] >
00:00:14 #855 [Verbose] > ╭─[ 228.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #856 [Verbose] > │ let rec method1 () : bool = │
00:00:14 #857 [Verbose] > │ true │
00:00:14 #858 [Verbose] > │ and method0 () : unit = │
00:00:14 #859 [Verbose] > │ let v0 : bool = method1() │
00:00:14 #860 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5, 10)} / expected: │
00:00:14 #861 [Verbose] > │ %A{struct (5, 10)}" │
00:00:14 #862 [Verbose] > │ let v2 : bool = v0 = false │
00:00:14 #863 [Verbose] > │ if v2 then │
00:00:14 #864 [Verbose] > │ failwith<unit> v1 │
00:00:14 #865 [Verbose] > │ method0() │
00:00:14 #866 [Verbose] > │ │
00:00:14 #867 [Verbose] > │ │
00:00:14 #868 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #869 [Verbose] >
00:00:14 #870 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #871 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #872 [Verbose] > │ ## map │
00:00:14 #873 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #874 [Verbose] >
00:00:14 #875 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #876 [Verbose] > inl map fn s =
00:00:14 #877 [Verbose] > (s, StreamNil)
00:00:14 #878 [Verbose] > ||> fold_back fun x acc =>
00:00:14 #879 [Verbose] > StreamCons (fn x, fun () => acc)
00:00:14 #880 [Verbose] >
00:00:14 #881 [Verbose] > ╭─[ 368.77ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #882 [Verbose] > │ () │
00:00:14 #883 [Verbose] > │ │
00:00:14 #884 [Verbose] > │ │
00:00:14 #885 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #886 [Verbose] >
00:00:14 #887 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #888 [Verbose] > // // test
00:00:14 #889 [Verbose] >
00:00:14 #890 [Verbose] > listm.init 10i32 id
00:00:14 #891 [Verbose] > |> from_list
00:00:14 #892 [Verbose] > |> map ((*) 2)
00:00:14 #893 [Verbose] > |> item 5i32
00:00:14 #894 [Verbose] > |> _assert_eq 10i32
00:00:14 #895 [Verbose] >
00:00:14 #896 [Verbose] > ╭─[ 221.04ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #897 [Verbose] > │ let rec method1 () : bool = │
00:00:14 #898 [Verbose] > │ true │
00:00:14 #899 [Verbose] > │ and method0 () : unit = │
00:00:14 #900 [Verbose] > │ let v0 : bool = method1() │
00:00:14 #901 [Verbose] > │ let v1 : string = $"__expect / actual: %A{10} / expected: %A{10}" │
00:00:14 #902 [Verbose] > │ let v2 : bool = v0 = false │
00:00:14 #903 [Verbose] > │ if v2 then │
00:00:14 #904 [Verbose] > │ failwith<unit> v1 │
00:00:14 #905 [Verbose] > │ method0() │
00:00:14 #906 [Verbose] > │ │
00:00:14 #907 [Verbose] > │ │
00:00:14 #908 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #909 [Verbose] >
00:00:14 #910 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #911 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #912 [Verbose] > │ ## zip_with │
00:00:14 #913 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #914 [Verbose] >
00:00:14 #915 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #916 [Verbose] > inl zip_with fn s1 s2 =
00:00:14 #917 [Verbose] > inl rec loop s1 s2 =
00:00:14 #918 [Verbose] > match s1, s2 with
00:00:14 #919 [Verbose] > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:00:14 #920 [Verbose] > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:00:14 #921 [Verbose] > | StreamNil, _ | _, StreamNil => StreamNil
00:00:14 #922 [Verbose] > loop s1 s2
00:00:14 #923 [Verbose] >
00:00:14 #924 [Verbose] > inl zip_with_ fn s1 s2 =
00:00:14 #925 [Verbose] > let rec loop s1 s2 =
00:00:14 #926 [Verbose] > match s1, s2 with
00:00:14 #927 [Verbose] > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:00:14 #928 [Verbose] > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:00:14 #929 [Verbose] > | StreamNil, _ | _, StreamNil => StreamNil
00:00:14 #930 [Verbose] > loop s1 s2
00:00:15 #931 [Verbose] >
00:00:15 #932 [Verbose] > ╭─[ 207.33ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #933 [Verbose] > │ () │
00:00:15 #934 [Verbose] > │ │
00:00:15 #935 [Verbose] > │ │
00:00:15 #936 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #937 [Verbose] >
00:00:15 #938 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #939 [Verbose] > // // test
00:00:15 #940 [Verbose] >
00:00:15 #941 [Verbose] > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:00:15 #942 [Verbose] > ||> zip_with (+)
00:00:15 #943 [Verbose] > |> item 2i32
00:00:15 #944 [Verbose] > |> _assert_eq 6
00:00:15 #945 [Verbose] >
00:00:15 #946 [Verbose] > ╭─[ 235.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #947 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #948 [Verbose] > │ true │
00:00:15 #949 [Verbose] > │ and method0 () : unit = │
00:00:15 #950 [Verbose] > │ let v0 : bool = method1() │
00:00:15 #951 [Verbose] > │ let v1 : string = $"__expect / actual: %A{6} / expected: %A{6}" │
00:00:15 #952 [Verbose] > │ let v2 : bool = v0 = false │
00:00:15 #953 [Verbose] > │ if v2 then │
00:00:15 #954 [Verbose] > │ failwith<unit> v1 │
00:00:15 #955 [Verbose] > │ method0() │
00:00:15 #956 [Verbose] > │ │
00:00:15 #957 [Verbose] > │ │
00:00:15 #958 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #959 [Verbose] >
00:00:15 #960 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #961 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #962 [Verbose] > │ ## zip │
00:00:15 #963 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #964 [Verbose] >
00:00:15 #965 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #966 [Verbose] > inl zip s1 s2 =
00:00:15 #967 [Verbose] > zip_with pair s1 s2
00:00:15 #968 [Verbose] >
00:00:15 #969 [Verbose] > inl zip_ s1 s2 =
00:00:15 #970 [Verbose] > zip_with_ pair s1 s2
00:00:15 #971 [Verbose] >
00:00:15 #972 [Verbose] > ╭─[ 189.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #973 [Verbose] > │ () │
00:00:15 #974 [Verbose] > │ │
00:00:15 #975 [Verbose] > │ │
00:00:15 #976 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #977 [Verbose] >
00:00:15 #978 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #979 [Verbose] > // // test
00:00:15 #980 [Verbose] >
00:00:15 #981 [Verbose] > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:00:15 #982 [Verbose] > ||> zip
00:00:15 #983 [Verbose] > |> item 5i32
00:00:15 #984 [Verbose] > |> _assert_eq (5, 10)
00:00:15 #985 [Verbose] >
00:00:15 #986 [Verbose] > ╭─[ 194.64ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #987 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #988 [Verbose] > │ true │
00:00:15 #989 [Verbose] > │ and method0 () : unit = │
00:00:15 #990 [Verbose] > │ let v0 : bool = method1() │
00:00:15 #991 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5, 10)} / expected: │
00:00:15 #992 [Verbose] > │ %A{struct (5, 10)}" │
00:00:15 #993 [Verbose] > │ let v2 : bool = v0 = false │
00:00:15 #994 [Verbose] > │ if v2 then │
00:00:15 #995 [Verbose] > │ failwith<unit> v1 │
00:00:15 #996 [Verbose] > │ method0() │
00:00:15 #997 [Verbose] > │ │
00:00:15 #998 [Verbose] > │ │
00:00:15 #999 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1000 [Verbose] >
00:00:15 #1001 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #1002 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #1003 [Verbose] > │ ## unzip │
00:00:15 #1004 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1005 [Verbose] >
00:00:15 #1006 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #1007 [Verbose] > inl unzip s =
00:00:15 #1008 [Verbose] > inl rec body s =
00:00:15 #1009 [Verbose] > match s with
00:00:15 #1010 [Verbose] > | StreamCons ((x, y), fn) =>
00:00:15 #1011 [Verbose] > inl xs, ys = loop (fn ())
00:00:15 #1012 [Verbose] > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys)
00:00:15 #1013 [Verbose] > | StreamNil => pair StreamNil StreamNil
00:00:15 #1014 [Verbose] > and inl loop x =
00:00:15 #1015 [Verbose] > if var_is x |> not
00:00:15 #1016 [Verbose] > then body x
00:00:15 #1017 [Verbose] > else
00:00:15 #1018 [Verbose] > inl x = dyn x
00:00:15 #1019 [Verbose] > join body x
00:00:15 #1020 [Verbose] > loop s
00:00:15 #1021 [Verbose] >
00:00:15 #1022 [Verbose] > ╭─[ 248.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #1023 [Verbose] > │ () │
00:00:15 #1024 [Verbose] > │ │
00:00:15 #1025 [Verbose] > │ │
00:00:15 #1026 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1027 [Verbose] >
00:00:15 #1028 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #1029 [Verbose] > // // test
00:00:15 #1030 [Verbose] >
00:00:15 #1031 [Verbose] > listm.init 10i32 id
00:00:15 #1032 [Verbose] > |> listm.map (fun x => x, x)
00:00:15 #1033 [Verbose] > |> from_list
00:00:15 #1034 [Verbose] > |> unzip
00:00:15 #1035 [Verbose] > |> fun x, y =>
00:00:15 #1036 [Verbose] > x |> sum
00:00:15 #1037 [Verbose] > |> _assert_eq 45
00:00:15 #1038 [Verbose] >
00:00:15 #1039 [Verbose] > y |> sum
00:00:15 #1040 [Verbose] > |> _assert_eq 45
00:00:16 #1041 [Verbose] >
00:00:16 #1042 [Verbose] > ╭─[ 223.07ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1043 [Verbose] > │ let rec method1 () : bool = │
00:00:16 #1044 [Verbose] > │ true │
00:00:16 #1045 [Verbose] > │ and method0 () : unit = │
00:00:16 #1046 [Verbose] > │ let v0 : bool = method1() │
00:00:16 #1047 [Verbose] > │ let v1 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:16 #1048 [Verbose] > │ let v2 : bool = v0 = false │
00:00:16 #1049 [Verbose] > │ if v2 then │
00:00:16 #1050 [Verbose] > │ failwith<unit> v1 │
00:00:16 #1051 [Verbose] > │ let v3 : bool = method1() │
00:00:16 #1052 [Verbose] > │ let v4 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:16 #1053 [Verbose] > │ let v5 : bool = v3 = false │
00:00:16 #1054 [Verbose] > │ if v5 then │
00:00:16 #1055 [Verbose] > │ failwith<unit> v4 │
00:00:16 #1056 [Verbose] > │ method0() │
00:00:16 #1057 [Verbose] > │ │
00:00:16 #1058 [Verbose] > │ │
00:00:16 #1059 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1060 [Verbose] > [NbConvertApp] Converting notebook stream.dib.ipynb to html
00:00:17 #1061 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:17 #1062 [Verbose] > validate(nb)
00:00:18 #1063 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:18 #1064 [Verbose] > return _pygments_highlight(
00:00:19 #1065 [Verbose] > [NbConvertApp] Writing 360300 bytes to stream.dib.html
00:00:19 #1066 [Debug] executeAsync / exitCode: 0 / output.Length: 64814
00:00:19 #1067 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 seq.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # seq │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.12s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 #22 [Verbose] > │ ## seq │
00:00:06 #23 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #24 [Verbose] >
00:00:06 #25 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #26 [Verbose] > type seq dim el = dim -> option el
00:00:07 #27 [Verbose] >
00:00:07 #28 [Verbose] > ╭─[ 215.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #29 [Verbose] > │ () │
00:00:07 #30 [Verbose] > │ │
00:00:07 #31 [Verbose] > │ │
00:00:07 #32 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #33 [Verbose] >
00:00:07 #34 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #35 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #36 [Verbose] > │ ## try_item │
00:00:07 #37 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #38 [Verbose] >
00:00:07 #39 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #40 [Verbose] > inl try_item n s =
00:00:07 #41 [Verbose] > n |> s
00:00:07 #42 [Verbose] >
00:00:07 #43 [Verbose] > ╭─[ 178.49ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #44 [Verbose] > │ () │
00:00:07 #45 [Verbose] > │ │
00:00:07 #46 [Verbose] > │ │
00:00:07 #47 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #48 [Verbose] >
00:00:07 #49 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #50 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #51 [Verbose] > │ ## from_list │
00:00:07 #52 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #53 [Verbose] >
00:00:07 #54 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #55 [Verbose] > inl from_list list =
00:00:07 #56 [Verbose] > fun n =>
00:00:07 #57 [Verbose] > list
00:00:07 #58 [Verbose] > |> listm'.try_item n
00:00:07 #59 [Verbose] >
00:00:07 #60 [Verbose] > ╭─[ 200.51ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #61 [Verbose] > │ () │
00:00:07 #62 [Verbose] > │ │
00:00:07 #63 [Verbose] > │ │
00:00:07 #64 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #65 [Verbose] >
00:00:07 #66 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #67 [Verbose] > // // test
00:00:07 #68 [Verbose] >
00:00:07 #69 [Verbose] > listm.init 10i32 print_and_return
00:00:07 #70 [Verbose] > |> from_list
00:00:07 #71 [Verbose] > |> try_item 5i32
00:00:07 #72 [Verbose] > |> _assert_eq (Some 5i32)
00:00:08 #73 [Verbose] >
00:00:08 #74 [Verbose] > ╭─[ 1.43s - stdout ]───────────────────────────────────────────────────────────╮
00:00:08 #75 [Verbose] > │ type [<Struct>] US0 = │
00:00:08 #76 [Verbose] > │ | US0_0 │
00:00:08 #77 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:08 #78 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #79 [Verbose] > │ true │
00:00:08 #80 [Verbose] > │ and method0 () : unit = │
00:00:08 #81 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:08 #82 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:08 #83 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:08 #84 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:08 #85 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:08 #86 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:08 #87 [Verbose] > │ printfn $"print_and_return / x: {6}" │
00:00:08 #88 [Verbose] > │ printfn $"print_and_return / x: {7}" │
00:00:08 #89 [Verbose] > │ printfn $"print_and_return / x: {8}" │
00:00:08 #90 [Verbose] > │ printfn $"print_and_return / x: {9}" │
00:00:08 #91 [Verbose] > │ let v3 : bool = method1() │
00:00:08 #92 [Verbose] > │ let v4 : US0 = US0_1(5) │
00:00:08 #93 [Verbose] > │ let v5 : US0 = US0_1(5) │
00:00:08 #94 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:08 #95 [Verbose] > │ let v7 : bool = v3 = false │
00:00:08 #96 [Verbose] > │ if v7 then │
00:00:08 #97 [Verbose] > │ failwith<unit> v6 │
00:00:08 #98 [Verbose] > │ method0() │
00:00:08 #99 [Verbose] > │ │
00:00:08 #100 [Verbose] > │ print_and_return / x: 0 │
00:00:08 #101 [Verbose] > │ print_and_return / x: 1 │
00:00:08 #102 [Verbose] > │ print_and_return / x: 2 │
00:00:08 #103 [Verbose] > │ print_and_return / x: 3 │
00:00:08 #104 [Verbose] > │ print_and_return / x: 4 │
00:00:08 #105 [Verbose] > │ print_and_return / x: 5 │
00:00:08 #106 [Verbose] > │ print_and_return / x: 6 │
00:00:08 #107 [Verbose] > │ print_and_return / x: 7 │
00:00:08 #108 [Verbose] > │ print_and_return / x: 8 │
00:00:08 #109 [Verbose] > │ print_and_return / x: 9 │
00:00:08 #110 [Verbose] > │ │
00:00:08 #111 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #112 [Verbose] >
00:00:08 #113 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #114 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #115 [Verbose] > │ ## map │
00:00:08 #116 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #117 [Verbose] >
00:00:08 #118 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #119 [Verbose] > inl map fn s =
00:00:08 #120 [Verbose] > fun n =>
00:00:08 #121 [Verbose] > n
00:00:08 #122 [Verbose] > |> s
00:00:08 #123 [Verbose] > |> optionm.map fn
00:00:09 #124 [Verbose] >
00:00:09 #125 [Verbose] > ╭─[ 231.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #126 [Verbose] > │ () │
00:00:09 #127 [Verbose] > │ │
00:00:09 #128 [Verbose] > │ │
00:00:09 #129 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #130 [Verbose] >
00:00:09 #131 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #132 [Verbose] > // // test
00:00:09 #133 [Verbose] >
00:00:09 #134 [Verbose] > listm.init 10i32 id
00:00:09 #135 [Verbose] > |> from_list
00:00:09 #136 [Verbose] > |> map ((*) 2)
00:00:09 #137 [Verbose] > |> try_item 5i32
00:00:09 #138 [Verbose] > |> _assert_eq (Some 10i32)
00:00:09 #139 [Verbose] >
00:00:09 #140 [Verbose] > ╭─[ 264.91ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #141 [Verbose] > │ type [<Struct>] US0 = │
00:00:09 #142 [Verbose] > │ | US0_0 │
00:00:09 #143 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:09 #144 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #145 [Verbose] > │ true │
00:00:09 #146 [Verbose] > │ and method0 () : unit = │
00:00:09 #147 [Verbose] > │ let v3 : bool = method1() │
00:00:09 #148 [Verbose] > │ let v4 : US0 = US0_1(10) │
00:00:09 #149 [Verbose] > │ let v5 : US0 = US0_1(10) │
00:00:09 #150 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:09 #151 [Verbose] > │ let v7 : bool = v3 = false │
00:00:09 #152 [Verbose] > │ if v7 then │
00:00:09 #153 [Verbose] > │ failwith<unit> v6 │
00:00:09 #154 [Verbose] > │ method0() │
00:00:09 #155 [Verbose] > │ │
00:00:09 #156 [Verbose] > │ │
00:00:09 #157 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #158 [Verbose] >
00:00:09 #159 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #160 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #161 [Verbose] > │ ## mapi │
00:00:09 #162 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #163 [Verbose] >
00:00:09 #164 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #165 [Verbose] > inl mapi fn s =
00:00:09 #166 [Verbose] > fun n =>
00:00:09 #167 [Verbose] > n
00:00:09 #168 [Verbose] > |> s
00:00:09 #169 [Verbose] > |> optionm.map (fn n)
00:00:09 #170 [Verbose] >
00:00:09 #171 [Verbose] > ╭─[ 262.61ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #172 [Verbose] > │ () │
00:00:09 #173 [Verbose] > │ │
00:00:09 #174 [Verbose] > │ │
00:00:09 #175 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #176 [Verbose] >
00:00:09 #177 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #178 [Verbose] > // // test
00:00:09 #179 [Verbose] >
00:00:09 #180 [Verbose] > listm.init 10i32 print_and_return
00:00:09 #181 [Verbose] > |> from_list
00:00:09 #182 [Verbose] > |> mapi fun i x => i + x
00:00:09 #183 [Verbose] > |> try_item 5i32
00:00:09 #184 [Verbose] > |> _assert_eq (Some 10i32)
00:00:09 #185 [Verbose] >
00:00:09 #186 [Verbose] > ╭─[ 335.91ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #187 [Verbose] > │ type [<Struct>] US0 = │
00:00:09 #188 [Verbose] > │ | US0_0 │
00:00:09 #189 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:09 #190 [Verbose] > │ let rec method1 () : bool = │
00:00:09 #191 [Verbose] > │ true │
00:00:09 #192 [Verbose] > │ and method0 () : unit = │
00:00:09 #193 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:09 #194 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:09 #195 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:09 #196 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:09 #197 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:09 #198 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:09 #199 [Verbose] > │ printfn $"print_and_return / x: {6}" │
00:00:09 #200 [Verbose] > │ printfn $"print_and_return / x: {7}" │
00:00:09 #201 [Verbose] > │ printfn $"print_and_return / x: {8}" │
00:00:09 #202 [Verbose] > │ printfn $"print_and_return / x: {9}" │
00:00:09 #203 [Verbose] > │ let v3 : bool = method1() │
00:00:09 #204 [Verbose] > │ let v4 : US0 = US0_1(10) │
00:00:09 #205 [Verbose] > │ let v5 : US0 = US0_1(10) │
00:00:09 #206 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:09 #207 [Verbose] > │ let v7 : bool = v3 = false │
00:00:09 #208 [Verbose] > │ if v7 then │
00:00:09 #209 [Verbose] > │ failwith<unit> v6 │
00:00:09 #210 [Verbose] > │ method0() │
00:00:09 #211 [Verbose] > │ │
00:00:09 #212 [Verbose] > │ print_and_return / x: 0 │
00:00:09 #213 [Verbose] > │ print_and_return / x: 1 │
00:00:09 #214 [Verbose] > │ print_and_return / x: 2 │
00:00:09 #215 [Verbose] > │ print_and_return / x: 3 │
00:00:09 #216 [Verbose] > │ print_and_return / x: 4 │
00:00:09 #217 [Verbose] > │ print_and_return / x: 5 │
00:00:09 #218 [Verbose] > │ print_and_return / x: 6 │
00:00:09 #219 [Verbose] > │ print_and_return / x: 7 │
00:00:09 #220 [Verbose] > │ print_and_return / x: 8 │
00:00:09 #221 [Verbose] > │ print_and_return / x: 9 │
00:00:09 #222 [Verbose] > │ │
00:00:09 #223 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #224 [Verbose] >
00:00:09 #225 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:09 #226 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:09 #227 [Verbose] > │ ## choose │
00:00:09 #228 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #229 [Verbose] >
00:00:10 #230 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #231 [Verbose] > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq
00:00:10 #232 [Verbose] > dim u =
00:00:10 #233 [Verbose] > fun n =>
00:00:10 #234 [Verbose] > inl rec body fn s i i' =
00:00:10 #235 [Verbose] > match i |> s with
00:00:10 #236 [Verbose] > | None => None
00:00:10 #237 [Verbose] > | Some x =>
00:00:10 #238 [Verbose] > match x |> fn with
00:00:10 #239 [Verbose] > | Some x when n = i' => Some x
00:00:10 #240 [Verbose] > | Some _ => loop (i + 1) (i' + 1)
00:00:10 #241 [Verbose] > | _ => loop (i + 1) i'
00:00:10 #242 [Verbose] > and inl loop i i' =
00:00:10 #243 [Verbose] > if n |> var_is |> not
00:00:10 #244 [Verbose] > then body fn s i i'
00:00:10 #245 [Verbose] > else
00:00:10 #246 [Verbose] > inl fn = join fn
00:00:10 #247 [Verbose] > inl s = join s
00:00:10 #248 [Verbose] > join body fn s i i'
00:00:10 #249 [Verbose] > loop 0 0
00:00:10 #250 [Verbose] >
00:00:10 #251 [Verbose] > ╭─[ 265.85ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #252 [Verbose] > │ () │
00:00:10 #253 [Verbose] > │ │
00:00:10 #254 [Verbose] > │ │
00:00:10 #255 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #256 [Verbose] >
00:00:10 #257 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #258 [Verbose] > // // test
00:00:10 #259 [Verbose] >
00:00:10 #260 [Verbose] > listm.init 10i32 print_and_return
00:00:10 #261 [Verbose] > |> from_list
00:00:10 #262 [Verbose] > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:00:10 #263 [Verbose] > |> try_item 1i32
00:00:10 #264 [Verbose] > |> _assert_eq (Some 2i32)
00:00:10 #265 [Verbose] >
00:00:10 #266 [Verbose] > ╭─[ 262.57ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #267 [Verbose] > │ type [<Struct>] US0 = │
00:00:10 #268 [Verbose] > │ | US0_0 │
00:00:10 #269 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:10 #270 [Verbose] > │ let rec method1 () : bool = │
00:00:10 #271 [Verbose] > │ true │
00:00:10 #272 [Verbose] > │ and method0 () : unit = │
00:00:10 #273 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:10 #274 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:10 #275 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:10 #276 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:10 #277 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:10 #278 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:10 #279 [Verbose] > │ printfn $"print_and_return / x: {6}" │
00:00:10 #280 [Verbose] > │ printfn $"print_and_return / x: {7}" │
00:00:10 #281 [Verbose] > │ printfn $"print_and_return / x: {8}" │
00:00:10 #282 [Verbose] > │ printfn $"print_and_return / x: {9}" │
00:00:10 #283 [Verbose] > │ let v3 : bool = method1() │
00:00:10 #284 [Verbose] > │ let v4 : US0 = US0_1(2) │
00:00:10 #285 [Verbose] > │ let v5 : US0 = US0_1(2) │
00:00:10 #286 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:10 #287 [Verbose] > │ let v7 : bool = v3 = false │
00:00:10 #288 [Verbose] > │ if v7 then │
00:00:10 #289 [Verbose] > │ failwith<unit> v6 │
00:00:10 #290 [Verbose] > │ method0() │
00:00:10 #291 [Verbose] > │ │
00:00:10 #292 [Verbose] > │ print_and_return / x: 0 │
00:00:10 #293 [Verbose] > │ print_and_return / x: 1 │
00:00:10 #294 [Verbose] > │ print_and_return / x: 2 │
00:00:10 #295 [Verbose] > │ print_and_return / x: 3 │
00:00:10 #296 [Verbose] > │ print_and_return / x: 4 │
00:00:10 #297 [Verbose] > │ print_and_return / x: 5 │
00:00:10 #298 [Verbose] > │ print_and_return / x: 6 │
00:00:10 #299 [Verbose] > │ print_and_return / x: 7 │
00:00:10 #300 [Verbose] > │ print_and_return / x: 8 │
00:00:10 #301 [Verbose] > │ print_and_return / x: 9 │
00:00:10 #302 [Verbose] > │ │
00:00:10 #303 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #304 [Verbose] >
00:00:10 #305 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #306 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #307 [Verbose] > │ ## indexed │
00:00:10 #308 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #309 [Verbose] >
00:00:10 #310 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #311 [Verbose] > inl indexed s =
00:00:10 #312 [Verbose] > s
00:00:10 #313 [Verbose] > |> mapi fun i x =>
00:00:10 #314 [Verbose] > i, x
00:00:10 #315 [Verbose] >
00:00:10 #316 [Verbose] > ╭─[ 232.70ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #317 [Verbose] > │ () │
00:00:10 #318 [Verbose] > │ │
00:00:10 #319 [Verbose] > │ │
00:00:10 #320 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #321 [Verbose] >
00:00:10 #322 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #323 [Verbose] > // // test
00:00:10 #324 [Verbose] >
00:00:10 #325 [Verbose] > listm.init 10i32 ((*) 2)
00:00:10 #326 [Verbose] > |> from_list
00:00:10 #327 [Verbose] > |> indexed
00:00:10 #328 [Verbose] > |> try_item 5i32
00:00:10 #329 [Verbose] > |> _assert_eq (Some (5i32, 10i32))
00:00:11 #330 [Verbose] >
00:00:11 #331 [Verbose] > ╭─[ 280.96ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #332 [Verbose] > │ type [<Struct>] US0 = │
00:00:11 #333 [Verbose] > │ | US0_0 │
00:00:11 #334 [Verbose] > │ | US0_1 of f1_0 : int32 * f1_1 : int32 │
00:00:11 #335 [Verbose] > │ let rec method1 () : bool = │
00:00:11 #336 [Verbose] > │ true │
00:00:11 #337 [Verbose] > │ and method0 () : unit = │
00:00:11 #338 [Verbose] > │ let v3 : bool = method1() │
00:00:11 #339 [Verbose] > │ let v4 : US0 = US0_1(5, 10) │
00:00:11 #340 [Verbose] > │ let v5 : US0 = US0_1(5, 10) │
00:00:11 #341 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:11 #342 [Verbose] > │ let v7 : bool = v3 = false │
00:00:11 #343 [Verbose] > │ if v7 then │
00:00:11 #344 [Verbose] > │ failwith<unit> v6 │
00:00:11 #345 [Verbose] > │ method0() │
00:00:11 #346 [Verbose] > │ │
00:00:11 #347 [Verbose] > │ │
00:00:11 #348 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #349 [Verbose] >
00:00:11 #350 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #351 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #352 [Verbose] > │ ## zip │
00:00:11 #353 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #354 [Verbose] >
00:00:11 #355 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #356 [Verbose] > inl zip n seq1 seq2 =
00:00:11 #357 [Verbose] > seq1 n, seq2 n
00:00:11 #358 [Verbose] >
00:00:11 #359 [Verbose] > ╭─[ 206.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #360 [Verbose] > │ () │
00:00:11 #361 [Verbose] > │ │
00:00:11 #362 [Verbose] > │ │
00:00:11 #363 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #364 [Verbose] >
00:00:11 #365 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #366 [Verbose] > // // test
00:00:11 #367 [Verbose] >
00:00:11 #368 [Verbose] > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:00:11 #369 [Verbose] > ||> zip 5i32
00:00:11 #370 [Verbose] > |> _assert_eq (Some 5, Some 10)
00:00:11 #371 [Verbose] >
00:00:11 #372 [Verbose] > ╭─[ 236.36ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #373 [Verbose] > │ type [<Struct>] US0 = │
00:00:11 #374 [Verbose] > │ | US0_0 │
00:00:11 #375 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:11 #376 [Verbose] > │ let rec method1 () : bool = │
00:00:11 #377 [Verbose] > │ true │
00:00:11 #378 [Verbose] > │ and method0 () : unit = │
00:00:11 #379 [Verbose] > │ let v6 : bool = method1() │
00:00:11 #380 [Verbose] > │ let v7 : US0 = US0_1(5) │
00:00:11 #381 [Verbose] > │ let v8 : US0 = US0_1(10) │
00:00:11 #382 [Verbose] > │ let v9 : US0 = US0_1(5) │
00:00:11 #383 [Verbose] > │ let v10 : US0 = US0_1(10) │
00:00:11 #384 [Verbose] > │ let v11 : string = $"__expect / actual: %A{struct (v7, v8)} / expected: │
00:00:11 #385 [Verbose] > │ %A{struct (v9, v10)}" │
00:00:11 #386 [Verbose] > │ let v12 : bool = v6 = false │
00:00:11 #387 [Verbose] > │ if v12 then │
00:00:11 #388 [Verbose] > │ failwith<unit> v11 │
00:00:11 #389 [Verbose] > │ method0() │
00:00:11 #390 [Verbose] > │ │
00:00:11 #391 [Verbose] > │ │
00:00:11 #392 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #393 [Verbose] >
00:00:11 #394 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #395 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #396 [Verbose] > │ ## zip_with │
00:00:11 #397 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #398 [Verbose] >
00:00:11 #399 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #400 [Verbose] > inl zip_with fn seq1 seq2 =
00:00:11 #401 [Verbose] > fun n =>
00:00:11 #402 [Verbose] > fn (seq1 n) (seq2 n)
00:00:11 #403 [Verbose] >
00:00:11 #404 [Verbose] > ╭─[ 187.66ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #405 [Verbose] > │ () │
00:00:11 #406 [Verbose] > │ │
00:00:11 #407 [Verbose] > │ │
00:00:11 #408 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #409 [Verbose] >
00:00:11 #410 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #411 [Verbose] > // // test
00:00:11 #412 [Verbose] >
00:00:11 #413 [Verbose] > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:00:11 #414 [Verbose] > ||> zip_with (optionm'.choose (+))
00:00:11 #415 [Verbose] > |> try_item 2i32
00:00:11 #416 [Verbose] > |> _assert_eq (Some 6)
00:00:11 #417 [Verbose] >
00:00:11 #418 [Verbose] > ╭─[ 251.47ms - stdout ]────────────────────────────────────────────────────────╮
00:00:11 #419 [Verbose] > │ type [<Struct>] US0 = │
00:00:11 #420 [Verbose] > │ | US0_0 │
00:00:11 #421 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:11 #422 [Verbose] > │ let rec method1 () : bool = │
00:00:11 #423 [Verbose] > │ true │
00:00:11 #424 [Verbose] > │ and method0 () : unit = │
00:00:11 #425 [Verbose] > │ let v3 : bool = method1() │
00:00:11 #426 [Verbose] > │ let v4 : US0 = US0_1(6) │
00:00:11 #427 [Verbose] > │ let v5 : US0 = US0_1(6) │
00:00:11 #428 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:11 #429 [Verbose] > │ let v7 : bool = v3 = false │
00:00:11 #430 [Verbose] > │ if v7 then │
00:00:11 #431 [Verbose] > │ failwith<unit> v6 │
00:00:11 #432 [Verbose] > │ method0() │
00:00:11 #433 [Verbose] > │ │
00:00:11 #434 [Verbose] > │ │
00:00:11 #435 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #436 [Verbose] >
00:00:11 #437 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:11 #438 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:11 #439 [Verbose] > │ ## fold │
00:00:11 #440 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:11 #441 [Verbose] >
00:00:11 #442 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:11 #443 [Verbose] > inl fold fn init seq =
00:00:11 #444 [Verbose] > inl rec loop acc n =
00:00:11 #445 [Verbose] > match seq n with
00:00:11 #446 [Verbose] > | Some x => loop (fn acc x) (n + 1)
00:00:11 #447 [Verbose] > | None => acc
00:00:11 #448 [Verbose] > loop init 0
00:00:11 #449 [Verbose] >
00:00:11 #450 [Verbose] > inl fold_ fn init seq =
00:00:11 #451 [Verbose] > let rec loop acc n =
00:00:11 #452 [Verbose] > match seq n with
00:00:11 #453 [Verbose] > | Some x => loop (fn acc x) (n + 1)
00:00:11 #454 [Verbose] > | None => acc
00:00:11 #455 [Verbose] > loop init 0
00:00:12 #456 [Verbose] >
00:00:12 #457 [Verbose] > ╭─[ 360.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #458 [Verbose] > │ () │
00:00:12 #459 [Verbose] > │ │
00:00:12 #460 [Verbose] > │ │
00:00:12 #461 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #462 [Verbose] >
00:00:12 #463 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #464 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #465 [Verbose] > │ ## sum │
00:00:12 #466 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #467 [Verbose] >
00:00:12 #468 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #469 [Verbose] > inl sum seq =
00:00:12 #470 [Verbose] > seq |> fold (+) 0
00:00:12 #471 [Verbose] >
00:00:12 #472 [Verbose] > inl sum_ seq =
00:00:12 #473 [Verbose] > seq |> fold_ (+) 0
00:00:12 #474 [Verbose] >
00:00:12 #475 [Verbose] > ╭─[ 229.29ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #476 [Verbose] > │ () │
00:00:12 #477 [Verbose] > │ │
00:00:12 #478 [Verbose] > │ │
00:00:12 #479 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #480 [Verbose] >
00:00:12 #481 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #482 [Verbose] > // // test
00:00:12 #483 [Verbose] >
00:00:12 #484 [Verbose] > listm.init 10i32 id
00:00:12 #485 [Verbose] > |> from_list
00:00:12 #486 [Verbose] > |> fun f (n : i32) => f n
00:00:12 #487 [Verbose] > |> sum
00:00:12 #488 [Verbose] > |> _assert_eq 45
00:00:12 #489 [Verbose] >
00:00:12 #490 [Verbose] > ╭─[ 207.21ms - stdout ]────────────────────────────────────────────────────────╮
00:00:12 #491 [Verbose] > │ let rec method1 () : bool = │
00:00:12 #492 [Verbose] > │ true │
00:00:12 #493 [Verbose] > │ and method0 () : unit = │
00:00:12 #494 [Verbose] > │ let v0 : bool = method1() │
00:00:12 #495 [Verbose] > │ let v1 : string = $"__expect / actual: %A{45} / expected: %A{45}" │
00:00:12 #496 [Verbose] > │ let v2 : bool = v0 = false │
00:00:12 #497 [Verbose] > │ if v2 then │
00:00:12 #498 [Verbose] > │ failwith<unit> v1 │
00:00:12 #499 [Verbose] > │ method0() │
00:00:12 #500 [Verbose] > │ │
00:00:12 #501 [Verbose] > │ │
00:00:12 #502 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #503 [Verbose] >
00:00:12 #504 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:12 #505 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:12 #506 [Verbose] > │ ## to_list │
00:00:12 #507 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:12 #508 [Verbose] >
00:00:12 #509 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:12 #510 [Verbose] > inl to_list seq =
00:00:12 #511 [Verbose] > seq
00:00:12 #512 [Verbose] > |> fold (fun acc x => x :: acc) [[]]
00:00:12 #513 [Verbose] > |> listm.rev
00:00:12 #514 [Verbose] >
00:00:12 #515 [Verbose] > inl to_list_ seq =
00:00:12 #516 [Verbose] > seq
00:00:12 #517 [Verbose] > |> fold_ (fun acc x => x :: acc) [[]]
00:00:12 #518 [Verbose] > |> listm.rev
00:00:13 #519 [Verbose] >
00:00:13 #520 [Verbose] > ╭─[ 239.09ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #521 [Verbose] > │ () │
00:00:13 #522 [Verbose] > │ │
00:00:13 #523 [Verbose] > │ │
00:00:13 #524 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #525 [Verbose] >
00:00:13 #526 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #527 [Verbose] > // // test
00:00:13 #528 [Verbose] >
00:00:13 #529 [Verbose] > listm.init 10i32 id
00:00:13 #530 [Verbose] > |> from_list
00:00:13 #531 [Verbose] > |> fun f (n : i32) => f n
00:00:13 #532 [Verbose] > |> to_list
00:00:13 #533 [Verbose] > |> _assert_eq (listm.init 10i32 id)
00:00:13 #534 [Verbose] >
00:00:13 #535 [Verbose] > ╭─[ 278.56ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #536 [Verbose] > │ type UH0 = │
00:00:13 #537 [Verbose] > │ | UH0_0 of int32 * UH0 │
00:00:13 #538 [Verbose] > │ | UH0_1 │
00:00:13 #539 [Verbose] > │ let rec method1 () : bool = │
00:00:13 #540 [Verbose] > │ true │
00:00:13 #541 [Verbose] > │ and method0 () : unit = │
00:00:13 #542 [Verbose] > │ let v88 : bool = method1() │
00:00:13 #543 [Verbose] > │ let v89 : UH0 = UH0_1 │
00:00:13 #544 [Verbose] > │ let v90 : UH0 = UH0_0(9, v89) │
00:00:13 #545 [Verbose] > │ let v91 : UH0 = UH0_0(8, v90) │
00:00:13 #546 [Verbose] > │ let v92 : UH0 = UH0_0(7, v91) │
00:00:13 #547 [Verbose] > │ let v93 : UH0 = UH0_0(6, v92) │
00:00:13 #548 [Verbose] > │ let v94 : UH0 = UH0_0(5, v93) │
00:00:13 #549 [Verbose] > │ let v95 : UH0 = UH0_0(4, v94) │
00:00:13 #550 [Verbose] > │ let v96 : UH0 = UH0_0(3, v95) │
00:00:13 #551 [Verbose] > │ let v97 : UH0 = UH0_0(2, v96) │
00:00:13 #552 [Verbose] > │ let v98 : UH0 = UH0_0(1, v97) │
00:00:13 #553 [Verbose] > │ let v99 : UH0 = UH0_0(0, v98) │
00:00:13 #554 [Verbose] > │ let v100 : UH0 = UH0_1 │
00:00:13 #555 [Verbose] > │ let v101 : UH0 = UH0_0(9, v100) │
00:00:13 #556 [Verbose] > │ let v102 : UH0 = UH0_0(8, v101) │
00:00:13 #557 [Verbose] > │ let v103 : UH0 = UH0_0(7, v102) │
00:00:13 #558 [Verbose] > │ let v104 : UH0 = UH0_0(6, v103) │
00:00:13 #559 [Verbose] > │ let v105 : UH0 = UH0_0(5, v104) │
00:00:13 #560 [Verbose] > │ let v106 : UH0 = UH0_0(4, v105) │
00:00:13 #561 [Verbose] > │ let v107 : UH0 = UH0_0(3, v106) │
00:00:13 #562 [Verbose] > │ let v108 : UH0 = UH0_0(2, v107) │
00:00:13 #563 [Verbose] > │ let v109 : UH0 = UH0_0(1, v108) │
00:00:13 #564 [Verbose] > │ let v110 : UH0 = UH0_0(0, v109) │
00:00:13 #565 [Verbose] > │ let v111 : string = $"__expect / actual: %A{v99} / expected: %A{v110}" │
00:00:13 #566 [Verbose] > │ let v112 : bool = v88 = false │
00:00:13 #567 [Verbose] > │ if v112 then │
00:00:13 #568 [Verbose] > │ failwith<unit> v111 │
00:00:13 #569 [Verbose] > │ method0() │
00:00:13 #570 [Verbose] > │ │
00:00:13 #571 [Verbose] > │ │
00:00:13 #572 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #573 [Verbose] >
00:00:13 #574 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #575 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #576 [Verbose] > │ ## from_array │
00:00:13 #577 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #578 [Verbose] >
00:00:13 #579 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #580 [Verbose] > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el =
00:00:13 #581 [Verbose] > fun n =>
00:00:13 #582 [Verbose] > if n >= length array
00:00:13 #583 [Verbose] > then None
00:00:13 #584 [Verbose] > else index array n |> Some
00:00:13 #585 [Verbose] >
00:00:13 #586 [Verbose] > ╭─[ 213.52ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #587 [Verbose] > │ () │
00:00:13 #588 [Verbose] > │ │
00:00:13 #589 [Verbose] > │ │
00:00:13 #590 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #591 [Verbose] >
00:00:13 #592 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #593 [Verbose] > // // test
00:00:13 #594 [Verbose] >
00:00:13 #595 [Verbose] > a ;[[ 1; 2; 3 ]]
00:00:13 #596 [Verbose] > |> from_array
00:00:13 #597 [Verbose] > |> try_item 1i32
00:00:13 #598 [Verbose] > |> _assert_eq (Some 2i32)
00:00:13 #599 [Verbose] >
00:00:13 #600 [Verbose] > ╭─[ 368.48ms - stdout ]────────────────────────────────────────────────────────╮
00:00:13 #601 [Verbose] > │ type [<Struct>] US0 = │
00:00:13 #602 [Verbose] > │ | US0_0 │
00:00:13 #603 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:13 #604 [Verbose] > │ let rec method1 (v0 : (int32 [])) : (int32 []) = │
00:00:13 #605 [Verbose] > │ v0 │
00:00:13 #606 [Verbose] > │ and method2 (v0 : bool) : bool = │
00:00:13 #607 [Verbose] > │ v0 │
00:00:13 #608 [Verbose] > │ and method0 () : unit = │
00:00:13 #609 [Verbose] > │ let v0 : (int32 []) = [|1; 2; 3|] │
00:00:13 #610 [Verbose] > │ let v1 : (int32 []) = method1(v0) │
00:00:13 #611 [Verbose] > │ let v2 : int32 = v1.Length │
00:00:13 #612 [Verbose] > │ let v3 : bool = 1 >= v2 │
00:00:13 #613 [Verbose] > │ let v7 : US0 = │
00:00:13 #614 [Verbose] > │ if v3 then │
00:00:13 #615 [Verbose] > │ US0_0 │
00:00:13 #616 [Verbose] > │ else │
00:00:13 #617 [Verbose] > │ let v5 : int32 = v1.[int 1] │
00:00:13 #618 [Verbose] > │ US0_1(v5) │
00:00:13 #619 [Verbose] > │ let v11 : bool = │
00:00:13 #620 [Verbose] > │ match v7 with │
00:00:13 #621 [Verbose] > │ | US0_1(v9) -> (* Some *) │
00:00:13 #622 [Verbose] > │ let v10 : bool = v9 = 2 │
00:00:13 #623 [Verbose] > │ v10 │
00:00:13 #624 [Verbose] > │ | _ -> │
00:00:13 #625 [Verbose] > │ false │
00:00:13 #626 [Verbose] > │ let v12 : bool = method2(v11) │
00:00:13 #627 [Verbose] > │ let v13 : US0 = US0_1(2) │
00:00:13 #628 [Verbose] > │ let v14 : string = $"__expect / actual: %A{v7} / expected: %A{v13}" │
00:00:13 #629 [Verbose] > │ let v15 : bool = v12 = false │
00:00:13 #630 [Verbose] > │ if v15 then │
00:00:13 #631 [Verbose] > │ failwith<unit> v14 │
00:00:13 #632 [Verbose] > │ method0() │
00:00:13 #633 [Verbose] > │ │
00:00:13 #634 [Verbose] > │ │
00:00:13 #635 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #636 [Verbose] >
00:00:13 #637 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #638 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #639 [Verbose] > │ ## to_array │
00:00:13 #640 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #641 [Verbose] >
00:00:13 #642 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:13 #643 [Verbose] > inl to_array seq =
00:00:13 #644 [Verbose] > inl ar = a ;[[]] |> mut
00:00:13 #645 [Verbose] > ((), seq)
00:00:13 #646 [Verbose] > ||> fold fun _ x =>
00:00:13 #647 [Verbose] > ar <- *ar /@ a ;[[x]]
00:00:13 #648 [Verbose] > *ar
00:00:13 #649 [Verbose] >
00:00:13 #650 [Verbose] > inl to_array_ seq =
00:00:13 #651 [Verbose] > inl ar = a ;[[]] |> mut
00:00:13 #652 [Verbose] > ((), seq)
00:00:13 #653 [Verbose] > ||> fold_ fun _ x =>
00:00:13 #654 [Verbose] > ar <- *ar /@ a ;[[x]]
00:00:13 #655 [Verbose] > *ar
00:00:14 #656 [Verbose] >
00:00:14 #657 [Verbose] > ╭─[ 207.20ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #658 [Verbose] > │ () │
00:00:14 #659 [Verbose] > │ │
00:00:14 #660 [Verbose] > │ │
00:00:14 #661 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #662 [Verbose] >
00:00:14 #663 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #664 [Verbose] > // // test
00:00:14 #665 [Verbose] >
00:00:14 #666 [Verbose] > listm.init 10i32 id
00:00:14 #667 [Verbose] > |> from_list
00:00:14 #668 [Verbose] > |> fun (x : i32 -> _) => x
00:00:14 #669 [Verbose] > |> to_array
00:00:14 #670 [Verbose] > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _)
00:00:14 #671 [Verbose] >
00:00:14 #672 [Verbose] > ╭─[ 467.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #673 [Verbose] > │ type Mut0 = {mutable l0 : (int32 [])} │
00:00:14 #674 [Verbose] > │ and Mut1 = {mutable l0 : int32} │
00:00:14 #675 [Verbose] > │ let rec method1 (v0 : (int32 [])) : (int32 []) = │
00:00:14 #676 [Verbose] > │ v0 │
00:00:14 #677 [Verbose] > │ and method2 (v0 : int32, v1 : Mut1) : bool = │
00:00:14 #678 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:14 #679 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:14 #680 [Verbose] > │ v3 │
00:00:14 #681 [Verbose] > │ and method3 (v0 : (int32 []), v1 : (int32 []), v2 : int32) : bool = │
00:00:14 #682 [Verbose] > │ let v3 : int32 = v0.Length │
00:00:14 #683 [Verbose] > │ let v4 : bool = v2 < v3 │
00:00:14 #684 [Verbose] > │ if v4 then │
00:00:14 #685 [Verbose] > │ let v5 : int32 = v0.[int v2] │
00:00:14 #686 [Verbose] > │ let v6 : int32 = v1.[int v2] │
00:00:14 #687 [Verbose] > │ let v7 : bool = v5 = v6 │
00:00:14 #688 [Verbose] > │ if v7 then │
00:00:14 #689 [Verbose] > │ let v8 : int32 = v2 + 1 │
00:00:14 #690 [Verbose] > │ method3(v0, v1, v8) │
00:00:14 #691 [Verbose] > │ else │
00:00:14 #692 [Verbose] > │ false │
00:00:14 #693 [Verbose] > │ else │
00:00:14 #694 [Verbose] > │ true │
00:00:14 #695 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:14 #696 [Verbose] > │ v0 │
00:00:14 #697 [Verbose] > │ and method0 () : unit = │
00:00:14 #698 [Verbose] > │ let v0 : (int32 []) = [||] │
00:00:14 #699 [Verbose] > │ let v1 : (int32 []) = method1(v0) │
00:00:14 #700 [Verbose] > │ let v2 : Mut0 = {l0 = v1} : Mut0 │
00:00:14 #701 [Verbose] > │ let v3 : (int32 []) = v2.l0 │
00:00:14 #702 [Verbose] > │ let v4 : (int32 []) = [|0|] │
00:00:14 #703 [Verbose] > │ let v5 : (int32 []) = method1(v4) │
00:00:14 #704 [Verbose] > │ let v6 : int32 = v3.Length │
00:00:14 #705 [Verbose] > │ let v7 : int32 = v5.Length │
00:00:14 #706 [Verbose] > │ let v8 : int32 = v6 + v7 │
00:00:14 #707 [Verbose] > │ let v9 : (int32 []) = Array.zeroCreate<int32> (v8) │
00:00:14 #708 [Verbose] > │ let v10 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #709 [Verbose] > │ while method2(v8, v10) do │
00:00:14 #710 [Verbose] > │ let v12 : int32 = v10.l0 │
00:00:14 #711 [Verbose] > │ let v13 : bool = v12 < v6 │
00:00:14 #712 [Verbose] > │ let v17 : int32 = │
00:00:14 #713 [Verbose] > │ if v13 then │
00:00:14 #714 [Verbose] > │ let v14 : int32 = v3.[int v12] │
00:00:14 #715 [Verbose] > │ v14 │
00:00:14 #716 [Verbose] > │ else │
00:00:14 #717 [Verbose] > │ let v15 : int32 = v12 - v6 │
00:00:14 #718 [Verbose] > │ let v16 : int32 = v5.[int v15] │
00:00:14 #719 [Verbose] > │ v16 │
00:00:14 #720 [Verbose] > │ v9.[int v12] <- v17 │
00:00:14 #721 [Verbose] > │ let v18 : int32 = v12 + 1 │
00:00:14 #722 [Verbose] > │ v10.l0 <- v18 │
00:00:14 #723 [Verbose] > │ () │
00:00:14 #724 [Verbose] > │ v2.l0 <- v9 │
00:00:14 #725 [Verbose] > │ let v19 : (int32 []) = v2.l0 │
00:00:14 #726 [Verbose] > │ let v20 : (int32 []) = [|1|] │
00:00:14 #727 [Verbose] > │ let v21 : (int32 []) = method1(v20) │
00:00:14 #728 [Verbose] > │ let v22 : int32 = v19.Length │
00:00:14 #729 [Verbose] > │ let v23 : int32 = v21.Length │
00:00:14 #730 [Verbose] > │ let v24 : int32 = v22 + v23 │
00:00:14 #731 [Verbose] > │ let v25 : (int32 []) = Array.zeroCreate<int32> (v24) │
00:00:14 #732 [Verbose] > │ let v26 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #733 [Verbose] > │ while method2(v24, v26) do │
00:00:14 #734 [Verbose] > │ let v28 : int32 = v26.l0 │
00:00:14 #735 [Verbose] > │ let v29 : bool = v28 < v22 │
00:00:14 #736 [Verbose] > │ let v33 : int32 = │
00:00:14 #737 [Verbose] > │ if v29 then │
00:00:14 #738 [Verbose] > │ let v30 : int32 = v19.[int v28] │
00:00:14 #739 [Verbose] > │ v30 │
00:00:14 #740 [Verbose] > │ else │
00:00:14 #741 [Verbose] > │ let v31 : int32 = v28 - v22 │
00:00:14 #742 [Verbose] > │ let v32 : int32 = v21.[int v31] │
00:00:14 #743 [Verbose] > │ v32 │
00:00:14 #744 [Verbose] > │ v25.[int v28] <- v33 │
00:00:14 #745 [Verbose] > │ let v34 : int32 = v28 + 1 │
00:00:14 #746 [Verbose] > │ v26.l0 <- v34 │
00:00:14 #747 [Verbose] > │ () │
00:00:14 #748 [Verbose] > │ v2.l0 <- v25 │
00:00:14 #749 [Verbose] > │ let v35 : (int32 []) = v2.l0 │
00:00:14 #750 [Verbose] > │ let v36 : (int32 []) = [|2|] │
00:00:14 #751 [Verbose] > │ let v37 : (int32 []) = method1(v36) │
00:00:14 #752 [Verbose] > │ let v38 : int32 = v35.Length │
00:00:14 #753 [Verbose] > │ let v39 : int32 = v37.Length │
00:00:14 #754 [Verbose] > │ let v40 : int32 = v38 + v39 │
00:00:14 #755 [Verbose] > │ let v41 : (int32 []) = Array.zeroCreate<int32> (v40) │
00:00:14 #756 [Verbose] > │ let v42 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #757 [Verbose] > │ while method2(v40, v42) do │
00:00:14 #758 [Verbose] > │ let v44 : int32 = v42.l0 │
00:00:14 #759 [Verbose] > │ let v45 : bool = v44 < v38 │
00:00:14 #760 [Verbose] > │ let v49 : int32 = │
00:00:14 #761 [Verbose] > │ if v45 then │
00:00:14 #762 [Verbose] > │ let v46 : int32 = v35.[int v44] │
00:00:14 #763 [Verbose] > │ v46 │
00:00:14 #764 [Verbose] > │ else │
00:00:14 #765 [Verbose] > │ let v47 : int32 = v44 - v38 │
00:00:14 #766 [Verbose] > │ let v48 : int32 = v37.[int v47] │
00:00:14 #767 [Verbose] > │ v48 │
00:00:14 #768 [Verbose] > │ v41.[int v44] <- v49 │
00:00:14 #769 [Verbose] > │ let v50 : int32 = v44 + 1 │
00:00:14 #770 [Verbose] > │ v42.l0 <- v50 │
00:00:14 #771 [Verbose] > │ () │
00:00:14 #772 [Verbose] > │ v2.l0 <- v41 │
00:00:14 #773 [Verbose] > │ let v51 : (int32 []) = v2.l0 │
00:00:14 #774 [Verbose] > │ let v52 : (int32 []) = [|3|] │
00:00:14 #775 [Verbose] > │ let v53 : (int32 []) = method1(v52) │
00:00:14 #776 [Verbose] > │ let v54 : int32 = v51.Length │
00:00:14 #777 [Verbose] > │ let v55 : int32 = v53.Length │
00:00:14 #778 [Verbose] > │ let v56 : int32 = v54 + v55 │
00:00:14 #779 [Verbose] > │ let v57 : (int32 []) = Array.zeroCreate<int32> (v56) │
00:00:14 #780 [Verbose] > │ let v58 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #781 [Verbose] > │ while method2(v56, v58) do │
00:00:14 #782 [Verbose] > │ let v60 : int32 = v58.l0 │
00:00:14 #783 [Verbose] > │ let v61 : bool = v60 < v54 │
00:00:14 #784 [Verbose] > │ let v65 : int32 = │
00:00:14 #785 [Verbose] > │ if v61 then │
00:00:14 #786 [Verbose] > │ let v62 : int32 = v51.[int v60] │
00:00:14 #787 [Verbose] > │ v62 │
00:00:14 #788 [Verbose] > │ else │
00:00:14 #789 [Verbose] > │ let v63 : int32 = v60 - v54 │
00:00:14 #790 [Verbose] > │ let v64 : int32 = v53.[int v63] │
00:00:14 #791 [Verbose] > │ v64 │
00:00:14 #792 [Verbose] > │ v57.[int v60] <- v65 │
00:00:14 #793 [Verbose] > │ let v66 : int32 = v60 + 1 │
00:00:14 #794 [Verbose] > │ v58.l0 <- v66 │
00:00:14 #795 [Verbose] > │ () │
00:00:14 #796 [Verbose] > │ v2.l0 <- v57 │
00:00:14 #797 [Verbose] > │ let v67 : (int32 []) = v2.l0 │
00:00:14 #798 [Verbose] > │ let v68 : (int32 []) = [|4|] │
00:00:14 #799 [Verbose] > │ let v69 : (int32 []) = method1(v68) │
00:00:14 #800 [Verbose] > │ let v70 : int32 = v67.Length │
00:00:14 #801 [Verbose] > │ let v71 : int32 = v69.Length │
00:00:14 #802 [Verbose] > │ let v72 : int32 = v70 + v71 │
00:00:14 #803 [Verbose] > │ let v73 : (int32 []) = Array.zeroCreate<int32> (v72) │
00:00:14 #804 [Verbose] > │ let v74 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #805 [Verbose] > │ while method2(v72, v74) do │
00:00:14 #806 [Verbose] > │ let v76 : int32 = v74.l0 │
00:00:14 #807 [Verbose] > │ let v77 : bool = v76 < v70 │
00:00:14 #808 [Verbose] > │ let v81 : int32 = │
00:00:14 #809 [Verbose] > │ if v77 then │
00:00:14 #810 [Verbose] > │ let v78 : int32 = v67.[int v76] │
00:00:14 #811 [Verbose] > │ v78 │
00:00:14 #812 [Verbose] > │ else │
00:00:14 #813 [Verbose] > │ let v79 : int32 = v76 - v70 │
00:00:14 #814 [Verbose] > │ let v80 : int32 = v69.[int v79] │
00:00:14 #815 [Verbose] > │ v80 │
00:00:14 #816 [Verbose] > │ v73.[int v76] <- v81 │
00:00:14 #817 [Verbose] > │ let v82 : int32 = v76 + 1 │
00:00:14 #818 [Verbose] > │ v74.l0 <- v82 │
00:00:14 #819 [Verbose] > │ () │
00:00:14 #820 [Verbose] > │ v2.l0 <- v73 │
00:00:14 #821 [Verbose] > │ let v83 : (int32 []) = v2.l0 │
00:00:14 #822 [Verbose] > │ let v84 : (int32 []) = [|5|] │
00:00:14 #823 [Verbose] > │ let v85 : (int32 []) = method1(v84) │
00:00:14 #824 [Verbose] > │ let v86 : int32 = v83.Length │
00:00:14 #825 [Verbose] > │ let v87 : int32 = v85.Length │
00:00:14 #826 [Verbose] > │ let v88 : int32 = v86 + v87 │
00:00:14 #827 [Verbose] > │ let v89 : (int32 []) = Array.zeroCreate<int32> (v88) │
00:00:14 #828 [Verbose] > │ let v90 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #829 [Verbose] > │ while method2(v88, v90) do │
00:00:14 #830 [Verbose] > │ let v92 : int32 = v90.l0 │
00:00:14 #831 [Verbose] > │ let v93 : bool = v92 < v86 │
00:00:14 #832 [Verbose] > │ let v97 : int32 = │
00:00:14 #833 [Verbose] > │ if v93 then │
00:00:14 #834 [Verbose] > │ let v94 : int32 = v83.[int v92] │
00:00:14 #835 [Verbose] > │ v94 │
00:00:14 #836 [Verbose] > │ else │
00:00:14 #837 [Verbose] > │ let v95 : int32 = v92 - v86 │
00:00:14 #838 [Verbose] > │ let v96 : int32 = v85.[int v95] │
00:00:14 #839 [Verbose] > │ v96 │
00:00:14 #840 [Verbose] > │ v89.[int v92] <- v97 │
00:00:14 #841 [Verbose] > │ let v98 : int32 = v92 + 1 │
00:00:14 #842 [Verbose] > │ v90.l0 <- v98 │
00:00:14 #843 [Verbose] > │ () │
00:00:14 #844 [Verbose] > │ v2.l0 <- v89 │
00:00:14 #845 [Verbose] > │ let v99 : (int32 []) = v2.l0 │
00:00:14 #846 [Verbose] > │ let v100 : (int32 []) = [|6|] │
00:00:14 #847 [Verbose] > │ let v101 : (int32 []) = method1(v100) │
00:00:14 #848 [Verbose] > │ let v102 : int32 = v99.Length │
00:00:14 #849 [Verbose] > │ let v103 : int32 = v101.Length │
00:00:14 #850 [Verbose] > │ let v104 : int32 = v102 + v103 │
00:00:14 #851 [Verbose] > │ let v105 : (int32 []) = Array.zeroCreate<int32> (v104) │
00:00:14 #852 [Verbose] > │ let v106 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #853 [Verbose] > │ while method2(v104, v106) do │
00:00:14 #854 [Verbose] > │ let v108 : int32 = v106.l0 │
00:00:14 #855 [Verbose] > │ let v109 : bool = v108 < v102 │
00:00:14 #856 [Verbose] > │ let v113 : int32 = │
00:00:14 #857 [Verbose] > │ if v109 then │
00:00:14 #858 [Verbose] > │ let v110 : int32 = v99.[int v108] │
00:00:14 #859 [Verbose] > │ v110 │
00:00:14 #860 [Verbose] > │ else │
00:00:14 #861 [Verbose] > │ let v111 : int32 = v108 - v102 │
00:00:14 #862 [Verbose] > │ let v112 : int32 = v101.[int v111] │
00:00:14 #863 [Verbose] > │ v112 │
00:00:14 #864 [Verbose] > │ v105.[int v108] <- v113 │
00:00:14 #865 [Verbose] > │ let v114 : int32 = v108 + 1 │
00:00:14 #866 [Verbose] > │ v106.l0 <- v114 │
00:00:14 #867 [Verbose] > │ () │
00:00:14 #868 [Verbose] > │ v2.l0 <- v105 │
00:00:14 #869 [Verbose] > │ let v115 : (int32 []) = v2.l0 │
00:00:14 #870 [Verbose] > │ let v116 : (int32 []) = [|7|] │
00:00:14 #871 [Verbose] > │ let v117 : (int32 []) = method1(v116) │
00:00:14 #872 [Verbose] > │ let v118 : int32 = v115.Length │
00:00:14 #873 [Verbose] > │ let v119 : int32 = v117.Length │
00:00:14 #874 [Verbose] > │ let v120 : int32 = v118 + v119 │
00:00:14 #875 [Verbose] > │ let v121 : (int32 []) = Array.zeroCreate<int32> (v120) │
00:00:14 #876 [Verbose] > │ let v122 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #877 [Verbose] > │ while method2(v120, v122) do │
00:00:14 #878 [Verbose] > │ let v124 : int32 = v122.l0 │
00:00:14 #879 [Verbose] > │ let v125 : bool = v124 < v118 │
00:00:14 #880 [Verbose] > │ let v129 : int32 = │
00:00:14 #881 [Verbose] > │ if v125 then │
00:00:14 #882 [Verbose] > │ let v126 : int32 = v115.[int v124] │
00:00:14 #883 [Verbose] > │ v126 │
00:00:14 #884 [Verbose] > │ else │
00:00:14 #885 [Verbose] > │ let v127 : int32 = v124 - v118 │
00:00:14 #886 [Verbose] > │ let v128 : int32 = v117.[int v127] │
00:00:14 #887 [Verbose] > │ v128 │
00:00:14 #888 [Verbose] > │ v121.[int v124] <- v129 │
00:00:14 #889 [Verbose] > │ let v130 : int32 = v124 + 1 │
00:00:14 #890 [Verbose] > │ v122.l0 <- v130 │
00:00:14 #891 [Verbose] > │ () │
00:00:14 #892 [Verbose] > │ v2.l0 <- v121 │
00:00:14 #893 [Verbose] > │ let v131 : (int32 []) = v2.l0 │
00:00:14 #894 [Verbose] > │ let v132 : (int32 []) = [|8|] │
00:00:14 #895 [Verbose] > │ let v133 : (int32 []) = method1(v132) │
00:00:14 #896 [Verbose] > │ let v134 : int32 = v131.Length │
00:00:14 #897 [Verbose] > │ let v135 : int32 = v133.Length │
00:00:14 #898 [Verbose] > │ let v136 : int32 = v134 + v135 │
00:00:14 #899 [Verbose] > │ let v137 : (int32 []) = Array.zeroCreate<int32> (v136) │
00:00:14 #900 [Verbose] > │ let v138 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #901 [Verbose] > │ while method2(v136, v138) do │
00:00:14 #902 [Verbose] > │ let v140 : int32 = v138.l0 │
00:00:14 #903 [Verbose] > │ let v141 : bool = v140 < v134 │
00:00:14 #904 [Verbose] > │ let v145 : int32 = │
00:00:14 #905 [Verbose] > │ if v141 then │
00:00:14 #906 [Verbose] > │ let v142 : int32 = v131.[int v140] │
00:00:14 #907 [Verbose] > │ v142 │
00:00:14 #908 [Verbose] > │ else │
00:00:14 #909 [Verbose] > │ let v143 : int32 = v140 - v134 │
00:00:14 #910 [Verbose] > │ let v144 : int32 = v133.[int v143] │
00:00:14 #911 [Verbose] > │ v144 │
00:00:14 #912 [Verbose] > │ v137.[int v140] <- v145 │
00:00:14 #913 [Verbose] > │ let v146 : int32 = v140 + 1 │
00:00:14 #914 [Verbose] > │ v138.l0 <- v146 │
00:00:14 #915 [Verbose] > │ () │
00:00:14 #916 [Verbose] > │ v2.l0 <- v137 │
00:00:14 #917 [Verbose] > │ let v147 : (int32 []) = v2.l0 │
00:00:14 #918 [Verbose] > │ let v148 : (int32 []) = [|9|] │
00:00:14 #919 [Verbose] > │ let v149 : (int32 []) = method1(v148) │
00:00:14 #920 [Verbose] > │ let v150 : int32 = v147.Length │
00:00:14 #921 [Verbose] > │ let v151 : int32 = v149.Length │
00:00:14 #922 [Verbose] > │ let v152 : int32 = v150 + v151 │
00:00:14 #923 [Verbose] > │ let v153 : (int32 []) = Array.zeroCreate<int32> (v152) │
00:00:14 #924 [Verbose] > │ let v154 : Mut1 = {l0 = 0} : Mut1 │
00:00:14 #925 [Verbose] > │ while method2(v152, v154) do │
00:00:14 #926 [Verbose] > │ let v156 : int32 = v154.l0 │
00:00:14 #927 [Verbose] > │ let v157 : bool = v156 < v150 │
00:00:14 #928 [Verbose] > │ let v161 : int32 = │
00:00:14 #929 [Verbose] > │ if v157 then │
00:00:14 #930 [Verbose] > │ let v158 : int32 = v147.[int v156] │
00:00:14 #931 [Verbose] > │ v158 │
00:00:14 #932 [Verbose] > │ else │
00:00:14 #933 [Verbose] > │ let v159 : int32 = v156 - v150 │
00:00:14 #934 [Verbose] > │ let v160 : int32 = v149.[int v159] │
00:00:14 #935 [Verbose] > │ v160 │
00:00:14 #936 [Verbose] > │ v153.[int v156] <- v161 │
00:00:14 #937 [Verbose] > │ let v162 : int32 = v156 + 1 │
00:00:14 #938 [Verbose] > │ v154.l0 <- v162 │
00:00:14 #939 [Verbose] > │ () │
00:00:14 #940 [Verbose] > │ v2.l0 <- v153 │
00:00:14 #941 [Verbose] > │ let v163 : (int32 []) = v2.l0 │
00:00:14 #942 [Verbose] > │ let v164 : (int32 []) = [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] │
00:00:14 #943 [Verbose] > │ let v165 : (int32 []) = method1(v164) │
00:00:14 #944 [Verbose] > │ let v166 : int32 = v163.Length │
00:00:14 #945 [Verbose] > │ let v167 : int32 = v165.Length │
00:00:14 #946 [Verbose] > │ let v168 : bool = v166 = v167 │
00:00:14 #947 [Verbose] > │ let v169 : bool = v168 <> true │
00:00:14 #948 [Verbose] > │ let v172 : bool = │
00:00:14 #949 [Verbose] > │ if v169 then │
00:00:14 #950 [Verbose] > │ false │
00:00:14 #951 [Verbose] > │ else │
00:00:14 #952 [Verbose] > │ let v170 : int32 = 0 │
00:00:14 #953 [Verbose] > │ method3(v163, v165, v170) │
00:00:14 #954 [Verbose] > │ let v173 : bool = method4(v172) │
00:00:14 #955 [Verbose] > │ let v174 : string = $"__expect / actual: %A{v163} / expected: %A{v165}" │
00:00:14 #956 [Verbose] > │ let v175 : bool = v173 = false │
00:00:14 #957 [Verbose] > │ if v175 then │
00:00:14 #958 [Verbose] > │ failwith<unit> v174 │
00:00:14 #959 [Verbose] > │ method0() │
00:00:14 #960 [Verbose] > │ │
00:00:14 #961 [Verbose] > │ │
00:00:14 #962 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #963 [Verbose] >
00:00:14 #964 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #965 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #966 [Verbose] > │ ## take_while │
00:00:14 #967 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #968 [Verbose] >
00:00:14 #969 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #970 [Verbose] > inl take_while cond seq =
00:00:14 #971 [Verbose] > inl rec loop acc i =
00:00:14 #972 [Verbose] > match seq i with
00:00:14 #973 [Verbose] > | Some st when cond st i => loop (st :: acc) (i + 1)
00:00:14 #974 [Verbose] > | _ => acc |> listm.rev
00:00:14 #975 [Verbose] > loop [[]] 0
00:00:14 #976 [Verbose] >
00:00:14 #977 [Verbose] > ╭─[ 191.35ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #978 [Verbose] > │ () │
00:00:14 #979 [Verbose] > │ │
00:00:14 #980 [Verbose] > │ │
00:00:14 #981 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #982 [Verbose] >
00:00:14 #983 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #984 [Verbose] > // // test
00:00:14 #985 [Verbose] >
00:00:14 #986 [Verbose] > listm.init 10i32 id
00:00:14 #987 [Verbose] > |> from_list
00:00:14 #988 [Verbose] > |> take_while (fun n (_ : i32) => n < 5)
00:00:14 #989 [Verbose] > |> listm'.sum
00:00:14 #990 [Verbose] > |> _assert_eq 10
00:00:15 #991 [Verbose] >
00:00:15 #992 [Verbose] > ╭─[ 217.57ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #993 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #994 [Verbose] > │ true │
00:00:15 #995 [Verbose] > │ and method0 () : unit = │
00:00:15 #996 [Verbose] > │ let v0 : bool = method1() │
00:00:15 #997 [Verbose] > │ let v1 : string = $"__expect / actual: %A{10} / expected: %A{10}" │
00:00:15 #998 [Verbose] > │ let v2 : bool = v0 = false │
00:00:15 #999 [Verbose] > │ if v2 then │
00:00:15 #1000 [Verbose] > │ failwith<unit> v1 │
00:00:15 #1001 [Verbose] > │ method0() │
00:00:15 #1002 [Verbose] > │ │
00:00:15 #1003 [Verbose] > │ │
00:00:15 #1004 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1005 [Verbose] >
00:00:15 #1006 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #1007 [Verbose] > // // test
00:00:15 #1008 [Verbose] >
00:00:15 #1009 [Verbose] > stream.new_finite_stream print_and_return 10i32
00:00:15 #1010 [Verbose] > |> flip stream.try_item
00:00:15 #1011 [Verbose] > |> take_while (fun n (_ : i32) => n < 5)
00:00:15 #1012 [Verbose] > |> listm'.sum
00:00:15 #1013 [Verbose] > |> _assert_eq 10
00:00:15 #1014 [Verbose] >
00:00:15 #1015 [Verbose] > ╭─[ 333.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #1016 [Verbose] > │ let rec method1 () : bool = │
00:00:15 #1017 [Verbose] > │ true │
00:00:15 #1018 [Verbose] > │ and method0 () : unit = │
00:00:15 #1019 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:15 #1020 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:15 #1021 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:15 #1022 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:15 #1023 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:15 #1024 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:15 #1025 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:15 #1026 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:15 #1027 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:15 #1028 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:15 #1029 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:15 #1030 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:15 #1031 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:15 #1032 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:15 #1033 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:15 #1034 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:15 #1035 [Verbose] > │ let v0 : bool = method1() │
00:00:15 #1036 [Verbose] > │ let v1 : string = $"__expect / actual: %A{10} / expected: %A{10}" │
00:00:15 #1037 [Verbose] > │ let v2 : bool = v0 = false │
00:00:15 #1038 [Verbose] > │ if v2 then │
00:00:15 #1039 [Verbose] > │ failwith<unit> v1 │
00:00:15 #1040 [Verbose] > │ method0() │
00:00:15 #1041 [Verbose] > │ │
00:00:15 #1042 [Verbose] > │ print_and_return / x: 0 │
00:00:15 #1043 [Verbose] > │ print_and_return / x: 1 │
00:00:15 #1044 [Verbose] > │ print_and_return / x: 1 │
00:00:15 #1045 [Verbose] > │ print_and_return / x: 2 │
00:00:15 #1046 [Verbose] > │ print_and_return / x: 1 │
00:00:15 #1047 [Verbose] > │ print_and_return / x: 2 │
00:00:15 #1048 [Verbose] > │ print_and_return / x: 3 │
00:00:15 #1049 [Verbose] > │ print_and_return / x: 1 │
00:00:15 #1050 [Verbose] > │ print_and_return / x: 2 │
00:00:15 #1051 [Verbose] > │ print_and_return / x: 3 │
00:00:15 #1052 [Verbose] > │ print_and_return / x: 4 │
00:00:15 #1053 [Verbose] > │ print_and_return / x: 1 │
00:00:15 #1054 [Verbose] > │ print_and_return / x: 2 │
00:00:15 #1055 [Verbose] > │ print_and_return / x: 3 │
00:00:15 #1056 [Verbose] > │ print_and_return / x: 4 │
00:00:15 #1057 [Verbose] > │ print_and_return / x: 5 │
00:00:15 #1058 [Verbose] > │ │
00:00:15 #1059 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1060 [Verbose] >
00:00:15 #1061 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #1062 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #1063 [Verbose] > │ ## take_while_ │
00:00:15 #1064 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1065 [Verbose] >
00:00:15 #1066 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #1067 [Verbose] > inl take_while_ cond seq =
00:00:15 #1068 [Verbose] > let rec loop acc i =
00:00:15 #1069 [Verbose] > match seq i with
00:00:15 #1070 [Verbose] > | Some st when cond st i => loop (st :: acc) (i + 1)
00:00:15 #1071 [Verbose] > | _ => acc |> listm.rev
00:00:15 #1072 [Verbose] > loop [[]] 0
00:00:15 #1073 [Verbose] >
00:00:15 #1074 [Verbose] > ╭─[ 248.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #1075 [Verbose] > │ () │
00:00:15 #1076 [Verbose] > │ │
00:00:15 #1077 [Verbose] > │ │
00:00:15 #1078 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #1079 [Verbose] >
00:00:15 #1080 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #1081 [Verbose] > // // test
00:00:15 #1082 [Verbose] >
00:00:15 #1083 [Verbose] > stream.new_infinite_stream_ print_and_return
00:00:15 #1084 [Verbose] > |> flip stream.try_item
00:00:15 #1085 [Verbose] > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:00:15 #1086 [Verbose] > |> listm'.sum
00:00:15 #1087 [Verbose] > |> _assert_eq 10
00:00:16 #1088 [Verbose] >
00:00:16 #1089 [Verbose] > ╭─[ 348.69ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1090 [Verbose] > │ type UH0 = │
00:00:16 #1091 [Verbose] > │ | UH0_0 of int32 * (unit -> UH0) │
00:00:16 #1092 [Verbose] > │ | UH0_1 │
00:00:16 #1093 [Verbose] > │ and UH1 = │
00:00:16 #1094 [Verbose] > │ | UH1_0 of int32 * UH1 │
00:00:16 #1095 [Verbose] > │ | UH1_1 │
00:00:16 #1096 [Verbose] > │ and [<Struct>] US0 = │
00:00:16 #1097 [Verbose] > │ | US0_0 │
00:00:16 #1098 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:16 #1099 [Verbose] > │ let rec closure0 (v0 : int32) () : UH0 = │
00:00:16 #1100 [Verbose] > │ let v1 : int32 = v0 + 1 │
00:00:16 #1101 [Verbose] > │ method1(v1) │
00:00:16 #1102 [Verbose] > │ and method1 (v0 : int32) : UH0 = │
00:00:16 #1103 [Verbose] > │ printfn $"print_and_return / x: {v0}" │
00:00:16 #1104 [Verbose] > │ let v1 : (unit -> UH0) = closure0(v0) │
00:00:16 #1105 [Verbose] > │ UH0_0(v0, v1) │
00:00:16 #1106 [Verbose] > │ and method3 (v0 : int32, v1 : UH0) : US0 = │
00:00:16 #1107 [Verbose] > │ match v1 with │
00:00:16 #1108 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:16 #1109 [Verbose] > │ let v4 : bool = v0 <= 0 │
00:00:16 #1110 [Verbose] > │ if v4 then │
00:00:16 #1111 [Verbose] > │ US0_1(v2) │
00:00:16 #1112 [Verbose] > │ else │
00:00:16 #1113 [Verbose] > │ let v6 : int32 = v0 - 1 │
00:00:16 #1114 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:16 #1115 [Verbose] > │ method3(v6, v7) │
00:00:16 #1116 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:16 #1117 [Verbose] > │ US0_0 │
00:00:16 #1118 [Verbose] > │ and method4 (v0 : UH1, v1 : UH1) : UH1 = │
00:00:16 #1119 [Verbose] > │ match v0 with │
00:00:16 #1120 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:16 #1121 [Verbose] > │ let v4 : UH1 = UH1_0(v2, v1) │
00:00:16 #1122 [Verbose] > │ method4(v3, v4) │
00:00:16 #1123 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:16 #1124 [Verbose] > │ v1 │
00:00:16 #1125 [Verbose] > │ and method2 (v0 : UH0, v1 : UH1, v2 : int32) : UH1 = │
00:00:16 #1126 [Verbose] > │ let v3 : US0 = method3(v2, v0) │
00:00:16 #1127 [Verbose] > │ match v3 with │
00:00:16 #1128 [Verbose] > │ | US0_1(v4) -> (* Some *) │
00:00:16 #1129 [Verbose] > │ let v5 : bool = v4 < 5 │
00:00:16 #1130 [Verbose] > │ if v5 then │
00:00:16 #1131 [Verbose] > │ let v6 : UH1 = UH1_0(v4, v1) │
00:00:16 #1132 [Verbose] > │ let v7 : int32 = v2 + 1 │
00:00:16 #1133 [Verbose] > │ method2(v0, v6, v7) │
00:00:16 #1134 [Verbose] > │ else │
00:00:16 #1135 [Verbose] > │ let v9 : UH1 = UH1_1 │
00:00:16 #1136 [Verbose] > │ method4(v1, v9) │
00:00:16 #1137 [Verbose] > │ | _ -> │
00:00:16 #1138 [Verbose] > │ let v12 : UH1 = UH1_1 │
00:00:16 #1139 [Verbose] > │ method4(v1, v12) │
00:00:16 #1140 [Verbose] > │ and method5 (v0 : UH1, v1 : int32) : int32 = │
00:00:16 #1141 [Verbose] > │ match v0 with │
00:00:16 #1142 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:16 #1143 [Verbose] > │ let v4 : int32 = v1 + v2 │
00:00:16 #1144 [Verbose] > │ method5(v3, v4) │
00:00:16 #1145 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:16 #1146 [Verbose] > │ v1 │
00:00:16 #1147 [Verbose] > │ and method6 (v0 : bool) : bool = │
00:00:16 #1148 [Verbose] > │ v0 │
00:00:16 #1149 [Verbose] > │ and method0 () : unit = │
00:00:16 #1150 [Verbose] > │ let v0 : int32 = 0 │
00:00:16 #1151 [Verbose] > │ let v1 : UH0 = method1(v0) │
00:00:16 #1152 [Verbose] > │ let v2 : UH1 = UH1_1 │
00:00:16 #1153 [Verbose] > │ let v3 : int32 = 0 │
00:00:16 #1154 [Verbose] > │ let v4 : UH1 = method2(v1, v2, v3) │
00:00:16 #1155 [Verbose] > │ let v5 : int32 = 0 │
00:00:16 #1156 [Verbose] > │ let v6 : int32 = method5(v4, v5) │
00:00:16 #1157 [Verbose] > │ let v7 : bool = v6 = 10 │
00:00:16 #1158 [Verbose] > │ let v8 : bool = method6(v7) │
00:00:16 #1159 [Verbose] > │ let v9 : string = $"__expect / actual: %A{v6} / expected: %A{10}" │
00:00:16 #1160 [Verbose] > │ let v10 : bool = v8 = false │
00:00:16 #1161 [Verbose] > │ if v10 then │
00:00:16 #1162 [Verbose] > │ failwith<unit> v9 │
00:00:16 #1163 [Verbose] > │ method0() │
00:00:16 #1164 [Verbose] > │ │
00:00:16 #1165 [Verbose] > │ print_and_return / x: 0 │
00:00:16 #1166 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1167 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1168 [Verbose] > │ print_and_return / x: 2 │
00:00:16 #1169 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1170 [Verbose] > │ print_and_return / x: 2 │
00:00:16 #1171 [Verbose] > │ print_and_return / x: 3 │
00:00:16 #1172 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1173 [Verbose] > │ print_and_return / x: 2 │
00:00:16 #1174 [Verbose] > │ print_and_return / x: 3 │
00:00:16 #1175 [Verbose] > │ print_and_return / x: 4 │
00:00:16 #1176 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1177 [Verbose] > │ print_and_return / x: 2 │
00:00:16 #1178 [Verbose] > │ print_and_return / x: 3 │
00:00:16 #1179 [Verbose] > │ print_and_return / x: 4 │
00:00:16 #1180 [Verbose] > │ print_and_return / x: 5 │
00:00:16 #1181 [Verbose] > │ │
00:00:16 #1182 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1183 [Verbose] >
00:00:16 #1184 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #1185 [Verbose] > // // test
00:00:16 #1186 [Verbose] >
00:00:16 #1187 [Verbose] > stream.new_infinite_stream_ print_and_return
00:00:16 #1188 [Verbose] > |> stream.memoize
00:00:16 #1189 [Verbose] > |> fun list =>
00:00:16 #1190 [Verbose] > inl list = list ()
00:00:16 #1191 [Verbose] > fun n =>
00:00:16 #1192 [Verbose] > list |> stream.try_item n
00:00:16 #1193 [Verbose] > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:00:16 #1194 [Verbose] > |> listm'.sum
00:00:16 #1195 [Verbose] > |> _assert_eq 10
00:00:16 #1196 [Verbose] >
00:00:16 #1197 [Verbose] > ╭─[ 409.86ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1198 [Verbose] > │ type UH0 = │
00:00:16 #1199 [Verbose] > │ | UH0_0 of int32 * (unit -> UH0) │
00:00:16 #1200 [Verbose] > │ | UH0_1 │
00:00:16 #1201 [Verbose] > │ and [<Struct>] US0 = │
00:00:16 #1202 [Verbose] > │ | US0_0 of f0_0 : UH0 │
00:00:16 #1203 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH0) │
00:00:16 #1204 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:16 #1205 [Verbose] > │ and UH1 = │
00:00:16 #1206 [Verbose] > │ | UH1_0 of int32 * UH1 │
00:00:16 #1207 [Verbose] > │ | UH1_1 │
00:00:16 #1208 [Verbose] > │ and [<Struct>] US1 = │
00:00:16 #1209 [Verbose] > │ | US1_0 │
00:00:16 #1210 [Verbose] > │ | US1_1 of f1_0 : int32 │
00:00:16 #1211 [Verbose] > │ let rec closure0 (v0 : int32) () : UH0 = │
00:00:16 #1212 [Verbose] > │ let v1 : int32 = v0 + 1 │
00:00:16 #1213 [Verbose] > │ method1(v1) │
00:00:16 #1214 [Verbose] > │ and method1 (v0 : int32) : UH0 = │
00:00:16 #1215 [Verbose] > │ printfn $"print_and_return / x: {v0}" │
00:00:16 #1216 [Verbose] > │ let v1 : (unit -> UH0) = closure0(v0) │
00:00:16 #1217 [Verbose] > │ UH0_0(v0, v1) │
00:00:16 #1218 [Verbose] > │ and closure1 (v0 : UH0) () : UH0 = │
00:00:16 #1219 [Verbose] > │ v0 │
00:00:16 #1220 [Verbose] > │ and closure2 (v0 : UH0, v1 : Mut0) () : UH0 = │
00:00:16 #1221 [Verbose] > │ let v2 : US0 = v1.l0 │
00:00:16 #1222 [Verbose] > │ match v2 with │
00:00:16 #1223 [Verbose] > │ | US0_0(v3) -> (* Computed *) │
00:00:16 #1224 [Verbose] > │ v3 │
00:00:16 #1225 [Verbose] > │ | US0_1(v4) -> (* NotComputed *) │
00:00:16 #1226 [Verbose] > │ let v5 : UH0 = v4 () │
00:00:16 #1227 [Verbose] > │ let v12 : UH0 = │
00:00:16 #1228 [Verbose] > │ match v5 with │
00:00:16 #1229 [Verbose] > │ | UH0_0(v7, v8) -> (* StreamCons *) │
00:00:16 #1230 [Verbose] > │ let v9 : (unit -> UH0) = method2(v0, v8) │
00:00:16 #1231 [Verbose] > │ UH0_0(v7, v9) │
00:00:16 #1232 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:16 #1233 [Verbose] > │ UH0_1 │
00:00:16 #1234 [Verbose] > │ let v13 : US0 = US0_0(v12) │
00:00:16 #1235 [Verbose] > │ v1.l0 <- v13 │
00:00:16 #1236 [Verbose] > │ v12 │
00:00:16 #1237 [Verbose] > │ and method2 (v0 : UH0, v1 : (unit -> UH0)) : (unit -> UH0) = │
00:00:16 #1238 [Verbose] > │ let v2 : US0 = US0_1(v1) │
00:00:16 #1239 [Verbose] > │ let v3 : Mut0 = {l0 = v2} : Mut0 │
00:00:16 #1240 [Verbose] > │ closure2(v0, v3) │
00:00:16 #1241 [Verbose] > │ and method4 (v0 : int32, v1 : UH0) : US1 = │
00:00:16 #1242 [Verbose] > │ match v1 with │
00:00:16 #1243 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:16 #1244 [Verbose] > │ let v4 : bool = v0 <= 0 │
00:00:16 #1245 [Verbose] > │ if v4 then │
00:00:16 #1246 [Verbose] > │ US1_1(v2) │
00:00:16 #1247 [Verbose] > │ else │
00:00:16 #1248 [Verbose] > │ let v6 : int32 = v0 - 1 │
00:00:16 #1249 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:16 #1250 [Verbose] > │ method4(v6, v7) │
00:00:16 #1251 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:16 #1252 [Verbose] > │ US1_0 │
00:00:16 #1253 [Verbose] > │ and method5 (v0 : UH1, v1 : UH1) : UH1 = │
00:00:16 #1254 [Verbose] > │ match v0 with │
00:00:16 #1255 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:16 #1256 [Verbose] > │ let v4 : UH1 = UH1_0(v2, v1) │
00:00:16 #1257 [Verbose] > │ method5(v3, v4) │
00:00:16 #1258 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:16 #1259 [Verbose] > │ v1 │
00:00:16 #1260 [Verbose] > │ and method3 (v0 : UH0, v1 : UH1, v2 : int32) : UH1 = │
00:00:16 #1261 [Verbose] > │ let v3 : US1 = method4(v2, v0) │
00:00:16 #1262 [Verbose] > │ match v3 with │
00:00:16 #1263 [Verbose] > │ | US1_1(v4) -> (* Some *) │
00:00:16 #1264 [Verbose] > │ let v5 : bool = v4 < 5 │
00:00:16 #1265 [Verbose] > │ if v5 then │
00:00:16 #1266 [Verbose] > │ let v6 : UH1 = UH1_0(v4, v1) │
00:00:16 #1267 [Verbose] > │ let v7 : int32 = v2 + 1 │
00:00:16 #1268 [Verbose] > │ method3(v0, v6, v7) │
00:00:16 #1269 [Verbose] > │ else │
00:00:16 #1270 [Verbose] > │ let v9 : UH1 = UH1_1 │
00:00:16 #1271 [Verbose] > │ method5(v1, v9) │
00:00:16 #1272 [Verbose] > │ | _ -> │
00:00:16 #1273 [Verbose] > │ let v12 : UH1 = UH1_1 │
00:00:16 #1274 [Verbose] > │ method5(v1, v12) │
00:00:16 #1275 [Verbose] > │ and method6 (v0 : UH1, v1 : int32) : int32 = │
00:00:16 #1276 [Verbose] > │ match v0 with │
00:00:16 #1277 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:16 #1278 [Verbose] > │ let v4 : int32 = v1 + v2 │
00:00:16 #1279 [Verbose] > │ method6(v3, v4) │
00:00:16 #1280 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:16 #1281 [Verbose] > │ v1 │
00:00:16 #1282 [Verbose] > │ and method7 (v0 : bool) : bool = │
00:00:16 #1283 [Verbose] > │ v0 │
00:00:16 #1284 [Verbose] > │ and method0 () : unit = │
00:00:16 #1285 [Verbose] > │ let v0 : int32 = 0 │
00:00:16 #1286 [Verbose] > │ let v1 : UH0 = method1(v0) │
00:00:16 #1287 [Verbose] > │ let v2 : (unit -> UH0) = closure1(v1) │
00:00:16 #1288 [Verbose] > │ let v3 : (unit -> UH0) = method2(v1, v2) │
00:00:16 #1289 [Verbose] > │ let v4 : UH0 = v3 () │
00:00:16 #1290 [Verbose] > │ let v5 : UH1 = UH1_1 │
00:00:16 #1291 [Verbose] > │ let v6 : int32 = 0 │
00:00:16 #1292 [Verbose] > │ let v7 : UH1 = method3(v4, v5, v6) │
00:00:16 #1293 [Verbose] > │ let v8 : int32 = 0 │
00:00:16 #1294 [Verbose] > │ let v9 : int32 = method6(v7, v8) │
00:00:16 #1295 [Verbose] > │ let v10 : bool = v9 = 10 │
00:00:16 #1296 [Verbose] > │ let v11 : bool = method7(v10) │
00:00:16 #1297 [Verbose] > │ let v12 : string = $"__expect / actual: %A{v9} / expected: %A{10}" │
00:00:16 #1298 [Verbose] > │ let v13 : bool = v11 = false │
00:00:16 #1299 [Verbose] > │ if v13 then │
00:00:16 #1300 [Verbose] > │ failwith<unit> v12 │
00:00:16 #1301 [Verbose] > │ method0() │
00:00:16 #1302 [Verbose] > │ │
00:00:16 #1303 [Verbose] > │ print_and_return / x: 0 │
00:00:16 #1304 [Verbose] > │ print_and_return / x: 1 │
00:00:16 #1305 [Verbose] > │ print_and_return / x: 2 │
00:00:16 #1306 [Verbose] > │ print_and_return / x: 3 │
00:00:16 #1307 [Verbose] > │ print_and_return / x: 4 │
00:00:16 #1308 [Verbose] > │ print_and_return / x: 5 │
00:00:16 #1309 [Verbose] > │ │
00:00:16 #1310 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #1311 [Verbose] >
00:00:16 #1312 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #1313 [Verbose] > // // test
00:00:16 #1314 [Verbose] >
00:00:16 #1315 [Verbose] > stream.new_finite_stream print_and_return 10i32
00:00:16 #1316 [Verbose] > |> stream.memoize
00:00:16 #1317 [Verbose] > |> fun list =>
00:00:16 #1318 [Verbose] > inl list = list ()
00:00:16 #1319 [Verbose] > fun n =>
00:00:16 #1320 [Verbose] > list |> stream.try_item n
00:00:16 #1321 [Verbose] > |> take_while_ (fun n (_ : i32) => n < 5)
00:00:16 #1322 [Verbose] > |> listm'.sum
00:00:16 #1323 [Verbose] > |> _assert_eq 10
00:00:16 #1324 [Verbose] >
00:00:16 #1325 [Verbose] > ╭─[ 343.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #1326 [Verbose] > │ type UH0 = │
00:00:16 #1327 [Verbose] > │ | UH0_0 of int32 * (unit -> UH0) │
00:00:16 #1328 [Verbose] > │ | UH0_1 │
00:00:16 #1329 [Verbose] > │ and [<Struct>] US0 = │
00:00:16 #1330 [Verbose] > │ | US0_0 of f0_0 : UH0 │
00:00:16 #1331 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH0) │
00:00:16 #1332 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:16 #1333 [Verbose] > │ and UH1 = │
00:00:16 #1334 [Verbose] > │ | UH1_0 of int32 * UH1 │
00:00:16 #1335 [Verbose] > │ | UH1_1 │
00:00:16 #1336 [Verbose] > │ and [<Struct>] US1 = │
00:00:16 #1337 [Verbose] > │ | US1_0 │
00:00:16 #1338 [Verbose] > │ | US1_1 of f1_0 : int32 │
00:00:16 #1339 [Verbose] > │ let rec closure10 () () : UH0 = │
00:00:16 #1340 [Verbose] > │ UH0_1 │
00:00:16 #1341 [Verbose] > │ and closure9 () () : UH0 = │
00:00:16 #1342 [Verbose] > │ printfn $"print_and_return / x: {9}" │
00:00:16 #1343 [Verbose] > │ let v0 : (unit -> UH0) = closure10() │
00:00:16 #1344 [Verbose] > │ UH0_0(9, v0) │
00:00:16 #1345 [Verbose] > │ and closure8 () () : UH0 = │
00:00:16 #1346 [Verbose] > │ printfn $"print_and_return / x: {8}" │
00:00:16 #1347 [Verbose] > │ let v0 : (unit -> UH0) = closure9() │
00:00:16 #1348 [Verbose] > │ UH0_0(8, v0) │
00:00:16 #1349 [Verbose] > │ and closure7 () () : UH0 = │
00:00:16 #1350 [Verbose] > │ printfn $"print_and_return / x: {7}" │
00:00:16 #1351 [Verbose] > │ let v0 : (unit -> UH0) = closure8() │
00:00:16 #1352 [Verbose] > │ UH0_0(7, v0) │
00:00:16 #1353 [Verbose] > │ and closure6 () () : UH0 = │
00:00:16 #1354 [Verbose] > │ printfn $"print_and_return / x: {6}" │
00:00:16 #1355 [Verbose] > │ let v0 : (unit -> UH0) = closure7() │
00:00:16 #1356 [Verbose] > │ UH0_0(6, v0) │
00:00:16 #1357 [Verbose] > │ and closure5 () () : UH0 = │
00:00:16 #1358 [Verbose] > │ printfn $"print_and_return / x: {5}" │
00:00:16 #1359 [Verbose] > │ let v0 : (unit -> UH0) = closure6() │
00:00:16 #1360 [Verbose] > │ UH0_0(5, v0) │
00:00:16 #1361 [Verbose] > │ and closure4 () () : UH0 = │
00:00:16 #1362 [Verbose] > │ printfn $"print_and_return / x: {4}" │
00:00:16 #1363 [Verbose] > │ let v0 : (unit -> UH0) = closure5() │
00:00:16 #1364 [Verbose] > │ UH0_0(4, v0) │
00:00:16 #1365 [Verbose] > │ and closure3 () () : UH0 = │
00:00:16 #1366 [Verbose] > │ printfn $"print_and_return / x: {3}" │
00:00:16 #1367 [Verbose] > │ let v0 : (unit -> UH0) = closure4() │
00:00:16 #1368 [Verbose] > │ UH0_0(3, v0) │
00:00:16 #1369 [Verbose] > │ and closure2 () () : UH0 = │
00:00:16 #1370 [Verbose] > │ printfn $"print_and_return / x: {2}" │
00:00:16 #1371 [Verbose] > │ let v0 : (unit -> UH0) = closure3() │
00:00:16 #1372 [Verbose] > │ UH0_0(2, v0) │
00:00:16 #1373 [Verbose] > │ and closure1 () () : UH0 = │
00:00:16 #1374 [Verbose] > │ printfn $"print_and_return / x: {1}" │
00:00:16 #1375 [Verbose] > │ let v0 : (unit -> UH0) = closure2() │
00:00:16 #1376 [Verbose] > │ UH0_0(1, v0) │
00:00:16 #1377 [Verbose] > │ and closure0 () () : UH0 = │
00:00:16 #1378 [Verbose] > │ let v0 : (unit -> UH0) = closure1() │
00:00:16 #1379 [Verbose] > │ UH0_0(0, v0) │
00:00:16 #1380 [Verbose] > │ and closure11 (v0 : Mut0) () : UH0 = │
00:00:16 #1381 [Verbose] > │ let v1 : US0 = v0.l0 │
00:00:16 #1382 [Verbose] > │ match v1 with │
00:00:16 #1383 [Verbose] > │ | US0_0(v2) -> (* Computed *) │
00:00:16 #1384 [Verbose] > │ v2 │
00:00:16 #1385 [Verbose] > │ | US0_1(v3) -> (* NotComputed *) │
00:00:16 #1386 [Verbose] > │ let v4 : UH0 = v3 () │
00:00:16 #1387 [Verbose] > │ let v13 : UH0 = │
00:00:16 #1388 [Verbose] > │ match v4 with │
00:00:16 #1389 [Verbose] > │ | UH0_0(v6, v7) -> (* StreamCons *) │
00:00:16 #1390 [Verbose] > │ let v8 : US0 = US0_1(v7) │
00:00:16 #1391 [Verbose] > │ let v9 : Mut0 = {l0 = v8} : Mut0 │
00:00:16 #1392 [Verbose] > │ let v10 : (unit -> UH0) = closure11(v9) │
00:00:16 #1393 [Verbose] > │ UH0_0(v6, v10) │
00:00:16 #1394 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:16 #1395 [Verbose] > │ UH0_1 │
00:00:16 #1396 [Verbose] > │ let v14 : US0 = US0_0(v13) │
00:00:16 #1397 [Verbose] > │ v0.l0 <- v14 │
00:00:16 #1398 [Verbose] > │ v13 │
00:00:16 #1399 [Verbose] > │ and method2 (v0 : int32, v1 : UH0) : US1 = │
00:00:16 #1400 [Verbose] > │ match v1 with │
00:00:16 #1401 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:16 #1402 [Verbose] > │ let v4 : bool = v0 <= 0 │
00:00:16 #1403 [Verbose] > │ if v4 then │
00:00:16 #1404 [Verbose] > │ US1_1(v2) │
00:00:16 #1405 [Verbose] > │ else │
00:00:16 #1406 [Verbose] > │ let v6 : int32 = v0 - 1 │
00:00:16 #1407 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:16 #1408 [Verbose] > │ method2(v6, v7) │
00:00:16 #1409 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:16 #1410 [Verbose] > │ US1_0 │
00:00:16 #1411 [Verbose] > │ and method3 (v0 : UH1, v1 : UH1) : UH1 = │
00:00:16 #1412 [Verbose] > │ match v0 with │
00:00:16 #1413 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:16 #1414 [Verbose] > │ let v4 : UH1 = UH1_0(v2, v1) │
00:00:16 #1415 [Verbose] > │ method3(v3, v4) │
00:00:16 #1416 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:17 #1417 [Verbose] > │ v1 │
00:00:17 #1418 [Verbose] > │ and method1 (v0 : UH0, v1 : UH1, v2 : int32) : UH1 = │
00:00:17 #1419 [Verbose] > │ let v3 : US1 = method2(v2, v0) │
00:00:17 #1420 [Verbose] > │ match v3 with │
00:00:17 #1421 [Verbose] > │ | US1_1(v4) -> (* Some *) │
00:00:17 #1422 [Verbose] > │ let v5 : bool = v4 < 5 │
00:00:17 #1423 [Verbose] > │ if v5 then │
00:00:17 #1424 [Verbose] > │ let v6 : UH1 = UH1_0(v4, v1) │
00:00:17 #1425 [Verbose] > │ let v7 : int32 = v2 + 1 │
00:00:17 #1426 [Verbose] > │ method1(v0, v6, v7) │
00:00:17 #1427 [Verbose] > │ else │
00:00:17 #1428 [Verbose] > │ let v9 : UH1 = UH1_1 │
00:00:17 #1429 [Verbose] > │ method3(v1, v9) │
00:00:17 #1430 [Verbose] > │ | _ -> │
00:00:17 #1431 [Verbose] > │ let v12 : UH1 = UH1_1 │
00:00:17 #1432 [Verbose] > │ method3(v1, v12) │
00:00:17 #1433 [Verbose] > │ and method4 (v0 : UH1, v1 : int32) : int32 = │
00:00:17 #1434 [Verbose] > │ match v0 with │
00:00:17 #1435 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:17 #1436 [Verbose] > │ let v4 : int32 = v1 + v2 │
00:00:17 #1437 [Verbose] > │ method4(v3, v4) │
00:00:17 #1438 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:17 #1439 [Verbose] > │ v1 │
00:00:17 #1440 [Verbose] > │ and method5 (v0 : bool) : bool = │
00:00:17 #1441 [Verbose] > │ v0 │
00:00:17 #1442 [Verbose] > │ and method0 () : unit = │
00:00:17 #1443 [Verbose] > │ printfn $"print_and_return / x: {0}" │
00:00:17 #1444 [Verbose] > │ let v0 : (unit -> UH0) = closure0() │
00:00:17 #1445 [Verbose] > │ let v1 : US0 = US0_1(v0) │
00:00:17 #1446 [Verbose] > │ let v2 : Mut0 = {l0 = v1} : Mut0 │
00:00:17 #1447 [Verbose] > │ let v3 : US0 = v2.l0 │
00:00:17 #1448 [Verbose] > │ let v18 : UH0 = │
00:00:17 #1449 [Verbose] > │ match v3 with │
00:00:17 #1450 [Verbose] > │ | US0_0(v4) -> (* Computed *) │
00:00:17 #1451 [Verbose] > │ v4 │
00:00:17 #1452 [Verbose] > │ | US0_1(v5) -> (* NotComputed *) │
00:00:17 #1453 [Verbose] > │ let v6 : UH0 = v5 () │
00:00:17 #1454 [Verbose] > │ let v15 : UH0 = │
00:00:17 #1455 [Verbose] > │ match v6 with │
00:00:17 #1456 [Verbose] > │ | UH0_0(v8, v9) -> (* StreamCons *) │
00:00:17 #1457 [Verbose] > │ let v10 : US0 = US0_1(v9) │
00:00:17 #1458 [Verbose] > │ let v11 : Mut0 = {l0 = v10} : Mut0 │
00:00:17 #1459 [Verbose] > │ let v12 : (unit -> UH0) = closure11(v11) │
00:00:17 #1460 [Verbose] > │ UH0_0(v8, v12) │
00:00:17 #1461 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:17 #1462 [Verbose] > │ UH0_1 │
00:00:17 #1463 [Verbose] > │ let v16 : US0 = US0_0(v15) │
00:00:17 #1464 [Verbose] > │ v2.l0 <- v16 │
00:00:17 #1465 [Verbose] > │ v15 │
00:00:17 #1466 [Verbose] > │ let v19 : UH1 = UH1_1 │
00:00:17 #1467 [Verbose] > │ let v20 : int32 = 0 │
00:00:17 #1468 [Verbose] > │ let v21 : UH1 = method1(v18, v19, v20) │
00:00:17 #1469 [Verbose] > │ let v22 : int32 = 0 │
00:00:17 #1470 [Verbose] > │ let v23 : int32 = method4(v21, v22) │
00:00:17 #1471 [Verbose] > │ let v24 : bool = v23 = 10 │
00:00:17 #1472 [Verbose] > │ let v25 : bool = method5(v24) │
00:00:17 #1473 [Verbose] > │ let v26 : string = $"__expect / actual: %A{v23} / expected: %A{10}" │
00:00:17 #1474 [Verbose] > │ let v27 : bool = v25 = false │
00:00:17 #1475 [Verbose] > │ if v27 then │
00:00:17 #1476 [Verbose] > │ failwith<unit> v26 │
00:00:17 #1477 [Verbose] > │ method0() │
00:00:17 #1478 [Verbose] > │ │
00:00:17 #1479 [Verbose] > │ print_and_return / x: 0 │
00:00:17 #1480 [Verbose] > │ print_and_return / x: 1 │
00:00:17 #1481 [Verbose] > │ print_and_return / x: 2 │
00:00:17 #1482 [Verbose] > │ print_and_return / x: 3 │
00:00:17 #1483 [Verbose] > │ print_and_return / x: 4 │
00:00:17 #1484 [Verbose] > │ print_and_return / x: 5 │
00:00:17 #1485 [Verbose] > │ │
00:00:17 #1486 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1487 [Verbose] >
00:00:17 #1488 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1489 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1490 [Verbose] > │ ## memoize │
00:00:17 #1491 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1492 [Verbose] >
00:00:17 #1493 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1494 [Verbose] > inl memoize seq =
00:00:17 #1495 [Verbose] > inl state = mut [[]]
00:00:17 #1496 [Verbose] > fun n =>
00:00:17 #1497 [Verbose] > match *state |> listm'.try_find (fun (n', _) => n' = n) with
00:00:17 #1498 [Verbose] > | Some (_, v) => v
00:00:17 #1499 [Verbose] > | None =>
00:00:17 #1500 [Verbose] > inl new_state = seq n
00:00:17 #1501 [Verbose] > state <- (n, new_state) :: *state
00:00:17 #1502 [Verbose] > new_state
00:00:17 #1503 [Verbose] >
00:00:17 #1504 [Verbose] > inl memoize_ seq =
00:00:17 #1505 [Verbose] > inl state = mut [[]]
00:00:17 #1506 [Verbose] > fun n =>
00:00:17 #1507 [Verbose] > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with
00:00:17 #1508 [Verbose] > | Some (_, v) => v
00:00:17 #1509 [Verbose] > | None =>
00:00:17 #1510 [Verbose] > inl new_state = seq n
00:00:17 #1511 [Verbose] > state <- (n, new_state) :: *state
00:00:17 #1512 [Verbose] > new_state
00:00:17 #1513 [Verbose] >
00:00:17 #1514 [Verbose] > ╭─[ 209.78ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1515 [Verbose] > │ () │
00:00:17 #1516 [Verbose] > │ │
00:00:17 #1517 [Verbose] > │ │
00:00:17 #1518 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1519 [Verbose] >
00:00:17 #1520 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1521 [Verbose] > // // test
00:00:17 #1522 [Verbose] >
00:00:17 #1523 [Verbose] > inl seq =
00:00:17 #1524 [Verbose] > fun n =>
00:00:17 #1525 [Verbose] > n |> print_and_return |> Some
00:00:17 #1526 [Verbose] > |> memoize_
00:00:17 #1527 [Verbose] >
00:00:17 #1528 [Verbose] > seq
00:00:17 #1529 [Verbose] > |> take_while_ (fun n (_ : i32) => n < 5)
00:00:17 #1530 [Verbose] > |> listm'.sum
00:00:17 #1531 [Verbose] > |> _assert_eq 10
00:00:17 #1532 [Verbose] >
00:00:17 #1533 [Verbose] > seq
00:00:17 #1534 [Verbose] > |> take_while_ (fun n _ => n < 5)
00:00:17 #1535 [Verbose] > |> listm'.sum
00:00:17 #1536 [Verbose] > |> _assert_eq 10
00:00:17 #1537 [Verbose] >
00:00:17 #1538 [Verbose] > ╭─[ 376.63ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1539 [Verbose] > │ type [<Struct>] US0 = │
00:00:17 #1540 [Verbose] > │ | US0_0 │
00:00:17 #1541 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:00:17 #1542 [Verbose] > │ and UH0 = │
00:00:17 #1543 [Verbose] > │ | UH0_0 of int32 * US0 * UH0 │
00:00:17 #1544 [Verbose] > │ | UH0_1 │
00:00:17 #1545 [Verbose] > │ and Mut0 = {mutable l0 : UH0} │
00:00:17 #1546 [Verbose] > │ and UH1 = │
00:00:17 #1547 [Verbose] > │ | UH1_0 of int32 * UH1 │
00:00:17 #1548 [Verbose] > │ | UH1_1 │
00:00:17 #1549 [Verbose] > │ and [<Struct>] US1 = │
00:00:17 #1550 [Verbose] > │ | US1_0 │
00:00:17 #1551 [Verbose] > │ | US1_1 of f1_0 : int32 * f1_1 : US0 │
00:00:17 #1552 [Verbose] > │ let rec method2 (v0 : int32, v1 : UH0) : US1 = │
00:00:17 #1553 [Verbose] > │ match v1 with │
00:00:17 #1554 [Verbose] > │ | UH0_0(v3, v4, v5) -> (* Cons *) │
00:00:17 #1555 [Verbose] > │ let v6 : bool = v3 = v0 │
00:00:17 #1556 [Verbose] > │ if v6 then │
00:00:17 #1557 [Verbose] > │ US1_1(v3, v4) │
00:00:17 #1558 [Verbose] > │ else │
00:00:17 #1559 [Verbose] > │ method2(v0, v5) │
00:00:17 #1560 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:17 #1561 [Verbose] > │ US1_0 │
00:00:17 #1562 [Verbose] > │ and method3 (v0 : UH1, v1 : UH1) : UH1 = │
00:00:17 #1563 [Verbose] > │ match v0 with │
00:00:17 #1564 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:17 #1565 [Verbose] > │ let v4 : UH1 = UH1_0(v2, v1) │
00:00:17 #1566 [Verbose] > │ method3(v3, v4) │
00:00:17 #1567 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:17 #1568 [Verbose] > │ v1 │
00:00:17 #1569 [Verbose] > │ and method1 (v0 : Mut0, v1 : UH1, v2 : int32) : UH1 = │
00:00:17 #1570 [Verbose] > │ let v3 : UH0 = v0.l0 │
00:00:17 #1571 [Verbose] > │ let v4 : US1 = method2(v2, v3) │
00:00:17 #1572 [Verbose] > │ let v12 : US0 = │
00:00:17 #1573 [Verbose] > │ match v4 with │
00:00:17 #1574 [Verbose] > │ | US1_0 -> (* None *) │
00:00:17 #1575 [Verbose] > │ printfn $"print_and_return / x: {v2}" │
00:00:17 #1576 [Verbose] > │ let v7 : UH0 = v0.l0 │
00:00:17 #1577 [Verbose] > │ let v8 : US0 = US0_1(v2) │
00:00:17 #1578 [Verbose] > │ let v9 : UH0 = UH0_0(v2, v8, v7) │
00:00:17 #1579 [Verbose] > │ v0.l0 <- v9 │
00:00:17 #1580 [Verbose] > │ US0_1(v2) │
00:00:17 #1581 [Verbose] > │ | US1_1(v5, v6) -> (* Some *) │
00:00:17 #1582 [Verbose] > │ v6 │
00:00:17 #1583 [Verbose] > │ match v12 with │
00:00:17 #1584 [Verbose] > │ | US0_1(v13) -> (* Some *) │
00:00:17 #1585 [Verbose] > │ let v14 : bool = v13 < 5 │
00:00:17 #1586 [Verbose] > │ if v14 then │
00:00:17 #1587 [Verbose] > │ let v15 : UH1 = UH1_0(v13, v1) │
00:00:17 #1588 [Verbose] > │ let v16 : int32 = v2 + 1 │
00:00:17 #1589 [Verbose] > │ method1(v0, v15, v16) │
00:00:17 #1590 [Verbose] > │ else │
00:00:17 #1591 [Verbose] > │ let v18 : UH1 = UH1_1 │
00:00:17 #1592 [Verbose] > │ method3(v1, v18) │
00:00:17 #1593 [Verbose] > │ | _ -> │
00:00:17 #1594 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:17 #1595 [Verbose] > │ method3(v1, v21) │
00:00:17 #1596 [Verbose] > │ and method4 (v0 : UH1, v1 : int32) : int32 = │
00:00:17 #1597 [Verbose] > │ match v0 with │
00:00:17 #1598 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:00:17 #1599 [Verbose] > │ let v4 : int32 = v1 + v2 │
00:00:17 #1600 [Verbose] > │ method4(v3, v4) │
00:00:17 #1601 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:17 #1602 [Verbose] > │ v1 │
00:00:17 #1603 [Verbose] > │ and method5 (v0 : bool) : bool = │
00:00:17 #1604 [Verbose] > │ v0 │
00:00:17 #1605 [Verbose] > │ and method6 (v0 : Mut0, v1 : UH1, v2 : int32) : UH1 = │
00:00:17 #1606 [Verbose] > │ let v3 : UH0 = v0.l0 │
00:00:17 #1607 [Verbose] > │ let v4 : US1 = method2(v2, v3) │
00:00:17 #1608 [Verbose] > │ let v12 : US0 = │
00:00:17 #1609 [Verbose] > │ match v4 with │
00:00:17 #1610 [Verbose] > │ | US1_0 -> (* None *) │
00:00:17 #1611 [Verbose] > │ printfn $"print_and_return / x: {v2}" │
00:00:17 #1612 [Verbose] > │ let v7 : UH0 = v0.l0 │
00:00:17 #1613 [Verbose] > │ let v8 : US0 = US0_1(v2) │
00:00:17 #1614 [Verbose] > │ let v9 : UH0 = UH0_0(v2, v8, v7) │
00:00:17 #1615 [Verbose] > │ v0.l0 <- v9 │
00:00:17 #1616 [Verbose] > │ US0_1(v2) │
00:00:17 #1617 [Verbose] > │ | US1_1(v5, v6) -> (* Some *) │
00:00:17 #1618 [Verbose] > │ v6 │
00:00:17 #1619 [Verbose] > │ match v12 with │
00:00:17 #1620 [Verbose] > │ | US0_1(v13) -> (* Some *) │
00:00:17 #1621 [Verbose] > │ let v14 : bool = v13 < 5 │
00:00:17 #1622 [Verbose] > │ if v14 then │
00:00:17 #1623 [Verbose] > │ let v15 : UH1 = UH1_0(v13, v1) │
00:00:17 #1624 [Verbose] > │ let v16 : int32 = v2 + 1 │
00:00:17 #1625 [Verbose] > │ method6(v0, v15, v16) │
00:00:17 #1626 [Verbose] > │ else │
00:00:17 #1627 [Verbose] > │ let v18 : UH1 = UH1_1 │
00:00:17 #1628 [Verbose] > │ method3(v1, v18) │
00:00:17 #1629 [Verbose] > │ | _ -> │
00:00:17 #1630 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:17 #1631 [Verbose] > │ method3(v1, v21) │
00:00:17 #1632 [Verbose] > │ and method0 () : unit = │
00:00:17 #1633 [Verbose] > │ let v0 : UH0 = UH0_1 │
00:00:17 #1634 [Verbose] > │ let v1 : Mut0 = {l0 = v0} : Mut0 │
00:00:17 #1635 [Verbose] > │ let v2 : UH1 = UH1_1 │
00:00:17 #1636 [Verbose] > │ let v3 : int32 = 0 │
00:00:17 #1637 [Verbose] > │ let v4 : UH1 = method1(v1, v2, v3) │
00:00:17 #1638 [Verbose] > │ let v5 : int32 = 0 │
00:00:17 #1639 [Verbose] > │ let v6 : int32 = method4(v4, v5) │
00:00:17 #1640 [Verbose] > │ let v7 : bool = v6 = 10 │
00:00:17 #1641 [Verbose] > │ let v8 : bool = method5(v7) │
00:00:17 #1642 [Verbose] > │ let v9 : string = $"__expect / actual: %A{v6} / expected: %A{10}" │
00:00:17 #1643 [Verbose] > │ let v10 : bool = v8 = false │
00:00:17 #1644 [Verbose] > │ if v10 then │
00:00:17 #1645 [Verbose] > │ failwith<unit> v9 │
00:00:17 #1646 [Verbose] > │ let v11 : UH1 = UH1_1 │
00:00:17 #1647 [Verbose] > │ let v12 : int32 = 0 │
00:00:17 #1648 [Verbose] > │ let v13 : UH1 = method6(v1, v11, v12) │
00:00:17 #1649 [Verbose] > │ let v14 : int32 = 0 │
00:00:17 #1650 [Verbose] > │ let v15 : int32 = method4(v13, v14) │
00:00:17 #1651 [Verbose] > │ let v16 : bool = v15 = 10 │
00:00:17 #1652 [Verbose] > │ let v17 : bool = method5(v16) │
00:00:17 #1653 [Verbose] > │ let v18 : string = $"__expect / actual: %A{v15} / expected: %A{10}" │
00:00:17 #1654 [Verbose] > │ let v19 : bool = v17 = false │
00:00:17 #1655 [Verbose] > │ if v19 then │
00:00:17 #1656 [Verbose] > │ failwith<unit> v18 │
00:00:17 #1657 [Verbose] > │ method0() │
00:00:17 #1658 [Verbose] > │ │
00:00:17 #1659 [Verbose] > │ print_and_return / x: 0 │
00:00:17 #1660 [Verbose] > │ print_and_return / x: 1 │
00:00:17 #1661 [Verbose] > │ print_and_return / x: 2 │
00:00:17 #1662 [Verbose] > │ print_and_return / x: 3 │
00:00:17 #1663 [Verbose] > │ print_and_return / x: 4 │
00:00:17 #1664 [Verbose] > │ print_and_return / x: 5 │
00:00:17 #1665 [Verbose] > │ │
00:00:17 #1666 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1667 [Verbose] >
00:00:17 #1668 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #1669 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #1670 [Verbose] > │ ## iterate │
00:00:17 #1671 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1672 [Verbose] >
00:00:17 #1673 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1674 [Verbose] > inl iterate f x0 num_steps =
00:00:17 #1675 [Verbose] > inl rec loop x n =
00:00:17 #1676 [Verbose] > if n <= 0
00:00:17 #1677 [Verbose] > then x
00:00:17 #1678 [Verbose] > else loop (f x) (n - 1)
00:00:17 #1679 [Verbose] > loop x0 num_steps
00:00:17 #1680 [Verbose] >
00:00:17 #1681 [Verbose] > ╭─[ 214.06ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #1682 [Verbose] > │ () │
00:00:17 #1683 [Verbose] > │ │
00:00:17 #1684 [Verbose] > │ │
00:00:17 #1685 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #1686 [Verbose] >
00:00:17 #1687 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #1688 [Verbose] > // // test
00:00:17 #1689 [Verbose] >
00:00:17 #1690 [Verbose] > 10i32 |> iterate ((*) 2) 1i32
00:00:17 #1691 [Verbose] > |> _assert_eq 1024
00:00:18 #1692 [Verbose] >
00:00:18 #1693 [Verbose] > ╭─[ 252.07ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1694 [Verbose] > │ let rec method1 () : bool = │
00:00:18 #1695 [Verbose] > │ true │
00:00:18 #1696 [Verbose] > │ and method0 () : unit = │
00:00:18 #1697 [Verbose] > │ let v0 : bool = method1() │
00:00:18 #1698 [Verbose] > │ let v1 : string = $"__expect / actual: %A{1024} / expected: %A{1024}" │
00:00:18 #1699 [Verbose] > │ let v2 : bool = v0 = false │
00:00:18 #1700 [Verbose] > │ if v2 then │
00:00:18 #1701 [Verbose] > │ failwith<unit> v1 │
00:00:18 #1702 [Verbose] > │ method0() │
00:00:18 #1703 [Verbose] > │ │
00:00:18 #1704 [Verbose] > │ │
00:00:18 #1705 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1706 [Verbose] >
00:00:18 #1707 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1708 [Verbose] > inl iterate_ f x0 num_steps =
00:00:18 #1709 [Verbose] > let rec loop x n =
00:00:18 #1710 [Verbose] > if n <= 0
00:00:18 #1711 [Verbose] > then x
00:00:18 #1712 [Verbose] > else loop (f x) (n - 1)
00:00:18 #1713 [Verbose] > loop x0 num_steps
00:00:18 #1714 [Verbose] >
00:00:18 #1715 [Verbose] > ╭─[ 349.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1716 [Verbose] > │ () │
00:00:18 #1717 [Verbose] > │ │
00:00:18 #1718 [Verbose] > │ │
00:00:18 #1719 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1720 [Verbose] >
00:00:18 #1721 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1722 [Verbose] > // // test
00:00:18 #1723 [Verbose] >
00:00:18 #1724 [Verbose] > 10i32 |> iterate_ ((*) 2) 1i32
00:00:18 #1725 [Verbose] > |> _assert_eq 1024
00:00:18 #1726 [Verbose] >
00:00:18 #1727 [Verbose] > ╭─[ 228.14ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1728 [Verbose] > │ let rec method1 (v0 : int32, v1 : int32) : int32 = │
00:00:18 #1729 [Verbose] > │ let v2 : bool = v1 <= 0 │
00:00:18 #1730 [Verbose] > │ if v2 then │
00:00:18 #1731 [Verbose] > │ v0 │
00:00:18 #1732 [Verbose] > │ else │
00:00:18 #1733 [Verbose] > │ let v3 : int32 = 2 * v0 │
00:00:18 #1734 [Verbose] > │ let v4 : int32 = v1 - 1 │
00:00:18 #1735 [Verbose] > │ method1(v3, v4) │
00:00:18 #1736 [Verbose] > │ and method2 (v0 : bool) : bool = │
00:00:18 #1737 [Verbose] > │ v0 │
00:00:18 #1738 [Verbose] > │ and method0 () : unit = │
00:00:18 #1739 [Verbose] > │ let v0 : int32 = 1 │
00:00:18 #1740 [Verbose] > │ let v1 : int32 = 10 │
00:00:18 #1741 [Verbose] > │ let v2 : int32 = method1(v0, v1) │
00:00:18 #1742 [Verbose] > │ let v3 : bool = v2 = 1024 │
00:00:18 #1743 [Verbose] > │ let v4 : bool = method2(v3) │
00:00:18 #1744 [Verbose] > │ let v5 : string = $"__expect / actual: %A{v2} / expected: %A{1024}" │
00:00:18 #1745 [Verbose] > │ let v6 : bool = v4 = false │
00:00:18 #1746 [Verbose] > │ if v6 then │
00:00:18 #1747 [Verbose] > │ failwith<unit> v5 │
00:00:18 #1748 [Verbose] > │ method0() │
00:00:18 #1749 [Verbose] > │ │
00:00:18 #1750 [Verbose] > │ │
00:00:18 #1751 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1752 [Verbose] >
00:00:18 #1753 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1754 [Verbose] > inl iterate' f x0 num_steps =
00:00:18 #1755 [Verbose] > listm.init num_steps id
00:00:18 #1756 [Verbose] > |> listm.fold (fun x _ => f x) x0
00:00:18 #1757 [Verbose] >
00:00:18 #1758 [Verbose] > ╭─[ 199.70ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #1759 [Verbose] > │ () │
00:00:18 #1760 [Verbose] > │ │
00:00:18 #1761 [Verbose] > │ │
00:00:18 #1762 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #1763 [Verbose] >
00:00:18 #1764 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #1765 [Verbose] > // // test
00:00:18 #1766 [Verbose] >
00:00:18 #1767 [Verbose] > 10i32 |> iterate' ((*) 2) 1i32
00:00:18 #1768 [Verbose] > |> _assert_eq 1024
00:00:19 #1769 [Verbose] >
00:00:19 #1770 [Verbose] > ╭─[ 215.06ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1771 [Verbose] > │ let rec method1 () : bool = │
00:00:19 #1772 [Verbose] > │ true │
00:00:19 #1773 [Verbose] > │ and method0 () : unit = │
00:00:19 #1774 [Verbose] > │ let v0 : bool = method1() │
00:00:19 #1775 [Verbose] > │ let v1 : string = $"__expect / actual: %A{1024} / expected: %A{1024}" │
00:00:19 #1776 [Verbose] > │ let v2 : bool = v0 = false │
00:00:19 #1777 [Verbose] > │ if v2 then │
00:00:19 #1778 [Verbose] > │ failwith<unit> v1 │
00:00:19 #1779 [Verbose] > │ method0() │
00:00:19 #1780 [Verbose] > │ │
00:00:19 #1781 [Verbose] > │ │
00:00:19 #1782 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1783 [Verbose] >
00:00:19 #1784 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #1785 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #1786 [Verbose] > │ ## find_last │
00:00:19 #1787 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #1788 [Verbose] >
00:00:19 #1789 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #1790 [Verbose] > inl find_last forall item result. fold_fn fn target : option result =
00:00:19 #1791 [Verbose] > fold_fn (fun (item : item) (result : option result) =>
00:00:19 #1792 [Verbose] > match result with
00:00:19 #1793 [Verbose] > | None => fn item
00:00:19 #1794 [Verbose] > | result => result
00:00:19 #1795 [Verbose] > ) target (None : option result)
00:00:19 #1796 [Verbose] >
00:00:19 #1797 [Verbose] > inl array_find_last forall item result. (fn : item -> option result) (target : a
00:00:19 #1798 [Verbose] > i32 item) : option result =
00:00:19 #1799 [Verbose] > find_last am.foldBack fn target
00:00:19 #1800 [Verbose] >
00:00:19 #1801 [Verbose] > inl list_find_last forall item result. (fn : item -> option result) (target :
00:00:19 #1802 [Verbose] > list item) : option result =
00:00:19 #1803 [Verbose] > find_last listm.foldBack fn target
00:00:19 #1804 [Verbose] >
00:00:19 #1805 [Verbose] > ╭─[ 192.96ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #1806 [Verbose] > │ () │
00:00:19 #1807 [Verbose] > │ │
00:00:19 #1808 [Verbose] > │ │
00:00:19 #1809 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #1810 [Verbose] > [NbConvertApp] Converting notebook seq.dib.ipynb to html
00:00:21 #1811 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:21 #1812 [Verbose] > validate(nb)
00:00:21 #1813 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:21 #1814 [Verbose] > return _pygments_highlight(
00:00:22 #1815 [Verbose] > [NbConvertApp] Writing 394042 bytes to seq.dib.html
00:00:22 #1816 [Debug] executeAsync / exitCode: 0 / output.Length: 121401
00:00:22 #1817 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 util.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # util │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:06 #13 [Verbose] >
00:00:06 #14 [Verbose] > ╭─[ 4.10s - stdout ]───────────────────────────────────────────────────────────╮
00:00:06 #15 [Verbose] > │ () │
00:00:06 #16 [Verbose] > │ │
00:00:06 #17 [Verbose] > │ │
00:00:06 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #19 [Verbose] >
00:00:06 #20 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:06 #21 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:06 #22 [Verbose] > │ ## ski │
00:00:06 #23 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #24 [Verbose] >
00:00:06 #25 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #26 [Verbose] > union rec ski =
00:00:06 #27 [Verbose] > | I
00:00:06 #28 [Verbose] > | K
00:00:06 #29 [Verbose] > | S
00:00:06 #30 [Verbose] > | App : ski * ski
00:00:06 #31 [Verbose] >
00:00:06 #32 [Verbose] > inl rec eval ski =
00:00:06 #33 [Verbose] > match ski with
00:00:06 #34 [Verbose] > | App (App (K, x), y) => eval x
00:00:06 #35 [Verbose] > | App (App (App (S, x), y), z) => eval (App (App (x, z), App (y, z)))
00:00:06 #36 [Verbose] > | App (I, x) => eval x
00:00:06 #37 [Verbose] > | App (K, x) => App (K, eval x)
00:00:06 #38 [Verbose] > | App (f, x) => eval (App (eval f, x))
00:00:06 #39 [Verbose] > | _ => ski
00:00:06 #40 [Verbose] >
00:00:06 #41 [Verbose] > ╭─[ 261.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:06 #42 [Verbose] > │ () │
00:00:06 #43 [Verbose] > │ │
00:00:06 #44 [Verbose] > │ │
00:00:06 #45 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:06 #46 [Verbose] >
00:00:06 #47 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:06 #48 [Verbose] > // // test
00:00:06 #49 [Verbose] >
00:00:06 #50 [Verbose] > eval I
00:00:06 #51 [Verbose] > |> _assert_eq I
00:00:06 #52 [Verbose] >
00:00:06 #53 [Verbose] > eval (App (I, I))
00:00:06 #54 [Verbose] > |> _assert_eq I
00:00:06 #55 [Verbose] >
00:00:06 #56 [Verbose] > eval (App (I, App (I, I)))
00:00:06 #57 [Verbose] > |> _assert_eq I
00:00:06 #58 [Verbose] >
00:00:06 #59 [Verbose] > eval (App (App (I, I), I))
00:00:06 #60 [Verbose] > |> _assert_eq I
00:00:06 #61 [Verbose] >
00:00:06 #62 [Verbose] > eval (App (App (App (I, I), I), I))
00:00:06 #63 [Verbose] > |> _assert_eq I
00:00:06 #64 [Verbose] >
00:00:06 #65 [Verbose] > eval K
00:00:06 #66 [Verbose] > |> _assert_eq K
00:00:06 #67 [Verbose] >
00:00:06 #68 [Verbose] > eval (App (K, I))
00:00:06 #69 [Verbose] > |> _assert_eq (App (K, I))
00:00:06 #70 [Verbose] >
00:00:06 #71 [Verbose] > eval (App (K, K))
00:00:06 #72 [Verbose] > |> _assert_eq (App (K, K))
00:00:06 #73 [Verbose] >
00:00:06 #74 [Verbose] > eval (App (App (K, I), K))
00:00:06 #75 [Verbose] > |> _assert_eq I
00:00:06 #76 [Verbose] >
00:00:06 #77 [Verbose] > eval (App (App (K, K), I))
00:00:06 #78 [Verbose] > |> _assert_eq K
00:00:06 #79 [Verbose] >
00:00:06 #80 [Verbose] > eval (App (App (App (App (K, K), I), S), K))
00:00:06 #81 [Verbose] > |> _assert_eq S
00:00:06 #82 [Verbose] >
00:00:06 #83 [Verbose] > eval S
00:00:06 #84 [Verbose] > |> _assert_eq S
00:00:06 #85 [Verbose] >
00:00:06 #86 [Verbose] > eval (App (App (App (S, I), I), I))
00:00:06 #87 [Verbose] > |> _assert_eq I
00:00:06 #88 [Verbose] >
00:00:06 #89 [Verbose] > eval (App (App (App (S, K), K), I))
00:00:06 #90 [Verbose] > |> _assert_eq I
00:00:06 #91 [Verbose] >
00:00:06 #92 [Verbose] > eval (App (App (App (S, K), I), (App (App (K, I), S))))
00:00:06 #93 [Verbose] > |> _assert_eq I
00:00:06 #94 [Verbose] >
00:00:06 #95 [Verbose] > eval (App (App (K, S), App (I, App (App (App (S, K), S), I))))
00:00:06 #96 [Verbose] > |> _assert_eq S
00:00:06 #97 [Verbose] >
00:00:06 #98 [Verbose] > eval (App (App (App (S, K), I), K))
00:00:06 #99 [Verbose] > |> _assert_eq K
00:00:08 #100 [Verbose] >
00:00:08 #101 [Verbose] > ╭─[ 1.22s - stdout ]───────────────────────────────────────────────────────────╮
00:00:08 #102 [Verbose] > │ type UH0 = │
00:00:08 #103 [Verbose] > │ | UH0_0 of UH0 * UH0 │
00:00:08 #104 [Verbose] > │ | UH0_1 │
00:00:08 #105 [Verbose] > │ | UH0_2 │
00:00:08 #106 [Verbose] > │ | UH0_3 │
00:00:08 #107 [Verbose] > │ let rec method1 () : bool = │
00:00:08 #108 [Verbose] > │ true │
00:00:08 #109 [Verbose] > │ and method0 () : unit = │
00:00:08 #110 [Verbose] > │ let v3 : bool = method1() │
00:00:08 #111 [Verbose] > │ let v4 : UH0 = UH0_1 │
00:00:08 #112 [Verbose] > │ let v5 : UH0 = UH0_1 │
00:00:08 #113 [Verbose] > │ let v6 : string = $"__expect / actual: %A{v4} / expected: %A{v5}" │
00:00:08 #114 [Verbose] > │ let v7 : bool = v3 = false │
00:00:08 #115 [Verbose] > │ if v7 then │
00:00:08 #116 [Verbose] > │ failwith<unit> v6 │
00:00:08 #117 [Verbose] > │ let v11 : bool = method1() │
00:00:08 #118 [Verbose] > │ let v12 : UH0 = UH0_1 │
00:00:08 #119 [Verbose] > │ let v13 : UH0 = UH0_1 │
00:00:08 #120 [Verbose] > │ let v14 : string = $"__expect / actual: %A{v12} / expected: %A{v13}" │
00:00:08 #121 [Verbose] > │ let v15 : bool = v11 = false │
00:00:08 #122 [Verbose] > │ if v15 then │
00:00:08 #123 [Verbose] > │ failwith<unit> v14 │
00:00:08 #124 [Verbose] > │ let v19 : bool = method1() │
00:00:08 #125 [Verbose] > │ let v20 : UH0 = UH0_1 │
00:00:08 #126 [Verbose] > │ let v21 : UH0 = UH0_1 │
00:00:08 #127 [Verbose] > │ let v22 : string = $"__expect / actual: %A{v20} / expected: %A{v21}" │
00:00:08 #128 [Verbose] > │ let v23 : bool = v19 = false │
00:00:08 #129 [Verbose] > │ if v23 then │
00:00:08 #130 [Verbose] > │ failwith<unit> v22 │
00:00:08 #131 [Verbose] > │ let v27 : bool = method1() │
00:00:08 #132 [Verbose] > │ let v28 : UH0 = UH0_1 │
00:00:08 #133 [Verbose] > │ let v29 : UH0 = UH0_1 │
00:00:08 #134 [Verbose] > │ let v30 : string = $"__expect / actual: %A{v28} / expected: %A{v29}" │
00:00:08 #135 [Verbose] > │ let v31 : bool = v27 = false │
00:00:08 #136 [Verbose] > │ if v31 then │
00:00:08 #137 [Verbose] > │ failwith<unit> v30 │
00:00:08 #138 [Verbose] > │ let v35 : bool = method1() │
00:00:08 #139 [Verbose] > │ let v36 : UH0 = UH0_1 │
00:00:08 #140 [Verbose] > │ let v37 : UH0 = UH0_1 │
00:00:08 #141 [Verbose] > │ let v38 : string = $"__expect / actual: %A{v36} / expected: %A{v37}" │
00:00:08 #142 [Verbose] > │ let v39 : bool = v35 = false │
00:00:08 #143 [Verbose] > │ if v39 then │
00:00:08 #144 [Verbose] > │ failwith<unit> v38 │
00:00:08 #145 [Verbose] > │ let v43 : bool = method1() │
00:00:08 #146 [Verbose] > │ let v44 : UH0 = UH0_2 │
00:00:08 #147 [Verbose] > │ let v45 : UH0 = UH0_2 │
00:00:08 #148 [Verbose] > │ let v46 : string = $"__expect / actual: %A{v44} / expected: %A{v45}" │
00:00:08 #149 [Verbose] > │ let v47 : bool = v43 = false │
00:00:08 #150 [Verbose] > │ if v47 then │
00:00:08 #151 [Verbose] > │ failwith<unit> v46 │
00:00:08 #152 [Verbose] > │ let v59 : bool = method1() │
00:00:08 #153 [Verbose] > │ let v60 : UH0 = UH0_2 │
00:00:08 #154 [Verbose] > │ let v61 : UH0 = UH0_1 │
00:00:08 #155 [Verbose] > │ let v62 : UH0 = UH0_0(v60, v61) │
00:00:08 #156 [Verbose] > │ let v63 : UH0 = UH0_2 │
00:00:08 #157 [Verbose] > │ let v64 : UH0 = UH0_1 │
00:00:08 #158 [Verbose] > │ let v65 : UH0 = UH0_0(v63, v64) │
00:00:08 #159 [Verbose] > │ let v66 : string = $"__expect / actual: %A{v62} / expected: %A{v65}" │
00:00:08 #160 [Verbose] > │ let v67 : bool = v59 = false │
00:00:08 #161 [Verbose] > │ if v67 then │
00:00:08 #162 [Verbose] > │ failwith<unit> v66 │
00:00:08 #163 [Verbose] > │ let v79 : bool = method1() │
00:00:08 #164 [Verbose] > │ let v80 : UH0 = UH0_2 │
00:00:08 #165 [Verbose] > │ let v81 : UH0 = UH0_2 │
00:00:08 #166 [Verbose] > │ let v82 : UH0 = UH0_0(v80, v81) │
00:00:08 #167 [Verbose] > │ let v83 : UH0 = UH0_2 │
00:00:08 #168 [Verbose] > │ let v84 : UH0 = UH0_2 │
00:00:08 #169 [Verbose] > │ let v85 : UH0 = UH0_0(v83, v84) │
00:00:08 #170 [Verbose] > │ let v86 : string = $"__expect / actual: %A{v82} / expected: %A{v85}" │
00:00:08 #171 [Verbose] > │ let v87 : bool = v79 = false │
00:00:08 #172 [Verbose] > │ if v87 then │
00:00:08 #173 [Verbose] > │ failwith<unit> v86 │
00:00:08 #174 [Verbose] > │ let v91 : bool = method1() │
00:00:08 #175 [Verbose] > │ let v92 : UH0 = UH0_1 │
00:00:08 #176 [Verbose] > │ let v93 : UH0 = UH0_1 │
00:00:08 #177 [Verbose] > │ let v94 : string = $"__expect / actual: %A{v92} / expected: %A{v93}" │
00:00:08 #178 [Verbose] > │ let v95 : bool = v91 = false │
00:00:08 #179 [Verbose] > │ if v95 then │
00:00:08 #180 [Verbose] > │ failwith<unit> v94 │
00:00:08 #181 [Verbose] > │ let v99 : bool = method1() │
00:00:08 #182 [Verbose] > │ let v100 : UH0 = UH0_2 │
00:00:08 #183 [Verbose] > │ let v101 : UH0 = UH0_2 │
00:00:08 #184 [Verbose] > │ let v102 : string = $"__expect / actual: %A{v100} / expected: %A{v101}" │
00:00:08 #185 [Verbose] > │ let v103 : bool = v99 = false │
00:00:08 #186 [Verbose] > │ if v103 then │
00:00:08 #187 [Verbose] > │ failwith<unit> v102 │
00:00:08 #188 [Verbose] > │ let v107 : bool = method1() │
00:00:08 #189 [Verbose] > │ let v108 : UH0 = UH0_3 │
00:00:08 #190 [Verbose] > │ let v109 : UH0 = UH0_3 │
00:00:08 #191 [Verbose] > │ let v110 : string = $"__expect / actual: %A{v108} / expected: %A{v109}" │
00:00:08 #192 [Verbose] > │ let v111 : bool = v107 = false │
00:00:08 #193 [Verbose] > │ if v111 then │
00:00:08 #194 [Verbose] > │ failwith<unit> v110 │
00:00:08 #195 [Verbose] > │ let v115 : bool = method1() │
00:00:08 #196 [Verbose] > │ let v116 : UH0 = UH0_3 │
00:00:08 #197 [Verbose] > │ let v117 : UH0 = UH0_3 │
00:00:08 #198 [Verbose] > │ let v118 : string = $"__expect / actual: %A{v116} / expected: %A{v117}" │
00:00:08 #199 [Verbose] > │ let v119 : bool = v115 = false │
00:00:08 #200 [Verbose] > │ if v119 then │
00:00:08 #201 [Verbose] > │ failwith<unit> v118 │
00:00:08 #202 [Verbose] > │ let v123 : bool = method1() │
00:00:08 #203 [Verbose] > │ let v124 : UH0 = UH0_1 │
00:00:08 #204 [Verbose] > │ let v125 : UH0 = UH0_1 │
00:00:08 #205 [Verbose] > │ let v126 : string = $"__expect / actual: %A{v124} / expected: %A{v125}" │
00:00:08 #206 [Verbose] > │ let v127 : bool = v123 = false │
00:00:08 #207 [Verbose] > │ if v127 then │
00:00:08 #208 [Verbose] > │ failwith<unit> v126 │
00:00:08 #209 [Verbose] > │ let v131 : bool = method1() │
00:00:08 #210 [Verbose] > │ let v132 : UH0 = UH0_1 │
00:00:08 #211 [Verbose] > │ let v133 : UH0 = UH0_1 │
00:00:08 #212 [Verbose] > │ let v134 : string = $"__expect / actual: %A{v132} / expected: %A{v133}" │
00:00:08 #213 [Verbose] > │ let v135 : bool = v131 = false │
00:00:08 #214 [Verbose] > │ if v135 then │
00:00:08 #215 [Verbose] > │ failwith<unit> v134 │
00:00:08 #216 [Verbose] > │ let v139 : bool = method1() │
00:00:08 #217 [Verbose] > │ let v140 : UH0 = UH0_1 │
00:00:08 #218 [Verbose] > │ let v141 : UH0 = UH0_1 │
00:00:08 #219 [Verbose] > │ let v142 : string = $"__expect / actual: %A{v140} / expected: %A{v141}" │
00:00:08 #220 [Verbose] > │ let v143 : bool = v139 = false │
00:00:08 #221 [Verbose] > │ if v143 then │
00:00:08 #222 [Verbose] > │ failwith<unit> v142 │
00:00:08 #223 [Verbose] > │ let v147 : bool = method1() │
00:00:08 #224 [Verbose] > │ let v148 : UH0 = UH0_3 │
00:00:08 #225 [Verbose] > │ let v149 : UH0 = UH0_3 │
00:00:08 #226 [Verbose] > │ let v150 : string = $"__expect / actual: %A{v148} / expected: %A{v149}" │
00:00:08 #227 [Verbose] > │ let v151 : bool = v147 = false │
00:00:08 #228 [Verbose] > │ if v151 then │
00:00:08 #229 [Verbose] > │ failwith<unit> v150 │
00:00:08 #230 [Verbose] > │ let v155 : bool = method1() │
00:00:08 #231 [Verbose] > │ let v156 : UH0 = UH0_2 │
00:00:08 #232 [Verbose] > │ let v157 : UH0 = UH0_2 │
00:00:08 #233 [Verbose] > │ let v158 : string = $"__expect / actual: %A{v156} / expected: %A{v157}" │
00:00:08 #234 [Verbose] > │ let v159 : bool = v155 = false │
00:00:08 #235 [Verbose] > │ if v159 then │
00:00:08 #236 [Verbose] > │ failwith<unit> v158 │
00:00:08 #237 [Verbose] > │ method0() │
00:00:08 #238 [Verbose] > │ │
00:00:08 #239 [Verbose] > │ │
00:00:08 #240 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #241 [Verbose] >
00:00:08 #242 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:08 #243 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:08 #244 [Verbose] > │ ## sm'.concat_array_trailing │
00:00:08 #245 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #246 [Verbose] >
00:00:08 #247 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #248 [Verbose] > inl types () =
00:00:08 #249 [Verbose] > rust.types ()
00:00:08 #250 [Verbose] > sm'.types ()
00:00:08 #251 [Verbose] >
00:00:08 #252 [Verbose] > ╭─[ 228.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #253 [Verbose] > │ () │
00:00:08 #254 [Verbose] > │ │
00:00:08 #255 [Verbose] > │ │
00:00:08 #256 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:08 #257 [Verbose] >
00:00:08 #258 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:08 #259 [Verbose] > // // test
00:00:08 #260 [Verbose] > // // rust=
00:00:08 #261 [Verbose] >
00:00:08 #262 [Verbose] > ;[[
00:00:08 #263 [Verbose] > "1"
00:00:08 #264 [Verbose] > "2"
00:00:08 #265 [Verbose] > "3"
00:00:08 #266 [Verbose] > ]]
00:00:08 #267 [Verbose] > |> fun x =>
00:00:08 #268 [Verbose] > inl code = (a x : _ i32 _) |> sm'.concat_array_trailing "\n"
00:00:08 #269 [Verbose] > code
00:00:08 #270 [Verbose] > |> _assert_eq "1\n2\n3\n"
00:00:13 #271 [Verbose] >
00:00:13 #272 [Verbose] > ╭─[ 5.43s - return value ]─────────────────────────────────────────────────────╮
00:00:13 #273 [Verbose] > │ .rs output: │
00:00:13 #274 [Verbose] > │ │
00:00:13 #275 [Verbose] > │ │
00:00:13 #276 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #277 [Verbose] >
00:00:13 #278 [Verbose] > ╭─[ 5.46s - stdout ]───────────────────────────────────────────────────────────╮
00:00:13 #279 [Verbose] > │ │
00:00:13 #280 [Verbose] > │ .fsx: │
00:00:13 #281 [Verbose] > │ type Mut0 = {mutable l0 : int32; mutable l1 : string} │
00:00:13 #282 [Verbose] > │ let rec method1 (v0 : (string [])) : (string []) = │
00:00:13 #283 [Verbose] > │ v0 │
00:00:13 #284 [Verbose] > │ and method3 (v0 : int32, v1 : Mut0) : bool = │
00:00:13 #285 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:13 #286 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:13 #287 [Verbose] > │ v3 │
00:00:13 #288 [Verbose] > │ and method2 (v0 : string, v1 : (string [])) : string = │
00:00:13 #289 [Verbose] > │ let v2 : int32 = v1.Length │
00:00:13 #290 [Verbose] > │ let v3 : string = "" │
00:00:13 #291 [Verbose] > │ let v4 : Mut0 = {l0 = 0; l1 = v3} : Mut0 │
00:00:13 #292 [Verbose] > │ while method3(v2, v4) do │
00:00:13 #293 [Verbose] > │ let v6 : int32 = v4.l0 │
00:00:13 #294 [Verbose] > │ let v7 : string = v4.l1 │
00:00:13 #295 [Verbose] > │ let v8 : string = v1.[int v6] │
00:00:13 #296 [Verbose] > │ let v9 : string = v7 + v8 + v0 + "" │
00:00:13 #297 [Verbose] > │ let v10 : int32 = v6 + 1 │
00:00:13 #298 [Verbose] > │ v4.l0 <- v10 │
00:00:13 #299 [Verbose] > │ v4.l1 <- v9 │
00:00:13 #300 [Verbose] > │ () │
00:00:13 #301 [Verbose] > │ let v11 : string = v4.l1 │
00:00:13 #302 [Verbose] > │ v11 │
00:00:13 #303 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:13 #304 [Verbose] > │ v0 │
00:00:13 #305 [Verbose] > │ and method0 () : unit = │
00:00:13 #306 [Verbose] > │ let v0 : string = "1" │
00:00:13 #307 [Verbose] > │ let v1 : string = "2" │
00:00:13 #308 [Verbose] > │ let v2 : string = "3" │
00:00:13 #309 [Verbose] > │ let v3 : (string []) = [|v0; v1; v2|] │
00:00:13 #310 [Verbose] > │ let v4 : (string []) = method1(v3) │
00:00:13 #311 [Verbose] > │ let v5 : string = "\n" │
00:00:13 #312 [Verbose] > │ let v6 : string = method2(v5, v4) │
00:00:13 #313 [Verbose] > │ let v8 : bool = v6 = "1\n2\n3\n" │
00:00:13 #314 [Verbose] > │ let v9 : bool = method4(v8) │
00:00:13 #315 [Verbose] > │ let v10 : string = "1\n2\n3\n" │
00:00:13 #316 [Verbose] > │ let v11 : string = $"__expect / actual: %A{v6} / expected: %A{v10}" │
00:00:13 #317 [Verbose] > │ let v12 : bool = v9 = false │
00:00:13 #318 [Verbose] > │ if v12 then │
00:00:13 #319 [Verbose] > │ failwith<unit> v11 │
00:00:13 #320 [Verbose] > │ method0() │
00:00:13 #321 [Verbose] > │ │
00:00:13 #322 [Verbose] > │ .rs: │
00:00:13 #323 [Verbose] > │ #![allow(dead_code,)] │
00:00:13 #324 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:13 #325 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:13 #326 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:13 #327 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:13 #328 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:13 #329 [Verbose] > │ #![allow(unused_imports,)] │
00:00:13 #330 [Verbose] > │ #![allow(unused_macros,)] │
00:00:13 #331 [Verbose] > │ #![allow(unused_parens,)] │
00:00:13 #332 [Verbose] > │ #![allow(unused_variables,)] │
00:00:13 #333 [Verbose] > │ mod module_ccfa04bf { │
00:00:13 #334 [Verbose] > │ pub mod Spiral_eval { │
00:00:13 #335 [Verbose] > │ use super::*; │
00:00:13 #336 [Verbose] > │ use fable_library_rust::Native_::LrcPtr; │
00:00:13 #337 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:13 #338 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:13 #339 [Verbose] > │ use fable_library_rust::NativeArray_::Array; │
00:00:13 #340 [Verbose] > │ use fable_library_rust::NativeArray_::count; │
00:00:13 #341 [Verbose] > │ use fable_library_rust::NativeArray_::new_array; │
00:00:13 #342 [Verbose] > │ use fable_library_rust::String_::append; │
00:00:13 #343 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:13 #344 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:13 #345 [Verbose] > │ #[derive(Clone, Debug, Default, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:13 #346 [Verbose] > │ pub struct Mut0 { │
00:00:13 #347 [Verbose] > │ pub l0: MutCell<i32>, │
00:00:13 #348 [Verbose] > │ pub l1: MutCell<string>, │
00:00:13 #349 [Verbose] > │ } │
00:00:13 #350 [Verbose] > │ impl core::fmt::Display for Spiral_eval::Mut0 { │
00:00:13 #351 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:13 #352 [Verbose] > │ { │
00:00:13 #353 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:13 #354 [Verbose] > │ } │
00:00:13 #355 [Verbose] > │ } │
00:00:13 #356 [Verbose] > │ pub fn method1(v0: Array<string>) -> Array<string> { v0 } │
00:00:13 #357 [Verbose] > │ pub fn method3(v0: i32, v1: LrcPtr<Spiral_eval::Mut0>) -> bool { │
00:00:13 #358 [Verbose] > │ v1.l0.get().clone() < v0 │
00:00:13 #359 [Verbose] > │ } │
00:00:13 #360 [Verbose] > │ pub fn method2(v0: string, v1: Array<string>) -> string { │
00:00:13 #361 [Verbose] > │ let v2: i32 = count(v1.clone()); │
00:00:13 #362 [Verbose] > │ let v4: LrcPtr<Spiral_eval::Mut0> = │
00:00:13 #363 [Verbose] > │ LrcPtr::new(Spiral_eval::Mut0{l0: MutCell::new(0_i32), │
00:00:13 #364 [Verbose] > │ l1: │
00:00:13 #365 [Verbose] > │ MutCell::new(string("")),}); │
00:00:13 #366 [Verbose] > │ while Spiral_eval::method3(v2, v4.clone()) { │
00:00:13 #367 [Verbose] > │ let v6: i32 = v4.l0.get().clone(); │
00:00:13 #368 [Verbose] > │ let v9: string = │
00:00:13 #369 [Verbose] > │ append(append(append(v4.l1.get().clone(), v1[ │
00:00:13 #370 [Verbose] > │ v6].clone()), │
00:00:13 #371 [Verbose] > │ v0.clone()), string("")); │
00:00:13 #372 [Verbose] > │ let v10: i32 = v6 + 1_i32; │
00:00:13 #373 [Verbose] > │ v4.l0.set(v10); │
00:00:13 #374 [Verbose] > │ v4.l1.set(v9); │
00:00:13 #375 [Verbose] > │ () │
00:00:13 #376 [Verbose] > │ } │
00:00:13 #377 [Verbose] > │ v4.l1.get().clone() │
00:00:13 #378 [Verbose] > │ } │
00:00:13 #379 [Verbose] > │ pub fn method4(v0: bool) -> bool { v0 } │
00:00:13 #380 [Verbose] > │ pub fn method0() { │
00:00:13 #381 [Verbose] > │ let v6: string = │
00:00:13 #382 [Verbose] > │ Spiral_eval::method2(string("\n"), │
00:00:13 #383 [Verbose] > │ Spiral_eval::method1(new_array(&[ │
00:00:13 #384 [Verbose] > │ string("1"), │
00:00:13 #385 [Verbose] > │ │
00:00:13 #386 [Verbose] > │ string("2"), │
00:00:13 #387 [Verbose] > │ │
00:00:13 #388 [Verbose] > │ string("3")]))); │
00:00:13 #389 [Verbose] > │ if Spiral_eval::method4(v6.clone() == string("1\n2\n3\n")) == │
00:00:13 #390 [Verbose] > │ false { │
00:00:13 #391 [Verbose] > │ panic!("{}", │
00:00:13 #392 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: {:?}", │
00:00:13 #393 [Verbose] > │ v6, string("1\n2\n3\n"))); │
00:00:13 #394 [Verbose] > │ } │
00:00:13 #395 [Verbose] > │ } │
00:00:13 #396 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:13 #397 [Verbose] > │ } │
00:00:13 #398 [Verbose] > │ } │
00:00:13 #399 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:13 #400 [Verbose] > │ │
00:00:13 #401 [Verbose] > │ │
00:00:13 #402 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #403 [Verbose] >
00:00:14 #404 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #405 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #406 [Verbose] > │ ## sm'.concat_list_trailing │
00:00:14 #407 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #408 [Verbose] >
00:00:14 #409 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #410 [Verbose] > // // test
00:00:14 #411 [Verbose] > // // rust=
00:00:14 #412 [Verbose] >
00:00:14 #413 [Verbose] > [[
00:00:14 #414 [Verbose] > "1"
00:00:14 #415 [Verbose] > "2"
00:00:14 #416 [Verbose] > "3"
00:00:14 #417 [Verbose] > ]]
00:00:14 #418 [Verbose] > |> fun x =>
00:00:14 #419 [Verbose] > inl code = (x : _) |> sm'.concat_list_trailing "\n"
00:00:14 #420 [Verbose] > code
00:00:14 #421 [Verbose] > |> _assert_eq "1\n2\n3\n"
00:00:18 #422 [Verbose] >
00:00:18 #423 [Verbose] > ╭─[ 4.93s - return value ]─────────────────────────────────────────────────────╮
00:00:18 #424 [Verbose] > │ .rs output: │
00:00:18 #425 [Verbose] > │ │
00:00:18 #426 [Verbose] > │ │
00:00:18 #427 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #428 [Verbose] >
00:00:18 #429 [Verbose] > ╭─[ 4.93s - stdout ]───────────────────────────────────────────────────────────╮
00:00:18 #430 [Verbose] > │ │
00:00:18 #431 [Verbose] > │ .fsx: │
00:00:18 #432 [Verbose] > │ type UH0 = │
00:00:18 #433 [Verbose] > │ | UH0_0 of string * UH0 │
00:00:18 #434 [Verbose] > │ | UH0_1 │
00:00:18 #435 [Verbose] > │ let rec method2 (v0 : string, v1 : UH0, v2 : string) : string = │
00:00:18 #436 [Verbose] > │ match v1 with │
00:00:18 #437 [Verbose] > │ | UH0_0(v3, v4) -> (* Cons *) │
00:00:18 #438 [Verbose] > │ let v5 : string = v2 + v3 + v0 + "" │
00:00:18 #439 [Verbose] > │ method2(v0, v4, v5) │
00:00:18 #440 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:18 #441 [Verbose] > │ v2 │
00:00:18 #442 [Verbose] > │ and method1 (v0 : string, v1 : UH0) : string = │
00:00:18 #443 [Verbose] > │ let v2 : string = "" │
00:00:18 #444 [Verbose] > │ method2(v0, v1, v2) │
00:00:18 #445 [Verbose] > │ and method3 (v0 : bool) : bool = │
00:00:18 #446 [Verbose] > │ v0 │
00:00:18 #447 [Verbose] > │ and method0 () : unit = │
00:00:18 #448 [Verbose] > │ let v0 : string = "\n" │
00:00:18 #449 [Verbose] > │ let v1 : string = "1" │
00:00:18 #450 [Verbose] > │ let v2 : string = "2" │
00:00:18 #451 [Verbose] > │ let v3 : string = "3" │
00:00:18 #452 [Verbose] > │ let v4 : UH0 = UH0_1 │
00:00:18 #453 [Verbose] > │ let v5 : UH0 = UH0_0(v3, v4) │
00:00:18 #454 [Verbose] > │ let v6 : UH0 = UH0_0(v2, v5) │
00:00:18 #455 [Verbose] > │ let v7 : UH0 = UH0_0(v1, v6) │
00:00:18 #456 [Verbose] > │ let v8 : string = method1(v0, v7) │
00:00:18 #457 [Verbose] > │ let v10 : bool = v8 = "1\n2\n3\n" │
00:00:18 #458 [Verbose] > │ let v11 : bool = method3(v10) │
00:00:18 #459 [Verbose] > │ let v12 : string = "1\n2\n3\n" │
00:00:18 #460 [Verbose] > │ let v13 : string = $"__expect / actual: %A{v8} / expected: %A{v12}" │
00:00:18 #461 [Verbose] > │ let v14 : bool = v11 = false │
00:00:18 #462 [Verbose] > │ if v14 then │
00:00:18 #463 [Verbose] > │ failwith<unit> v13 │
00:00:18 #464 [Verbose] > │ method0() │
00:00:18 #465 [Verbose] > │ │
00:00:18 #466 [Verbose] > │ .rs: │
00:00:18 #467 [Verbose] > │ #![allow(dead_code,)] │
00:00:18 #468 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:18 #469 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:18 #470 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:18 #471 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:18 #472 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:18 #473 [Verbose] > │ #![allow(unused_imports,)] │
00:00:18 #474 [Verbose] > │ #![allow(unused_macros,)] │
00:00:18 #475 [Verbose] > │ #![allow(unused_parens,)] │
00:00:18 #476 [Verbose] > │ #![allow(unused_variables,)] │
00:00:18 #477 [Verbose] > │ mod module_ccfa04bf { │
00:00:18 #478 [Verbose] > │ pub mod Spiral_eval { │
00:00:18 #479 [Verbose] > │ use super::*; │
00:00:18 #480 [Verbose] > │ use fable_library_rust::Native_::LrcPtr; │
00:00:18 #481 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:18 #482 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:18 #483 [Verbose] > │ use fable_library_rust::String_::append; │
00:00:18 #484 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:18 #485 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:18 #486 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:18 #487 [Verbose] > │ pub enum UH0 { UH0_0(string, LrcPtr<Spiral_eval::UH0>), UH0_1, } │
00:00:18 #488 [Verbose] > │ impl Spiral_eval::UH0 { │
00:00:18 #489 [Verbose] > │ pub fn get_IsUH0_0(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:18 #490 [Verbose] > │ -> bool { │
00:00:18 #491 [Verbose] > │ if let Spiral_eval::UH0::UH0_0(this__0_0, this__0_1) = │
00:00:18 #492 [Verbose] > │ this_.as_ref() { │
00:00:18 #493 [Verbose] > │ true │
00:00:18 #494 [Verbose] > │ } else { false } │
00:00:18 #495 [Verbose] > │ } │
00:00:18 #496 [Verbose] > │ pub fn get_IsUH0_1(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:18 #497 [Verbose] > │ -> bool { │
00:00:18 #498 [Verbose] > │ if let Spiral_eval::UH0::UH0_1 = this_.as_ref() { │
00:00:18 #499 [Verbose] > │ true │
00:00:18 #500 [Verbose] > │ } else { false } │
00:00:18 #501 [Verbose] > │ } │
00:00:18 #502 [Verbose] > │ } │
00:00:18 #503 [Verbose] > │ impl core::fmt::Display for Spiral_eval::UH0 { │
00:00:18 #504 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:18 #505 [Verbose] > │ { │
00:00:18 #506 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:18 #507 [Verbose] > │ } │
00:00:18 #508 [Verbose] > │ } │
00:00:18 #509 [Verbose] > │ pub fn method2(v0: string, v1: LrcPtr<Spiral_eval::UH0>, v2: string) │
00:00:18 #510 [Verbose] > │ -> string { │
00:00:18 #511 [Verbose] > │ let v0: MutCell<string> = MutCell::new(v0.clone()); │
00:00:18 #512 [Verbose] > │ let v1: MutCell<LrcPtr<Spiral_eval::UH0>> = │
00:00:18 #513 [Verbose] > │ MutCell::new(v1.clone()); │
00:00:18 #514 [Verbose] > │ let v2: MutCell<string> = MutCell::new(v2.clone()); │
00:00:18 #515 [Verbose] > │ '_method2: │
00:00:18 #516 [Verbose] > │ loop { │
00:00:18 #517 [Verbose] > │ break '_method2 │
00:00:18 #518 [Verbose] > │ (match v1.get().clone().as_ref() { │
00:00:18 #519 [Verbose] > │ Spiral_eval::UH0::UH0_1 => v2.get().clone(), │
00:00:18 #520 [Verbose] > │ Spiral_eval::UH0::UH0_0(v1_0_0, v1_0_1) => { │
00:00:18 #521 [Verbose] > │ let v0_temp: string = v0.get().clone(); │
00:00:18 #522 [Verbose] > │ let v1_temp: LrcPtr<Spiral_eval::UH0> = │
00:00:18 #523 [Verbose] > │ v1_0_1.clone(); │
00:00:18 #524 [Verbose] > │ let v2_temp: string = │
00:00:18 #525 [Verbose] > │ append(append(append(v2.get().clone(), │
00:00:18 #526 [Verbose] > │ v1_0_0.clone()), │
00:00:18 #527 [Verbose] > │ v0.get().clone()), │
00:00:18 #528 [Verbose] > │ string("")); │
00:00:18 #529 [Verbose] > │ v0.set(v0_temp); │
00:00:18 #530 [Verbose] > │ v1.set(v1_temp); │
00:00:18 #531 [Verbose] > │ v2.set(v2_temp); │
00:00:18 #532 [Verbose] > │ continue '_method2 │
00:00:18 #533 [Verbose] > │ } │
00:00:18 #534 [Verbose] > │ }) ; │
00:00:18 #535 [Verbose] > │ } │
00:00:18 #536 [Verbose] > │ } │
00:00:18 #537 [Verbose] > │ pub fn method1(v0: string, v1: LrcPtr<Spiral_eval::UH0>) -> string { │
00:00:18 #538 [Verbose] > │ Spiral_eval::method2(v0, v1, string("")) │
00:00:18 #539 [Verbose] > │ } │
00:00:18 #540 [Verbose] > │ pub fn method3(v0: bool) -> bool { v0 } │
00:00:18 #541 [Verbose] > │ pub fn method0() { │
00:00:18 #542 [Verbose] > │ let v8: string = │
00:00:18 #543 [Verbose] > │ Spiral_eval::method1(string("\n"), │
00:00:18 #544 [Verbose] > │ │
00:00:18 #545 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("1"), │
00:00:18 #546 [Verbose] > │ │
00:00:18 #547 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("2"), │
00:00:18 #548 [Verbose] > │ │
00:00:18 #549 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("3"), │
00:00:18 #550 [Verbose] > │ │
00:00:18 #551 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_1)))))))); │
00:00:18 #552 [Verbose] > │ if Spiral_eval::method3(v8.clone() == string("1\n2\n3\n")) == │
00:00:18 #553 [Verbose] > │ false { │
00:00:18 #554 [Verbose] > │ panic!("{}", │
00:00:18 #555 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: {:?}", │
00:00:18 #556 [Verbose] > │ v8, string("1\n2\n3\n"))); │
00:00:18 #557 [Verbose] > │ } │
00:00:18 #558 [Verbose] > │ } │
00:00:18 #559 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:18 #560 [Verbose] > │ } │
00:00:18 #561 [Verbose] > │ } │
00:00:18 #562 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:18 #563 [Verbose] > │ │
00:00:18 #564 [Verbose] > │ │
00:00:18 #565 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #566 [Verbose] >
00:00:18 #567 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #568 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #569 [Verbose] > │ ## sm'.concat_list_heap_trailing │
00:00:18 #570 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #571 [Verbose] >
00:00:18 #572 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #573 [Verbose] > // // test
00:00:18 #574 [Verbose] > // // rust=
00:00:18 #575 [Verbose] >
00:00:18 #576 [Verbose] > types ()
00:00:18 #577 [Verbose] >
00:00:18 #578 [Verbose] > [[
00:00:18 #579 [Verbose] > "1"
00:00:18 #580 [Verbose] > "2"
00:00:18 #581 [Verbose] > "3"
00:00:18 #582 [Verbose] > ]]
00:00:18 #583 [Verbose] > |> fun x =>
00:00:18 #584 [Verbose] > inl code = (x : _) |> sm'.concat_list_heap_trailing "\n"
00:00:18 #585 [Verbose] > code
00:00:18 #586 [Verbose] > |> _assert_eq "1\n2\n3\n"
00:00:24 #587 [Verbose] >
00:00:24 #588 [Verbose] > ╭─[ 5.19s - return value ]─────────────────────────────────────────────────────╮
00:00:24 #589 [Verbose] > │ .rs output: │
00:00:24 #590 [Verbose] > │ │
00:00:24 #591 [Verbose] > │ │
00:00:24 #592 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #593 [Verbose] >
00:00:24 #594 [Verbose] > ╭─[ 5.20s - stdout ]───────────────────────────────────────────────────────────╮
00:00:24 #595 [Verbose] > │ │
00:00:24 #596 [Verbose] > │ .fsx: │
00:00:24 #597 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] type Func0<'T> = class │
00:00:24 #598 [Verbose] > │ end │
00:00:24 #599 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>] type Func0<'T, 'U> = │
00:00:24 #600 [Verbose] > │ class end │
00:00:24 #601 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>] type Box<'T> = class end │
00:00:24 #602 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>] type Dyn<'T> = class end │
00:00:24 #603 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>] type Fn<'T> = class end │
00:00:24 #604 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn()")>] type FnUnit = class end │
00:00:24 #605 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>] type FnOnce<'T> = │
00:00:24 #606 [Verbose] > │ class end │
00:00:24 #607 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>] type ActionFn2<'T, 'U> = │
00:00:24 #608 [Verbose] > │ class end │
00:00:24 #609 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("impl $0")>] type Impl<'T> = class end │
00:00:24 #610 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("mut $0")>] type Mut<'T> = class end │
00:00:24 #611 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end │
00:00:24 #612 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>] type StaticRef<'T> = │
00:00:24 #613 [Verbose] > │ class end │
00:00:24 #614 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>] type MutCell<'T> = │
00:00:24 #615 [Verbose] > │ class end │
00:00:24 #616 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::any::Any")>] type std_any_Any = │
00:00:24 #617 [Verbose] > │ class end │
00:00:24 #618 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::cell::RefCell<$0>")>] type │
00:00:24 #619 [Verbose] > │ std_cell_RefCell<'T> = class end │
00:00:24 #620 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::pin::Pin<$0>")>] type │
00:00:24 #621 [Verbose] > │ std_pin_Pin<'T> = class end │
00:00:24 #622 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Rc<$0>")>] type std_rc_Rc<'T> │
00:00:24 #623 [Verbose] > │ = class end │
00:00:24 #624 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Weak<$0>")>] type │
00:00:24 #625 [Verbose] > │ std_rc_Weak<'T> = class end │
00:00:24 #626 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>] type │
00:00:24 #627 [Verbose] > │ std_sync_Arc<'T> = class end │
00:00:24 #628 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end │
00:00:24 #629 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("base64::DecodeError")>] type │
00:00:24 #630 [Verbose] > │ base64_DecodeError = class end │
00:00:24 #631 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("borsh::io::Error")>] type │
00:00:24 #632 [Verbose] > │ borsh_io_Error = class end │
00:00:24 #633 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("js_sys::JsString")>] type │
00:00:24 #634 [Verbose] > │ js_sys_JsString = class end │
00:00:24 #635 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Error")>] type │
00:00:24 #636 [Verbose] > │ serde_json_Error = class end │
00:00:24 #637 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Value")>] type │
00:00:24 #638 [Verbose] > │ serde_json_Value = class end │
00:00:24 #639 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_wasm_bindgen::Error")>] type │
00:00:24 #640 [Verbose] > │ serde_wasm_bindgen_Error = class end │
00:00:24 #641 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::str::Utf8Error")>] type │
00:00:24 #642 [Verbose] > │ std_str_Utf8Error = class end │
00:00:24 #643 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type │
00:00:24 #644 [Verbose] > │ std_string_String = class end │
00:00:24 #645 [Verbose] > │ type UH0 = │
00:00:24 #646 [Verbose] > │ | UH0_0 of string * UH0 │
00:00:24 #647 [Verbose] > │ | UH0_1 │
00:00:24 #648 [Verbose] > │ let rec method3 (v0 : string) : string = │
00:00:24 #649 [Verbose] > │ v0 │
00:00:24 #650 [Verbose] > │ and method4 (v0 : string) : string = │
00:00:24 #651 [Verbose] > │ v0 │
00:00:24 #652 [Verbose] > │ and method5 (v0 : std_string_String) : std_string_String = │
00:00:24 #653 [Verbose] > │ v0 │
00:00:24 #654 [Verbose] > │ and method2 (v0 : string, v1 : UH0, v2 : string) : string = │
00:00:24 #655 [Verbose] > │ match v1 with │
00:00:24 #656 [Verbose] > │ | UH0_0(v3, v4) -> (* Cons *) │
00:00:24 #657 [Verbose] > │ let v5 : string = method3(v2) │
00:00:24 #658 [Verbose] > │ let v6 : string = method4(v5) │
00:00:24 #659 [Verbose] > │ let v7 : string = │
00:00:24 #660 [Verbose] > │ $"fable_library_rust::String_::LrcStr::as_str(&v6)" │
00:00:24 #661 [Verbose] > │ let v8 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v7 │
00:00:24 #662 [Verbose] > │ let v9 : string = "String::from(v8)" │
00:00:24 #663 [Verbose] > │ let v10 : std_string_String = Fable.Core.RustInterop.emitRustExpr () │
00:00:24 #664 [Verbose] > │ v9 │
00:00:24 #665 [Verbose] > │ let v11 : string = method4(v3) │
00:00:24 #666 [Verbose] > │ let v12 : string = │
00:00:24 #667 [Verbose] > │ $"fable_library_rust::String_::LrcStr::as_str(&v11)" │
00:00:24 #668 [Verbose] > │ let v13 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v12 │
00:00:24 #669 [Verbose] > │ let v14 : string = method4(v0) │
00:00:24 #670 [Verbose] > │ let v15 : string = │
00:00:24 #671 [Verbose] > │ $"fable_library_rust::String_::LrcStr::as_str(&v14)" │
00:00:24 #672 [Verbose] > │ let v16 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v15 │
00:00:24 #673 [Verbose] > │ let v17 : string = "v10 + v13 + v16" │
00:00:24 #674 [Verbose] > │ let v18 : std_string_String = Fable.Core.RustInterop.emitRustExpr () │
00:00:24 #675 [Verbose] > │ v17 │
00:00:24 #676 [Verbose] > │ let v19 : std_string_String = method5(v18) │
00:00:24 #677 [Verbose] > │ let v20 : string = "fable_library_rust::String_::fromString(v19)" │
00:00:24 #678 [Verbose] > │ let v21 : string = Fable.Core.RustInterop.emitRustExpr () v20 │
00:00:24 #679 [Verbose] > │ method2(v0, v4, v21) │
00:00:24 #680 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:24 #681 [Verbose] > │ v2 │
00:00:24 #682 [Verbose] > │ and method1 (v0 : string, v1 : UH0) : string = │
00:00:24 #683 [Verbose] > │ let v2 : string = "" │
00:00:24 #684 [Verbose] > │ method2(v0, v1, v2) │
00:00:24 #685 [Verbose] > │ and method6 (v0 : bool) : bool = │
00:00:24 #686 [Verbose] > │ v0 │
00:00:24 #687 [Verbose] > │ and method0 () : unit = │
00:00:24 #688 [Verbose] > │ let v0 : string = "\n" │
00:00:24 #689 [Verbose] > │ let v1 : string = "1" │
00:00:24 #690 [Verbose] > │ let v2 : string = "2" │
00:00:24 #691 [Verbose] > │ let v3 : string = "3" │
00:00:24 #692 [Verbose] > │ let v4 : UH0 = UH0_1 │
00:00:24 #693 [Verbose] > │ let v5 : UH0 = UH0_0(v3, v4) │
00:00:24 #694 [Verbose] > │ let v6 : UH0 = UH0_0(v2, v5) │
00:00:24 #695 [Verbose] > │ let v7 : UH0 = UH0_0(v1, v6) │
00:00:24 #696 [Verbose] > │ let v8 : string = method1(v0, v7) │
00:00:24 #697 [Verbose] > │ let v10 : bool = v8 = "1\n2\n3\n" │
00:00:24 #698 [Verbose] > │ let v11 : bool = method6(v10) │
00:00:24 #699 [Verbose] > │ let v12 : string = "1\n2\n3\n" │
00:00:24 #700 [Verbose] > │ let v13 : string = $"__expect / actual: %A{v8} / expected: %A{v12}" │
00:00:24 #701 [Verbose] > │ let v14 : bool = v11 = false │
00:00:24 #702 [Verbose] > │ if v14 then │
00:00:24 #703 [Verbose] > │ failwith<unit> v13 │
00:00:24 #704 [Verbose] > │ method0() │
00:00:24 #705 [Verbose] > │ │
00:00:24 #706 [Verbose] > │ .rs: │
00:00:24 #707 [Verbose] > │ #![allow(dead_code,)] │
00:00:24 #708 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:24 #709 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:24 #710 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:24 #711 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:24 #712 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:24 #713 [Verbose] > │ #![allow(unused_imports,)] │
00:00:24 #714 [Verbose] > │ #![allow(unused_macros,)] │
00:00:24 #715 [Verbose] > │ #![allow(unused_parens,)] │
00:00:24 #716 [Verbose] > │ #![allow(unused_variables,)] │
00:00:24 #717 [Verbose] > │ mod module_ccfa04bf { │
00:00:24 #718 [Verbose] > │ pub mod Spiral_eval { │
00:00:24 #719 [Verbose] > │ use super::*; │
00:00:24 #720 [Verbose] > │ use fable_library_rust::Native_::LrcPtr; │
00:00:24 #721 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:24 #722 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:24 #723 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:24 #724 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:24 #725 [Verbose] > │ #[derive(Clone, Debug, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:24 #726 [Verbose] > │ pub enum UH0 { UH0_0(string, LrcPtr<Spiral_eval::UH0>), UH0_1, } │
00:00:24 #727 [Verbose] > │ impl Spiral_eval::UH0 { │
00:00:24 #728 [Verbose] > │ pub fn get_IsUH0_0(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:24 #729 [Verbose] > │ -> bool { │
00:00:24 #730 [Verbose] > │ if let Spiral_eval::UH0::UH0_0(this__0_0, this__0_1) = │
00:00:24 #731 [Verbose] > │ this_.as_ref() { │
00:00:24 #732 [Verbose] > │ true │
00:00:24 #733 [Verbose] > │ } else { false } │
00:00:24 #734 [Verbose] > │ } │
00:00:24 #735 [Verbose] > │ pub fn get_IsUH0_1(this_: LrcPtr<Spiral_eval::UH0>, unitArg: ()) │
00:00:24 #736 [Verbose] > │ -> bool { │
00:00:24 #737 [Verbose] > │ if let Spiral_eval::UH0::UH0_1 = this_.as_ref() { │
00:00:24 #738 [Verbose] > │ true │
00:00:24 #739 [Verbose] > │ } else { false } │
00:00:24 #740 [Verbose] > │ } │
00:00:24 #741 [Verbose] > │ } │
00:00:24 #742 [Verbose] > │ impl core::fmt::Display for Spiral_eval::UH0 { │
00:00:24 #743 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:24 #744 [Verbose] > │ { │
00:00:24 #745 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:24 #746 [Verbose] > │ } │
00:00:24 #747 [Verbose] > │ } │
00:00:24 #748 [Verbose] > │ pub fn method3(v0: string) -> string { v0 } │
00:00:24 #749 [Verbose] > │ pub fn method4(v0: string) -> string { v0 } │
00:00:24 #750 [Verbose] > │ pub fn method5(v0: std::string::String) -> std::string::String { v0 │
00:00:24 #751 [Verbose] > │ } │
00:00:24 #752 [Verbose] > │ pub fn method2(v0: string, v1: LrcPtr<Spiral_eval::UH0>, v2: string) │
00:00:24 #753 [Verbose] > │ -> string { │
00:00:24 #754 [Verbose] > │ let v0: MutCell<string> = MutCell::new(v0.clone()); │
00:00:24 #755 [Verbose] > │ let v1: MutCell<LrcPtr<Spiral_eval::UH0>> = │
00:00:24 #756 [Verbose] > │ MutCell::new(v1.clone()); │
00:00:24 #757 [Verbose] > │ let v2: MutCell<string> = MutCell::new(v2.clone()); │
00:00:24 #758 [Verbose] > │ '_method2: │
00:00:24 #759 [Verbose] > │ loop { │
00:00:24 #760 [Verbose] > │ break '_method2 │
00:00:24 #761 [Verbose] > │ (match v1.get().clone().as_ref() { │
00:00:24 #762 [Verbose] > │ Spiral_eval::UH0::UH0_1 => v2.get().clone(), │
00:00:24 #763 [Verbose] > │ Spiral_eval::UH0::UH0_0(v1_0_0, v1_0_1) => { │
00:00:24 #764 [Verbose] > │ let v6: string = │
00:00:24 #765 [Verbose] > │ │
00:00:24 #766 [Verbose] > │ Spiral_eval::method4(Spiral_eval::method3(v2.get().clone())); │
00:00:24 #767 [Verbose] > │ let v8: &str = │
00:00:24 #768 [Verbose] > │ │
00:00:24 #769 [Verbose] > │ fable_library_rust::String_::LrcStr::as_str(&v6); │
00:00:24 #770 [Verbose] > │ let v10: std::string::String = │
00:00:24 #771 [Verbose] > │ String::from(v8); │
00:00:24 #772 [Verbose] > │ let v11: string = │
00:00:24 #773 [Verbose] > │ Spiral_eval::method4(v1_0_0.clone()); │
00:00:24 #774 [Verbose] > │ let v13: &str = │
00:00:24 #775 [Verbose] > │ │
00:00:24 #776 [Verbose] > │ fable_library_rust::String_::LrcStr::as_str(&v11); │
00:00:24 #777 [Verbose] > │ let v14: string = │
00:00:24 #778 [Verbose] > │ Spiral_eval::method4(v0.get().clone()); │
00:00:24 #779 [Verbose] > │ let v16: &str = │
00:00:24 #780 [Verbose] > │ │
00:00:24 #781 [Verbose] > │ fable_library_rust::String_::LrcStr::as_str(&v14); │
00:00:24 #782 [Verbose] > │ let v19: std::string::String = │
00:00:24 #783 [Verbose] > │ Spiral_eval::method5(v10 + v13 + v16); │
00:00:24 #784 [Verbose] > │ { │
00:00:24 #785 [Verbose] > │ let v0_temp: string = v0.get().clone(); │
00:00:24 #786 [Verbose] > │ let v1_temp: LrcPtr<Spiral_eval::UH0> = │
00:00:24 #787 [Verbose] > │ v1_0_1.clone(); │
00:00:24 #788 [Verbose] > │ let v2_temp: string = │
00:00:24 #789 [Verbose] > │ │
00:00:24 #790 [Verbose] > │ fable_library_rust::String_::fromString(v19); │
00:00:24 #791 [Verbose] > │ v0.set(v0_temp); │
00:00:24 #792 [Verbose] > │ v1.set(v1_temp); │
00:00:24 #793 [Verbose] > │ v2.set(v2_temp); │
00:00:24 #794 [Verbose] > │ continue '_method2 │
00:00:24 #795 [Verbose] > │ } │
00:00:24 #796 [Verbose] > │ } │
00:00:24 #797 [Verbose] > │ }) ; │
00:00:24 #798 [Verbose] > │ } │
00:00:24 #799 [Verbose] > │ } │
00:00:24 #800 [Verbose] > │ pub fn method1(v0: string, v1: LrcPtr<Spiral_eval::UH0>) -> string { │
00:00:24 #801 [Verbose] > │ Spiral_eval::method2(v0, v1, string("")) │
00:00:24 #802 [Verbose] > │ } │
00:00:24 #803 [Verbose] > │ pub fn method6(v0: bool) -> bool { v0 } │
00:00:24 #804 [Verbose] > │ pub fn method0() { │
00:00:24 #805 [Verbose] > │ let v8: string = │
00:00:24 #806 [Verbose] > │ Spiral_eval::method1(string("\n"), │
00:00:24 #807 [Verbose] > │ │
00:00:24 #808 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("1"), │
00:00:24 #809 [Verbose] > │ │
00:00:24 #810 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("2"), │
00:00:24 #811 [Verbose] > │ │
00:00:24 #812 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_0(string("3"), │
00:00:24 #813 [Verbose] > │ │
00:00:24 #814 [Verbose] > │ LrcPtr::new(Spiral_eval::UH0::UH0_1)))))))); │
00:00:24 #815 [Verbose] > │ if Spiral_eval::method6(v8.clone() == string("1\n2\n3\n")) == │
00:00:24 #816 [Verbose] > │ false { │
00:00:24 #817 [Verbose] > │ panic!("{}", │
00:00:24 #818 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: {:?}", │
00:00:24 #819 [Verbose] > │ v8, string("1\n2\n3\n"))); │
00:00:24 #820 [Verbose] > │ } │
00:00:24 #821 [Verbose] > │ } │
00:00:24 #822 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:24 #823 [Verbose] > │ } │
00:00:24 #824 [Verbose] > │ } │
00:00:24 #825 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:24 #826 [Verbose] > │ │
00:00:24 #827 [Verbose] > │ │
00:00:24 #828 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #829 [Verbose] > [NbConvertApp] Converting notebook util.dib.ipynb to html
00:00:26 #830 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:26 #831 [Verbose] > validate(nb)
00:00:26 #832 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:26 #833 [Verbose] > return _pygments_highlight(
00:00:26 #834 [Verbose] > [NbConvertApp] Writing 318232 bytes to util.dib.html
00:00:27 #835 [Debug] executeAsync / exitCode: 0 / output.Length: 58701
00:00:27 #836 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 rust.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:03 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:03 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:03 #6 [Verbose] > │ # rust │
00:00:03 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:03 #8 [Verbose] >
00:00:03 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:03 #10 [Verbose] > // // test
00:00:03 #11 [Verbose] >
00:00:03 #12 [Verbose] > open testing
00:00:07 #13 [Verbose] >
00:00:07 #14 [Verbose] > ╭─[ 4.01s - stdout ]───────────────────────────────────────────────────────────╮
00:00:07 #15 [Verbose] > │ () │
00:00:07 #16 [Verbose] > │ │
00:00:07 #17 [Verbose] > │ │
00:00:07 #18 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #19 [Verbose] >
00:00:07 #20 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:07 #21 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:07 #22 [Verbose] > │ ## emit_expr │
00:00:07 #23 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #24 [Verbose] >
00:00:07 #25 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #26 [Verbose] > inl emit_expr forall a t. (args : a) (code : string) : t =
00:00:07 #27 [Verbose] > real
00:00:07 #28 [Verbose] > $"Fable.Core.RustInterop.emitRustExpr !args !code" : t
00:00:07 #29 [Verbose] >
00:00:07 #30 [Verbose] > ╭─[ 226.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #31 [Verbose] > │ () │
00:00:07 #32 [Verbose] > │ │
00:00:07 #33 [Verbose] > │ │
00:00:07 #34 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #35 [Verbose] >
00:00:07 #36 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #37 [Verbose] > inl types () =
00:00:07 #38 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Func0<$0>\")>]] type
00:00:07 #39 [Verbose] > Func0<'T> = class end"
00:00:07 #40 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Func1<$0, $1>\")>]] type
00:00:07 #41 [Verbose] > Func0<'T, 'U> = class end"
00:00:07 #42 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Box<$0>\")>]] type Box<'T> =
00:00:07 #43 [Verbose] > class end"
00:00:07 #44 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn $0\")>]] type Dyn<'T> =
00:00:07 #45 [Verbose] > class end"
00:00:07 #46 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() -> $0\")>]] type Fn<'T>
00:00:07 #47 [Verbose] > = class end"
00:00:07 #48 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn()\")>]] type FnUnit =
00:00:07 #49 [Verbose] > class end"
00:00:07 #50 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"FnOnce() -> $0\")>]] type
00:00:07 #51 [Verbose] > FnOnce<'T> = class end"
00:00:07 #52 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn($0, $1)\")>]] type
00:00:07 #53 [Verbose] > ActionFn2<'T, 'U> = class end"
00:00:07 #54 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"impl $0\")>]] type Impl<'T> =
00:00:07 #55 [Verbose] > class end"
00:00:07 #56 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"mut $0\")>]] type Mut<'T> =
00:00:07 #57 [Verbose] > class end"
00:00:07 #58 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"&$0\")>]] type Ref<'T> =
00:00:07 #59 [Verbose] > class end"
00:00:07 #60 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"&'static $0\")>]] type
00:00:07 #61 [Verbose] > StaticRef<'T> = class end"
00:00:07 #62 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"MutCell<$0>\")>]] type
00:00:07 #63 [Verbose] > MutCell<'T> = class end"
00:00:07 #64 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::any::Any\")>]] type
00:00:07 #65 [Verbose] > std_any_Any = class end"
00:00:07 #66 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]
00:00:07 #67 [Verbose] > type std_cell_RefCell<'T> = class end"
00:00:07 #68 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::pin::Pin<$0>\")>]] type
00:00:07 #69 [Verbose] > std_pin_Pin<'T> = class end"
00:00:07 #70 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::rc::Rc<$0>\")>]] type
00:00:07 #71 [Verbose] > std_rc_Rc<'T> = class end"
00:00:07 #72 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::rc::Weak<$0>\")>]] type
00:00:07 #73 [Verbose] > std_rc_Weak<'T> = class end"
00:00:07 #74 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"std::sync::Arc<$0>\")>]] type
00:00:07 #75 [Verbose] > std_sync_Arc<'T> = class end"
00:00:07 #76 [Verbose] >
00:00:07 #77 [Verbose] > ╭─[ 275.89ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #78 [Verbose] > │ () │
00:00:07 #79 [Verbose] > │ │
00:00:07 #80 [Verbose] > │ │
00:00:07 #81 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #82 [Verbose] >
00:00:07 #83 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #84 [Verbose] > nominal ref_cell t = $"std_cell_RefCell<`t>"
00:00:07 #85 [Verbose] > nominal rc t = $"std_rc_Rc<`t>"
00:00:07 #86 [Verbose] > nominal weak_rc t = $"std_rc_Weak<`t>"
00:00:07 #87 [Verbose] > nominal box t = $"Box<`t>"
00:00:07 #88 [Verbose] > nominal mut_cell t = $"MutCell<`t>"
00:00:07 #89 [Verbose] > nominal pin t = $"std_pin_Pin<`t>"
00:00:07 #90 [Verbose] > nominal arc t = $"std_sync_Arc<`t>"
00:00:07 #91 [Verbose] > nominal dyn' t = $"Dyn<`t>"
00:00:07 #92 [Verbose] > nominal fn' t = $"Fn<`t>"
00:00:07 #93 [Verbose] > nominal action_fn2 t u = $"ActionFn2<`t, `u>"
00:00:07 #94 [Verbose] > nominal fn_once t = $"FnOnce<`t>"
00:00:07 #95 [Verbose] > nominal fn_unit = $"FnUnit"
00:00:07 #96 [Verbose] > nominal func0 t = $"Func0<`t>"
00:00:07 #97 [Verbose] > nominal func1 t u = $"Func0<`t, `u>"
00:00:07 #98 [Verbose] > nominal impl t = $"Impl<`t>"
00:00:07 #99 [Verbose] > nominal mut' t = $"Mut<`t>"
00:00:07 #100 [Verbose] > nominal ref' t = $"Ref<`t>"
00:00:07 #101 [Verbose] > nominal static_ref' t = $"StaticRef<`t>"
00:00:07 #102 [Verbose] >
00:00:07 #103 [Verbose] > ╭─[ 218.35ms - stdout ]────────────────────────────────────────────────────────╮
00:00:07 #104 [Verbose] > │ () │
00:00:07 #105 [Verbose] > │ │
00:00:07 #106 [Verbose] > │ │
00:00:07 #107 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:07 #108 [Verbose] >
00:00:07 #109 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:07 #110 [Verbose] > inl (~!\) forall t. (code : string) : t =
00:00:07 #111 [Verbose] > emit_expr () code
00:00:07 #112 [Verbose] >
00:00:07 #113 [Verbose] > inl (~!\\) forall t u. ((args : t), (code : string)) : u =
00:00:07 #114 [Verbose] > emit_expr args code
00:00:07 #115 [Verbose] >
00:00:07 #116 [Verbose] > inl new_box forall t. (x : t) : box t =
00:00:07 #117 [Verbose] > inl x = join x
00:00:07 #118 [Verbose] > !\($'"Box::new(!x)"')
00:00:07 #119 [Verbose] >
00:00:07 #120 [Verbose] > inl new_rc forall t. (x : t) : rc t =
00:00:07 #121 [Verbose] > inl x = join x
00:00:07 #122 [Verbose] > !\($'"std::rc::Rc::new(!x)"')
00:00:07 #123 [Verbose] >
00:00:07 #124 [Verbose] > inl rc_clone forall t. (x : rc t) : rc t =
00:00:07 #125 [Verbose] > inl x = join x
00:00:07 #126 [Verbose] > !\($'"std::rc::Rc::clone(&!x)"')
00:00:07 #127 [Verbose] >
00:00:07 #128 [Verbose] > inl rc_downgrade forall t. (x : rc t) : weak_rc t =
00:00:07 #129 [Verbose] > inl x = join x
00:00:07 #130 [Verbose] > !\($'"std::rc::Rc::downgrade(&!x)"')
00:00:07 #131 [Verbose] >
00:00:07 #132 [Verbose] > inl new_ref_cell forall t. (x : t) : ref_cell t =
00:00:07 #133 [Verbose] > inl x = join x
00:00:07 #134 [Verbose] > !\($'"std::cell::RefCell::new(!x)"')
00:00:07 #135 [Verbose] >
00:00:07 #136 [Verbose] > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t =
00:00:07 #137 [Verbose] > inl x = join x
00:00:07 #138 [Verbose] > !\($'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&!x))"')
00:00:07 #139 [Verbose] >
00:00:07 #140 [Verbose] > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t =
00:00:07 #141 [Verbose] > inl x = join x
00:00:07 #142 [Verbose] > !\($'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&!x))"')
00:00:07 #143 [Verbose] >
00:00:07 #144 [Verbose] > inl to_mut forall t. (x : t) : mut' t =
00:00:07 #145 [Verbose] > // !\($'"let mut !x = !x"')
00:00:07 #146 [Verbose] > // !\($'"!x"')
00:00:07 #147 [Verbose] > emit_expr () $"\"let mut !x = !x\""
00:00:07 #148 [Verbose] > emit_expr () $"\"!x\""
00:00:07 #149 [Verbose] >
00:00:07 #150 [Verbose] > inl ref_map forall t u. (fn : t -> u) (x : ref' t) : ref' u =
00:00:07 #151 [Verbose] > !\($'"!fn(!x)"')
00:00:07 #152 [Verbose] >
00:00:07 #153 [Verbose] > inl from_mut forall t. (x : mut' t) : t =
00:00:07 #154 [Verbose] > !\($'"!x"')
00:00:07 #155 [Verbose] >
00:00:07 #156 [Verbose] > inl new_arc forall t. (x : t) : arc t =
00:00:07 #157 [Verbose] > inl x = join x
00:00:07 #158 [Verbose] > !\($'"std::sync::Arc::new(!x)"')
00:00:07 #159 [Verbose] >
00:00:07 #160 [Verbose] > inl box_fn forall t. (x : () -> ()) : box t =
00:00:07 #161 [Verbose] > inl x = join x
00:00:07 #162 [Verbose] > !\($'"Box::new(move || !x())"')
00:00:07 #163 [Verbose] >
00:00:07 #164 [Verbose] > inl new_pin forall t. (x : t) : pin (box t) =
00:00:07 #165 [Verbose] > inl x = join x
00:00:07 #166 [Verbose] > !\($'"Box::pin(!x)"')
00:00:07 #167 [Verbose] >
00:00:07 #168 [Verbose] > inl deref forall t. (ref : ref' t) : t =
00:00:07 #169 [Verbose] > inl ref = join ref
00:00:07 #170 [Verbose] > !\($'"*!ref"')
00:00:07 #171 [Verbose] >
00:00:07 #172 [Verbose] > inl ops_deref forall t. (ref : t) : t =
00:00:07 #173 [Verbose] > inl ref = join ref
00:00:07 #174 [Verbose] > !\($'"core::ops::Deref::deref(&!ref)"')
00:00:07 #175 [Verbose] >
00:00:07 #176 [Verbose] > inl func0_get forall t. (x : func0 t) : t =
00:00:07 #177 [Verbose] > inl x = join x
00:00:07 #178 [Verbose] > !\($'"!x()"')
00:00:07 #179 [Verbose] >
00:00:07 #180 [Verbose] > inl func0_move forall t. (fn : func0 t) : t =
00:00:07 #181 [Verbose] > inl fn = join fn
00:00:07 #182 [Verbose] > !\($'"(move || !fn())()"')
00:00:07 #183 [Verbose] >
00:00:07 #184 [Verbose] > inl move forall t. (fn : () -> t) : func0 t =
00:00:07 #185 [Verbose] > inl fn = join fn
00:00:07 #186 [Verbose] > !\($'"Func0::new(move || !fn())"')
00:00:07 #187 [Verbose] >
00:00:07 #188 [Verbose] > inl to_static_ref_unbox forall t. (x : ref' t) : static_ref' t =
00:00:07 #189 [Verbose] > $"!x |> unbox"
00:00:07 #190 [Verbose] >
00:00:07 #191 [Verbose] > inl from_static_ref_unbox forall t. (x : static_ref' t) : ref' t =
00:00:07 #192 [Verbose] > $"!x |> unbox"
00:00:07 #193 [Verbose] >
00:00:07 #194 [Verbose] > inl box_leak forall t. (x : box t) : static_ref' (mut' t) =
00:00:07 #195 [Verbose] > emit_expr () $"\"Box::leak(!x)\""
00:00:07 #196 [Verbose] >
00:00:07 #197 [Verbose] > inl fix_closure depth x' =
00:00:07 #198 [Verbose] > if depth = 1
00:00:07 #199 [Verbose] > then !\($'"!x' })"')
00:00:07 #200 [Verbose] > elif depth = 2
00:00:07 #201 [Verbose] > then !\($'"!x' }})"')
00:00:07 #202 [Verbose] > elif depth = 3
00:00:07 #203 [Verbose] > then !\($'"!x' }}); { //"')
00:00:07 #204 [Verbose] > elif depth = 4
00:00:07 #205 [Verbose] > then !\($'"!x' }}}); {{ //"')
00:00:07 #206 [Verbose] > elif depth = 5
00:00:07 #207 [Verbose] > then !\($'"!x' }}}}); {{{ //"')
00:00:07 #208 [Verbose] > elif depth = 6
00:00:07 #209 [Verbose] > then !\($'"!x' }}}}); {{{{ //"')
00:00:07 #210 [Verbose] > elif depth = 7
00:00:07 #211 [Verbose] > then !\($'"!x' }}}}}); {{{{{ //"')
00:00:08 #212 [Verbose] >
00:00:08 #213 [Verbose] > ╭─[ 221.00ms - stdout ]────────────────────────────────────────────────────────╮
00:00:08 #214 [Verbose] > │ () │
00:00:08 #215 [Verbose] > │ │
00:00:08 #216 [Verbose] > │ │
00:00:08 #217 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #218 [Verbose] > [NbConvertApp] Converting notebook rust.dib.ipynb to html
00:00:10 #219 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:10 #220 [Verbose] > validate(nb)
00:00:10 #221 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:10 #222 [Verbose] > return _pygments_highlight(
00:00:10 #223 [Verbose] > [NbConvertApp] Writing 301752 bytes to rust.dib.html
00:00:11 #224 [Debug] executeAsync / exitCode: 0 / output.Length: 9193
00:00:11 #225 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 physics.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:03 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:03 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:03 #6 [Verbose] > │ # physics │
00:00:03 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:03 #8 [Verbose] >
00:00:03 #9 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:03 #10 [Verbose] > #!import ../../lib/fsharp/Plotting.dib
00:00:03 #11 [Verbose] >
00:00:03 #12 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:03 #13 [Verbose] > #r
00:00:03 #14 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:03 #15 [Verbose] > spNetCore.Html.Abstractions.dll"
00:00:03 #16 [Verbose] > #r
00:00:03 #17 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:03 #18 [Verbose] > otNet.Interactive.dll"
00:00:03 #19 [Verbose] > #r
00:00:03 #20 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:03 #21 [Verbose] > otNet.Interactive.FSharp.dll"
00:00:03 #22 [Verbose] > #r
00:00:03 #23 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:03 #24 [Verbose] > otNet.Interactive.Formatting.dll"
00:00:03 #25 [Verbose] > open System
00:00:03 #26 [Verbose] > open System.IO
00:00:03 #27 [Verbose] > open System.Text
00:00:03 #28 [Verbose] > open Microsoft.DotNet.Interactive.Formatting
00:00:07 #29 [Verbose] >
00:00:07 #30 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:07 #31 [Verbose] > #r
00:00:07 #32 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:07 #33 [Verbose] > otNet.Interactive.FSharp.dll"
00:00:07 #34 [Verbose] > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:07 #35 [Verbose] > #r
00:00:07 #36 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:07 #37 [Verbose] > otNet.Interactive.dll"
00:00:07 #38 [Verbose] > open type Microsoft.DotNet.Interactive.Kernel
00:00:07 #39 [Verbose] >
00:00:07 #40 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:07 #41 [Verbose] > //// test
00:00:07 #42 [Verbose] >
00:00:07 #43 [Verbose] > Formatter.ListExpansionLimit <- 100
00:00:07 #44 [Verbose] >
00:00:07 #45 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:07 #46 [Verbose] > #r
00:00:07 #47 [Verbose] > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:00:07 #48 [Verbose] > dard2.1/FSharp.Control.AsyncSeq.dll"
00:00:07 #49 [Verbose] > #r
00:00:07 #50 [Verbose] > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:00:07 #51 [Verbose] > 0/System.Reactive.dll"
00:00:07 #52 [Verbose] > #r
00:00:07 #53 [Verbose] > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:00:07 #54 [Verbose] > netstandard2.0/System.Reactive.Linq.dll"
00:00:07 #55 [Verbose] > #r
00:00:07 #56 [Verbose] > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:00:07 #57 [Verbose] > #r
00:00:07 #58 [Verbose] > @"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
00:00:07 #59 [Verbose] > b/net6.0/System.CommandLine.dll"
00:00:07 #60 [Verbose] > #r
00:00:07 #61 [Verbose] > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha
00:00:07 #62 [Verbose] > rp.Json.dll"
00:00:08 #63 [Verbose] >
00:00:08 #64 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:08 #65 [Verbose] > #if !INTERACTIVE
00:00:08 #66 [Verbose] > namespace Polyglot
00:00:08 #67 [Verbose] > #endif
00:00:08 #68 [Verbose] >
00:00:08 #69 [Verbose] > module Common =
00:00:08 #70 [Verbose] >
00:00:08 #71 [Verbose] > let nl = System.Environment.NewLine
00:00:08 #72 [Verbose] > let q = @""""
00:00:08 #73 [Verbose] >
00:00:08 #74 [Verbose] > let inline cons head tail = head :: tail
00:00:08 #75 [Verbose] >
00:00:08 #76 [Verbose] > module String =
00:00:08 #77 [Verbose] > let inline contains (value : string) (input : string) =
00:00:08 #78 [Verbose] > input.Contains value
00:00:08 #79 [Verbose] >
00:00:08 #80 [Verbose] > let inline endsWith (value : string) (input : string) =
00:00:08 #81 [Verbose] > input.EndsWith value
00:00:08 #82 [Verbose] >
00:00:08 #83 [Verbose] > let inline padLeft totalWidth paddingChar (input : string) =
00:00:08 #84 [Verbose] > input.PadLeft (totalWidth, paddingChar)
00:00:08 #85 [Verbose] >
00:00:08 #86 [Verbose] > let inline replace (oldValue : string) (newValue : string) (input :
00:00:08 #87 [Verbose] > string) =
00:00:08 #88 [Verbose] > input.Replace (oldValue, newValue)
00:00:08 #89 [Verbose] >
00:00:08 #90 [Verbose] > let inline split separator (input : string) =
00:00:08 #91 [Verbose] > input.Split separator
00:00:08 #92 [Verbose] >
00:00:08 #93 [Verbose] > let inline spli...
00:00:09 #94 [Verbose] >
00:00:09 #95 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 #96 [Verbose] > #if !INTERACTIVE
00:00:09 #97 [Verbose] > namespace Polyglot
00:00:09 #98 [Verbose] > #endif
00:00:09 #99 [Verbose] >
00:00:09 #100 [Verbose] > module CommonFSharp =
00:00:09 #101 [Verbose] >
00:00:09 #102 [Verbose] > open Common
00:00:09 #103 [Verbose] >
00:00:09 #104 [Verbose] > /// ## getUnionCaseName
00:00:09 #105 [Verbose] >
00:00:09 #106 [Verbose] > let inline getUnionCaseName<'T> (x: 'T) =
00:00:09 #107 [Verbose] > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:00:09 #108 [Verbose] > | case, _ -> case.Name
00:00:09 #109 [Verbose] >
00:00:09 #110 [Verbose] >
00:00:09 #111 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 #112 [Verbose] > #if !INTERACTIVE
00:00:09 #113 [Verbose] > namespace Polyglot
00:00:09 #114 [Verbose] > #endif
00:00:09 #115 [Verbose] >
00:00:09 #116 [Verbose] > module Crypto =
00:00:09 #117 [Verbose] >
00:00:09 #118 [Verbose] > open Common
00:00:09 #119 [Verbose] >
00:00:09 #120 [Verbose] > /// ## hashText
00:00:09 #121 [Verbose] >
00:00:09 #122 [Verbose] > let hashText (input : string) =
00:00:09 #123 [Verbose] > use sha256 = System.Security.Cryptography.SHA256.Create ()
00:00:09 #124 [Verbose] > input
00:00:09 #125 [Verbose] > |> System.Text.Encoding.UTF8.GetBytes
00:00:09 #126 [Verbose] > |> sha256.ComputeHash
00:00:09 #127 [Verbose] > |> Array.map (fun b -> b.ToString "x2")
00:00:09 #128 [Verbose] > |> String.concat ""
00:00:09 #129 [Verbose] >
00:00:09 #130 [Verbose] >
00:00:09 #131 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:09 #132 [Verbose] > #if !INTERACTIVE
00:00:09 #133 [Verbose] > namespace Polyglot
00:00:09 #134 [Verbose] > #endif
00:00:09 #135 [Verbose] >
00:00:09 #136 [Verbose] > module Async =
00:00:09 #137 [Verbose] >
00:00:09 #138 [Verbose] > open Common
00:00:09 #139 [Verbose] >
00:00:09 #140 [Verbose] > /// ## choice
00:00:09 #141 [Verbose] >
00:00:09 #142 [Verbose] > let inline choice asyncs = async {
00:00:09 #143 [Verbose] > let e = Event<_> ()
00:00:09 #144 [Verbose] > use cts = new System.Threading.CancellationTokenSource ()
00:00:09 #145 [Verbose] > let fn =
00:00:09 #146 [Verbose] > asyncs
00:00:09 #147 [Verbose] > |> Seq.map (fun a -> async {
00:00:09 #148 [Verbose] > let! x = a
00:00:09 #149 [Verbose] > e.Trigger x
00:00:09 #150 [Verbose] > })
00:00:09 #151 [Verbose] > |> Async.Parallel
00:00:09 #152 [Verbose] > |> Async.Ignore
00:00:09 #153 [Verbose] > Async.Start (fn, cts.Token)
00:00:09 #154 [Verbose] > let! result = Async.AwaitEvent e.Publish
00:00:09 #155 [Verbose] > cts.Cancel ()
00:00:09 #156 [Verbose] > return result
00:00:09 #157 [Verbose] > }
00:00:09 #158 [Verbose] >
00:00:09 #159 [Verbose] > /// ## map
00:00:09 #160 [Verbose] >
00:00:09 #161 [Verbose] > let inline map fn a = async {
00:00:09 #162 [Verbose] > let! x = a
00:00:09 #163 [Verbose] > return fn x
00:00:09 #164 [Verbose] > }
00:00:09 #165 [Verbose] >
00:00:09 #166 [Verbose] > /// ## catch
00:00:09 #167 [Verbose] >
00:00:09 #168 [Verbose] > let inline catch a =
00:00:09 #169 [Verbose] > a
00:00:09 #170 [Verbose] > |> Async.Catch
00:00:09 #171 [Verbose] > ...
00:00:10 #172 [Verbose] >
00:00:10 #173 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:10 #174 [Verbose] > #if !INTERACTIVE
00:00:10 #175 [Verbose] > namespace Polyglot
00:00:10 #176 [Verbose] > #endif
00:00:10 #177 [Verbose] >
00:00:10 #178 [Verbose] > module AsyncSeq =
00:00:10 #179 [Verbose] >
00:00:10 #180 [Verbose] > open Common
00:00:10 #181 [Verbose] >
00:00:10 #182 [Verbose] > /// ## subscribeEvent
00:00:10 #183 [Verbose] >
00:00:10 #184 [Verbose] > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:00:10 #185 [Verbose] > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:00:10 #186 [Verbose] > 'A>(event.AddHandler, event.RemoveHandler)
00:00:10 #187 [Verbose] > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:00:10 #188 [Verbose] > event.EventArgs)
00:00:10 #189 [Verbose] > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:00:10 #190 [Verbose] >
00:00:10 #191 [Verbose] > let subscribeToken (token : System.Threading.CancellationToken) =
00:00:10 #192 [Verbose] > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:00:10 #193 [Verbose] > System.Action tcs.SetResult |> token.Register |> ignore
00:00:10 #194 [Verbose] > let start = System.DateTime.Now.Ticks
00:00:10 #195 [Verbose] > FSharp.Control.AsyncSeq.unfoldAsync
00:00:10 #196 [Verbose] > (fun (...
00:00:10 #197 [Verbose] >
00:00:10 #198 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:10 #199 [Verbose] > #if !INTERACTIVE
00:00:10 #200 [Verbose] > namespace Polyglot
00:00:10 #201 [Verbose] > #endif
00:00:10 #202 [Verbose] >
00:00:10 #203 [Verbose] > module Networking =
00:00:10 #204 [Verbose] >
00:00:10 #205 [Verbose] > open Common
00:00:10 #206 [Verbose] >
00:00:10 #207 [Verbose] > /// ## testPortOpen
00:00:10 #208 [Verbose] >
00:00:10 #209 [Verbose] > let inline testPortOpen port = async {
00:00:10 #210 [Verbose] > let! ct = Async.CancellationToken
00:00:10 #211 [Verbose] > use client = new System.Net.Sockets.TcpClient ()
00:00:10 #212 [Verbose] > try
00:00:10 #213 [Verbose] > do! client.ConnectAsync ("127.0.0.1", port, ct) |>
00:00:10 #214 [Verbose] > Async.awaitValueTaskUnit
00:00:10 #215 [Verbose] > return true
00:00:10 #216 [Verbose] > with ex ->
00:00:10 #217 [Verbose] > trace Verbose (fun () -> $"testPortOpen / ex: {ex |>
00:00:10 #218 [Verbose] > printException}") getLocals
00:00:10 #219 [Verbose] > return false
00:00:10 #220 [Verbose] > }
00:00:10 #221 [Verbose] >
00:00:10 #222 [Verbose] > let inline testPortOpenTimeout timeout port = async {
00:00:10 #223 [Verbose] > let! result =
00:00:10 #224 [Verbose] > testPortOpen port
00:00:10 #225 [Verbose] > |> Async.runWithTimeoutAsync timeout
00:00:10 #226 [Verbose] > return
00:00:10 #227 [Verbose] > match result with
00:00:10 #228 [Verbose] > | None -> false
00:00:10 #229 [Verbose] > ...
00:00:11 #230 [Verbose] >
00:00:11 #231 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 #232 [Verbose] > #if !INTERACTIVE
00:00:11 #233 [Verbose] > namespace Polyglot
00:00:11 #234 [Verbose] > #endif
00:00:11 #235 [Verbose] >
00:00:11 #236 [Verbose] > module Runtime =
00:00:11 #237 [Verbose] >
00:00:11 #238 [Verbose] > open Common
00:00:11 #239 [Verbose] >
00:00:11 #240 [Verbose] > /// ## isWindows
00:00:11 #241 [Verbose] >
00:00:11 #242 [Verbose] > let isWindows =
00:00:11 #243 [Verbose] > fun () ->
00:00:11 #244 [Verbose] > System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
00:00:11 #245 [Verbose] > System.Runtime.InteropServices.OSPlatform.Windows
00:00:11 #246 [Verbose] > |> memoize
00:00:11 #247 [Verbose] >
00:00:11 #248 [Verbose] > /// ## getExecutableSuffix
00:00:11 #249 [Verbose] >
00:00:11 #250 [Verbose] > let inline getExecutableSuffix () =
00:00:11 #251 [Verbose] > if isWindows ()
00:00:11 #252 [Verbose] > then ".exe"
00:00:11 #253 [Verbose] > else ""
00:00:11 #254 [Verbose] >
00:00:11 #255 [Verbose] > /// ## splitCommand
00:00:11 #256 [Verbose] >
00:00:11 #257 [Verbose] > type private CommandParseStep =
00:00:11 #258 [Verbose] > | Start
00:00:11 #259 [Verbose] > | Path of quoted: bool
00:00:11 #260 [Verbose] > | Arguments
00:00:11 #261 [Verbose] >
00:00:11 #262 [Verbose] > let splitCommand (command: string) =
00:00:11 #263 [Verbose] > let rec loop (path, args) chars step =
00:00:11 #264 [Verbose] > match chars, step with
00:00:11 #265 [Verbose] > | ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
00:00:11 #266 [Verbose] >
00:00:11 #267 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:11 #268 [Verbose] > #if !INTERACTIVE
00:00:11 #269 [Verbose] > namespace Polyglot
00:00:11 #270 [Verbose] > #endif
00:00:11 #271 [Verbose] >
00:00:11 #272 [Verbose] > module FileSystem =
00:00:11 #273 [Verbose] >
00:00:11 #274 [Verbose] > open Common
00:00:11 #275 [Verbose] >
00:00:11 #276 [Verbose] > /// ## Operators
00:00:11 #277 [Verbose] >
00:00:11 #278 [Verbose] > module Operators =
00:00:11 #279 [Verbose] > let inline (</>) a b =
00:00:11 #280 [Verbose] > System.IO.Path.Combine (a, b)
00:00:11 #281 [Verbose] >
00:00:11 #282 [Verbose] > open Operators
00:00:11 #283 [Verbose] >
00:00:11 #284 [Verbose] > /// ## createTempDirectoryName
00:00:11 #285 [Verbose] >
00:00:11 #286 [Verbose] > let inline createTempDirectoryName () =
00:00:11 #287 [Verbose] > let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:00:11 #288 [Verbose] >
00:00:11 #289 [Verbose] > System.IO.Path.GetTempPath ()
00:00:11 #290 [Verbose] > </> $"!{root}"
00:00:11 #291 [Verbose] > </> string (newGuidFromDateTime System.DateTime.Now)
00:00:11 #292 [Verbose] >
00:00:11 #293 [Verbose] > /// ## createTempDirectory
00:00:11 #294 [Verbose] >
00:00:11 #295 [Verbose] > let inline createTempDirectory () =
00:00:11 #296 [Verbose] > let tempFolder = createTempDirectoryName ()
00:00:11 #297 [Verbose] > let result = System.IO.Directory.CreateDirectory tempFolder
00:00:11 #298 [Verbose] >
00:00:11 #299 [Verbose] > if not result.Exists then
00:00:11 #300 [Verbose] > let ge...
00:00:15 #301 [Verbose] >
00:00:15 #302 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:15 #303 [Verbose] > open Common
00:00:15 #304 [Verbose] > open FileSystem.Operators
00:00:15 #305 [Verbose] >
00:00:15 #306 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:15 #307 [Verbose] > let tmpSpiralPath = Path.GetTempPath () </> "!dotnet-interactive-spiral"
00:00:15 #308 [Verbose] > let linePlotsDataPath = tmpSpiralPath </> "line-plots-data"
00:00:15 #309 [Verbose] > let linePlotsSvgPath = tmpSpiralPath </> "line-plots-svg"
00:00:15 #310 [Verbose] >
00:00:15 #311 [Verbose] > [[ tmpSpiralPath; linePlotsDataPath; linePlotsSvgPath ]]
00:00:15 #312 [Verbose] > |> List.iter (fun dir -> if Directory.Exists dir |> not then
00:00:15 #313 [Verbose] > Directory.CreateDirectory dir |> ignore)
00:00:15 #314 [Verbose] >
00:00:15 #315 [Verbose] > Formatter.Register<struct (string * string * string * struct (string * float
00:00:15 #316 [Verbose] > array * float array) array)> (
00:00:15 #317 [Verbose] > (fun struct (caption, x_desc, y_desc, ys) ->
00:00:15 #318 [Verbose] > let json = (caption, x_desc, y_desc, ys) |> FSharp.Json.Json.serialize
00:00:15 #319 [Verbose] > async {
00:00:15 #320 [Verbose] > let hashHex = json |> Crypto.hashText
00:00:15 #321 [Verbose] > let svgPath = linePlotsSvgPath </> $"{hashHex}.svg"
00:00:15 #322 [Verbose] >
00:00:15 #323 [Verbose] > if System.IO.File.Exi...
00:00:15 #324 [Verbose] >
00:00:15 #325 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:15 #326 [Verbose] > // // test
00:00:15 #327 [Verbose] >
00:00:15 #328 [Verbose] > open testing
00:00:16 #329 [Verbose] >
00:00:16 #330 [Verbose] > ╭─[ 1.36s - stdout ]───────────────────────────────────────────────────────────╮
00:00:16 #331 [Verbose] > │ () │
00:00:16 #332 [Verbose] > │ │
00:00:16 #333 [Verbose] > │ │
00:00:16 #334 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #335 [Verbose] >
00:00:16 #336 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #337 [Verbose] > open listm'_operators
00:00:17 #338 [Verbose] >
00:00:17 #339 [Verbose] > ╭─[ 214.46ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #340 [Verbose] > │ () │
00:00:17 #341 [Verbose] > │ │
00:00:17 #342 [Verbose] > │ │
00:00:17 #343 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #344 [Verbose] >
00:00:17 #345 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #346 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #347 [Verbose] > │ ## init_series │
00:00:17 #348 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #349 [Verbose] >
00:00:17 #350 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #351 [Verbose] > // // test
00:00:17 #352 [Verbose] >
00:00:17 #353 [Verbose] > inl x : a _ f64 = am'.init_series -3 3 0.01
00:00:17 #354 [Verbose] > inl y = x |> am.map math.square
00:00:17 #355 [Verbose] > "square", "x", "y", ;[[ "square", x, y ]]
00:00:17 #356 [Verbose] >
00:00:17 #357 [Verbose] > ╭─[ 326.18ms - return value ]──────────────────────────────────────────────────╮
00:00:17 #358 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:17 #359 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:17 #360 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:17 #361 [Verbose] > │ stroke="none"/> │
00:00:17 #362 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:17 #363 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:17 #364 [Verbose] > │ fill="#FFFFFF"> │
00:00:17 #365 [Verbose] > │ square │
00:00:17 #366 [Verbose] > │ </text> │
00:00:17 #367 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:00:17 #368 [Verbose] > │ y2="75"/> │
00:00:17 #369 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:17 #370 [Verbose] > │ y2="75"/> │
00:00:17 #371 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:00:17 #372 [Verbose] > │ y2="75"/> │
00:00:17 #373 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:00:17 #374 [Verbose] > │ y2="75"/> │
00:00:17 #375 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:00:17 #376 [Verbose] > │ ... │
00:00:17 #377 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #378 [Verbose] >
00:00:17 #379 [Verbose] > ╭─[ 346.51ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #380 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:17 #381 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:17 #382 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:17 #383 [Verbose] > │ let v2 : bool = v1 < 601 │
00:00:17 #384 [Verbose] > │ v2 │
00:00:17 #385 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:17 #386 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:17 #387 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:17 #388 [Verbose] > │ v3 │
00:00:17 #389 [Verbose] > │ and method3 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:17 #390 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:17 #391 [Verbose] > │ v0 │
00:00:17 #392 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:17 #393 [Verbose] > │ []) * (float [])) [])) = │
00:00:17 #394 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (601) │
00:00:17 #395 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:17 #396 [Verbose] > │ while method1(v1) do │
00:00:17 #397 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:17 #398 [Verbose] > │ let v4 : float = float v3 │
00:00:17 #399 [Verbose] > │ let v5 : float = 0.01 * v4 │
00:00:17 #400 [Verbose] > │ let v6 : float = -3.0 + v5 │
00:00:17 #401 [Verbose] > │ v0.[int v3] <- v6 │
00:00:17 #402 [Verbose] > │ let v7 : int32 = v3 + 1 │
00:00:17 #403 [Verbose] > │ v1.l0 <- v7 │
00:00:17 #404 [Verbose] > │ () │
00:00:17 #405 [Verbose] > │ let v8 : int32 = v0.Length │
00:00:17 #406 [Verbose] > │ let v9 : (float []) = Array.zeroCreate<float> (v8) │
00:00:17 #407 [Verbose] > │ let v10 : Mut0 = {l0 = 0} : Mut0 │
00:00:17 #408 [Verbose] > │ while method2(v8, v10) do │
00:00:17 #409 [Verbose] > │ let v12 : int32 = v10.l0 │
00:00:17 #410 [Verbose] > │ let v13 : float = v0.[int v12] │
00:00:17 #411 [Verbose] > │ let v14 : float = v13 ** 2.0 │
00:00:17 #412 [Verbose] > │ v9.[int v12] <- v14 │
00:00:17 #413 [Verbose] > │ let v15 : int32 = v12 + 1 │
00:00:17 #414 [Verbose] > │ v10.l0 <- v15 │
00:00:17 #415 [Verbose] > │ () │
00:00:17 #416 [Verbose] > │ let v16 : string = "square" │
00:00:17 #417 [Verbose] > │ let v17 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:17 #418 [Verbose] > │ (v16, v0, v9)|] │
00:00:17 #419 [Verbose] > │ let v18 : (struct (string * (float []) * (float [])) []) = method3(v17) │
00:00:17 #420 [Verbose] > │ let v19 : string = "x" │
00:00:17 #421 [Verbose] > │ let v20 : string = "y" │
00:00:17 #422 [Verbose] > │ struct (v16, v19, v20, v18) │
00:00:17 #423 [Verbose] > │ method0() │
00:00:17 #424 [Verbose] > │ │
00:00:17 #425 [Verbose] > │ │
00:00:17 #426 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #427 [Verbose] >
00:00:17 #428 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #429 [Verbose] > // // test
00:00:17 #430 [Verbose] >
00:00:17 #431 [Verbose] > inl x : a _ f64 = am'.init_series -10 10 0.1
00:00:17 #432 [Verbose] > inl y_sin = x |> am.map sin
00:00:17 #433 [Verbose] > inl y_cos = x |> am.map cos
00:00:17 #434 [Verbose] > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]]
00:00:17 #435 [Verbose] >
00:00:17 #436 [Verbose] > ╭─[ 333.12ms - return value ]──────────────────────────────────────────────────╮
00:00:17 #437 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:17 #438 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:17 #439 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:17 #440 [Verbose] > │ stroke="none"/> │
00:00:17 #441 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:17 #442 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:17 #443 [Verbose] > │ fill="#FFFFFF"> │
00:00:17 #444 [Verbose] > │ sin cos │
00:00:17 #445 [Verbose] > │ </text> │
00:00:17 #446 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:00:17 #447 [Verbose] > │ y2="75"/> │
00:00:17 #448 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:17 #449 [Verbose] > │ y2="75"/> │
00:00:17 #450 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:00:17 #451 [Verbose] > │ y2="75"/> │
00:00:17 #452 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:00:17 #453 [Verbose] > │ y2="75"/> │
00:00:17 #454 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │
00:00:17 #455 [Verbose] > │ x2="10... │
00:00:17 #456 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #457 [Verbose] >
00:00:17 #458 [Verbose] > ╭─[ 346.25ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #459 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:17 #460 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:17 #461 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:17 #462 [Verbose] > │ let v2 : bool = v1 < 201 │
00:00:17 #463 [Verbose] > │ v2 │
00:00:17 #464 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:17 #465 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:17 #466 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:17 #467 [Verbose] > │ v3 │
00:00:17 #468 [Verbose] > │ and method3 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:17 #469 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:17 #470 [Verbose] > │ v0 │
00:00:17 #471 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:17 #472 [Verbose] > │ []) * (float [])) [])) = │
00:00:17 #473 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (201) │
00:00:17 #474 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:17 #475 [Verbose] > │ while method1(v1) do │
00:00:17 #476 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:17 #477 [Verbose] > │ let v4 : float = float v3 │
00:00:17 #478 [Verbose] > │ let v5 : float = 0.1 * v4 │
00:00:17 #479 [Verbose] > │ let v6 : float = -10.0 + v5 │
00:00:17 #480 [Verbose] > │ v0.[int v3] <- v6 │
00:00:17 #481 [Verbose] > │ let v7 : int32 = v3 + 1 │
00:00:17 #482 [Verbose] > │ v1.l0 <- v7 │
00:00:17 #483 [Verbose] > │ () │
00:00:17 #484 [Verbose] > │ let v8 : int32 = v0.Length │
00:00:17 #485 [Verbose] > │ let v9 : (float []) = Array.zeroCreate<float> (v8) │
00:00:17 #486 [Verbose] > │ let v10 : Mut0 = {l0 = 0} : Mut0 │
00:00:17 #487 [Verbose] > │ while method2(v8, v10) do │
00:00:17 #488 [Verbose] > │ let v12 : int32 = v10.l0 │
00:00:17 #489 [Verbose] > │ let v13 : float = v0.[int v12] │
00:00:17 #490 [Verbose] > │ let v14 : float = sin v13 │
00:00:17 #491 [Verbose] > │ v9.[int v12] <- v14 │
00:00:17 #492 [Verbose] > │ let v15 : int32 = v12 + 1 │
00:00:17 #493 [Verbose] > │ v10.l0 <- v15 │
00:00:17 #494 [Verbose] > │ () │
00:00:17 #495 [Verbose] > │ let v16 : (float []) = Array.zeroCreate<float> (v8) │
00:00:17 #496 [Verbose] > │ let v17 : Mut0 = {l0 = 0} : Mut0 │
00:00:17 #497 [Verbose] > │ while method2(v8, v17) do │
00:00:17 #498 [Verbose] > │ let v19 : int32 = v17.l0 │
00:00:17 #499 [Verbose] > │ let v20 : float = v0.[int v19] │
00:00:17 #500 [Verbose] > │ let v21 : float = cos v20 │
00:00:17 #501 [Verbose] > │ v16.[int v19] <- v21 │
00:00:17 #502 [Verbose] > │ let v22 : int32 = v19 + 1 │
00:00:17 #503 [Verbose] > │ v17.l0 <- v22 │
00:00:17 #504 [Verbose] > │ () │
00:00:17 #505 [Verbose] > │ let v23 : string = "sin" │
00:00:17 #506 [Verbose] > │ let v24 : string = "cos" │
00:00:17 #507 [Verbose] > │ let v25 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:17 #508 [Verbose] > │ (v23, v0, v9); struct (v24, v0, v16)|] │
00:00:17 #509 [Verbose] > │ let v26 : (struct (string * (float []) * (float [])) []) = method3(v25) │
00:00:17 #510 [Verbose] > │ let v27 : string = "sin cos" │
00:00:17 #511 [Verbose] > │ let v28 : string = "x" │
00:00:17 #512 [Verbose] > │ let v29 : string = "y" │
00:00:17 #513 [Verbose] > │ struct (v27, v28, v29, v26) │
00:00:17 #514 [Verbose] > │ method0() │
00:00:17 #515 [Verbose] > │ │
00:00:17 #516 [Verbose] > │ │
00:00:17 #517 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #518 [Verbose] >
00:00:17 #519 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #520 [Verbose] > // // test
00:00:17 #521 [Verbose] >
00:00:17 #522 [Verbose] > inl y_pos y0 vy0 ay t =
00:00:17 #523 [Verbose] > y0 + vy0 * t + ay * (t |> math.square) / 2
00:00:17 #524 [Verbose] >
00:00:17 #525 [Verbose] > inl x : a _ f64 = am'.init_series 0 5 0.01
00:00:17 #526 [Verbose] > inl y = x |> am.map (y_pos 0 20 -9.8)
00:00:17 #527 [Verbose] > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]]
00:00:18 #528 [Verbose] >
00:00:18 #529 [Verbose] > ╭─[ 324.92ms - return value ]──────────────────────────────────────────────────╮
00:00:18 #530 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:18 #531 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:18 #532 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:18 #533 [Verbose] > │ stroke="none"/> │
00:00:18 #534 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:18 #535 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:18 #536 [Verbose] > │ fill="#FFFFFF"> │
00:00:18 #537 [Verbose] > │ projectile motion │
00:00:18 #538 [Verbose] > │ </text> │
00:00:18 #539 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:18 #540 [Verbose] > │ y2="75"/> │
00:00:18 #541 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:18 #542 [Verbose] > │ y2="75"/> │
00:00:18 #543 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:18 #544 [Verbose] > │ y2="75"/> │
00:00:18 #545 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:18 #546 [Verbose] > │ y2="75"/> │
00:00:18 #547 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="42... │
00:00:18 #548 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #549 [Verbose] >
00:00:18 #550 [Verbose] > ╭─[ 340.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #551 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:18 #552 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:18 #553 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:18 #554 [Verbose] > │ let v2 : bool = v1 < 501 │
00:00:18 #555 [Verbose] > │ v2 │
00:00:18 #556 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:18 #557 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:18 #558 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:18 #559 [Verbose] > │ v3 │
00:00:18 #560 [Verbose] > │ and method3 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:18 #561 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:18 #562 [Verbose] > │ v0 │
00:00:18 #563 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:18 #564 [Verbose] > │ []) * (float [])) [])) = │
00:00:18 #565 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (501) │
00:00:18 #566 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:18 #567 [Verbose] > │ while method1(v1) do │
00:00:18 #568 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:18 #569 [Verbose] > │ let v4 : float = float v3 │
00:00:18 #570 [Verbose] > │ let v5 : float = 0.01 * v4 │
00:00:18 #571 [Verbose] > │ v0.[int v3] <- v5 │
00:00:18 #572 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:18 #573 [Verbose] > │ v1.l0 <- v6 │
00:00:18 #574 [Verbose] > │ () │
00:00:18 #575 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:18 #576 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:18 #577 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:18 #578 [Verbose] > │ while method2(v7, v9) do │
00:00:18 #579 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:18 #580 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:18 #581 [Verbose] > │ let v13 : float = 20.0 * v12 │
00:00:18 #582 [Verbose] > │ let v14 : float = v12 ** 2.0 │
00:00:18 #583 [Verbose] > │ let v15 : float = -9.8 * v14 │
00:00:18 #584 [Verbose] > │ let v16 : float = v15 / 2.0 │
00:00:18 #585 [Verbose] > │ let v17 : float = v13 + v16 │
00:00:18 #586 [Verbose] > │ v8.[int v11] <- v17 │
00:00:18 #587 [Verbose] > │ let v18 : int32 = v11 + 1 │
00:00:18 #588 [Verbose] > │ v9.l0 <- v18 │
00:00:18 #589 [Verbose] > │ () │
00:00:18 #590 [Verbose] > │ let v19 : string = "height of projectile (m)" │
00:00:18 #591 [Verbose] > │ let v20 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:18 #592 [Verbose] > │ (v19, v0, v8)|] │
00:00:18 #593 [Verbose] > │ let v21 : (struct (string * (float []) * (float [])) []) = method3(v20) │
00:00:18 #594 [Verbose] > │ let v22 : string = "projectile motion" │
00:00:18 #595 [Verbose] > │ let v23 : string = "time (s)" │
00:00:18 #596 [Verbose] > │ let v24 : string = "" │
00:00:18 #597 [Verbose] > │ struct (v22, v23, v24, v21) │
00:00:18 #598 [Verbose] > │ method0() │
00:00:18 #599 [Verbose] > │ │
00:00:18 #600 [Verbose] > │ │
00:00:18 #601 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #602 [Verbose] >
00:00:18 #603 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:18 #604 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:18 #605 [Verbose] > │ ## velocity_cf │
00:00:18 #606 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #607 [Verbose] >
00:00:18 #608 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #609 [Verbose] > type mass = f64
00:00:18 #610 [Verbose] > type time = f64
00:00:18 #611 [Verbose] > type position = f64
00:00:18 #612 [Verbose] > type velocity = f64
00:00:18 #613 [Verbose] > type force = f64
00:00:18 #614 [Verbose] >
00:00:18 #615 [Verbose] > type velocity_cf = mass -> velocity -> list force -> (time -> velocity)
00:00:18 #616 [Verbose] >
00:00:18 #617 [Verbose] > inl velocity_cf m v0 fs =
00:00:18 #618 [Verbose] > inl f_net = fs |> listm'.sum
00:00:18 #619 [Verbose] > inl a0 = f_net / m
00:00:18 #620 [Verbose] > inl v t = v0 + a0 * t
00:00:18 #621 [Verbose] > v
00:00:18 #622 [Verbose] >
00:00:18 #623 [Verbose] > ╭─[ 332.80ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #624 [Verbose] > │ () │
00:00:18 #625 [Verbose] > │ │
00:00:18 #626 [Verbose] > │ │
00:00:18 #627 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #628 [Verbose] >
00:00:18 #629 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #630 [Verbose] > // // test
00:00:18 #631 [Verbose] >
00:00:18 #632 [Verbose] > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0
00:00:18 #633 [Verbose] > |> _assert_eq 0.6
00:00:18 #634 [Verbose] >
00:00:18 #635 [Verbose] > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1
00:00:18 #636 [Verbose] > |> _assert_eq 0.2
00:00:18 #637 [Verbose] >
00:00:18 #638 [Verbose] > ╭─[ 344.81ms - stdout ]────────────────────────────────────────────────────────╮
00:00:18 #639 [Verbose] > │ let rec method1 () : bool = │
00:00:18 #640 [Verbose] > │ true │
00:00:18 #641 [Verbose] > │ and method0 () : unit = │
00:00:18 #642 [Verbose] > │ let v0 : bool = method1() │
00:00:18 #643 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.6} / expected: %A{0.6}" │
00:00:18 #644 [Verbose] > │ let v2 : bool = v0 = false │
00:00:18 #645 [Verbose] > │ if v2 then │
00:00:18 #646 [Verbose] > │ failwith<unit> v1 │
00:00:18 #647 [Verbose] > │ let v3 : bool = method1() │
00:00:18 #648 [Verbose] > │ let v4 : string = $"__expect / actual: %A{0.2} / expected: %A{0.2}" │
00:00:18 #649 [Verbose] > │ let v5 : bool = v3 = false │
00:00:18 #650 [Verbose] > │ if v5 then │
00:00:18 #651 [Verbose] > │ failwith<unit> v4 │
00:00:18 #652 [Verbose] > │ method0() │
00:00:18 #653 [Verbose] > │ │
00:00:18 #654 [Verbose] > │ │
00:00:18 #655 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:18 #656 [Verbose] >
00:00:18 #657 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:18 #658 [Verbose] > // // test
00:00:18 #659 [Verbose] >
00:00:18 #660 [Verbose] > inl x = am'.init_series 0 4 0.1
00:00:18 #661 [Verbose] > inl y = x |> am.map (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]])
00:00:18 #662 [Verbose] > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]]
00:00:19 #663 [Verbose] >
00:00:19 #664 [Verbose] > ╭─[ 674.18ms - return value ]──────────────────────────────────────────────────╮
00:00:19 #665 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:19 #666 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:19 #667 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:19 #668 [Verbose] > │ stroke="none"/> │
00:00:19 #669 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:19 #670 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:19 #671 [Verbose] > │ fill="#FFFFFF"> │
00:00:19 #672 [Verbose] > │ car on an air track │
00:00:19 #673 [Verbose] > │ </text> │
00:00:19 #674 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:00:19 #675 [Verbose] > │ y2="75"/> │
00:00:19 #676 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:19 #677 [Verbose] > │ y2="75"/> │
00:00:19 #678 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:00:19 #679 [Verbose] > │ y2="75"/> │
00:00:19 #680 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:00:19 #681 [Verbose] > │ y2="75"/> │
00:00:19 #682 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1=... │
00:00:19 #683 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #684 [Verbose] >
00:00:19 #685 [Verbose] > ╭─[ 720.56ms - stdout ]────────────────────────────────────────────────────────╮
00:00:19 #686 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:19 #687 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:19 #688 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:19 #689 [Verbose] > │ let v2 : bool = v1 < 41 │
00:00:19 #690 [Verbose] > │ v2 │
00:00:19 #691 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:19 #692 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:19 #693 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:19 #694 [Verbose] > │ v3 │
00:00:19 #695 [Verbose] > │ and method3 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:19 #696 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:19 #697 [Verbose] > │ v0 │
00:00:19 #698 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:19 #699 [Verbose] > │ []) * (float [])) [])) = │
00:00:19 #700 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (41) │
00:00:19 #701 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:19 #702 [Verbose] > │ while method1(v1) do │
00:00:19 #703 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:19 #704 [Verbose] > │ let v4 : float = float v3 │
00:00:19 #705 [Verbose] > │ let v5 : float = 0.1 * v4 │
00:00:19 #706 [Verbose] > │ v0.[int v3] <- v5 │
00:00:19 #707 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:19 #708 [Verbose] > │ v1.l0 <- v6 │
00:00:19 #709 [Verbose] > │ () │
00:00:19 #710 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:19 #711 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:19 #712 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:19 #713 [Verbose] > │ while method2(v7, v9) do │
00:00:19 #714 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:19 #715 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:19 #716 [Verbose] > │ let v13 : float = -0.39999999999999997 * v12 │
00:00:19 #717 [Verbose] > │ let v14 : float = 0.6 + v13 │
00:00:19 #718 [Verbose] > │ v8.[int v11] <- v14 │
00:00:19 #719 [Verbose] > │ let v15 : int32 = v11 + 1 │
00:00:19 #720 [Verbose] > │ v9.l0 <- v15 │
00:00:19 #721 [Verbose] > │ () │
00:00:19 #722 [Verbose] > │ let v16 : string = "velocity of car (m/s)" │
00:00:19 #723 [Verbose] > │ let v17 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:19 #724 [Verbose] > │ (v16, v0, v8)|] │
00:00:19 #725 [Verbose] > │ let v18 : (struct (string * (float []) * (float [])) []) = method3(v17) │
00:00:19 #726 [Verbose] > │ let v19 : string = "car on an air track" │
00:00:19 #727 [Verbose] > │ let v20 : string = "time (s)" │
00:00:19 #728 [Verbose] > │ let v21 : string = "" │
00:00:19 #729 [Verbose] > │ struct (v19, v20, v21, v18) │
00:00:19 #730 [Verbose] > │ method0() │
00:00:19 #731 [Verbose] > │ │
00:00:19 #732 [Verbose] > │ │
00:00:19 #733 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #734 [Verbose] >
00:00:19 #735 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:19 #736 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:19 #737 [Verbose] > │ ## derivative │
00:00:19 #738 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:19 #739 [Verbose] >
00:00:19 #740 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:19 #741 [Verbose] > type derivative = (f64 -> f64) -> f64 -> f64
00:00:19 #742 [Verbose] >
00:00:19 #743 [Verbose] > inl derivative dt : derivative =
00:00:19 #744 [Verbose] > fun x t =>
00:00:19 #745 [Verbose] > (x (t + dt / 2) - x (t - dt / 2)) / dt
00:00:20 #746 [Verbose] >
00:00:20 #747 [Verbose] > ╭─[ 264.88ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #748 [Verbose] > │ () │
00:00:20 #749 [Verbose] > │ │
00:00:20 #750 [Verbose] > │ │
00:00:20 #751 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #752 [Verbose] >
00:00:20 #753 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #754 [Verbose] > // // test
00:00:20 #755 [Verbose] >
00:00:20 #756 [Verbose] > derivative 1 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #757 [Verbose] > |> _assert_approx_eq None 0.25
00:00:20 #758 [Verbose] >
00:00:20 #759 [Verbose] > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #760 [Verbose] > |> _assert_approx_eq None 0.0000002499998827953931
00:00:20 #761 [Verbose] >
00:00:20 #762 [Verbose] > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #763 [Verbose] > |> _assert_approx_eq None 0.000000000001000088900582341
00:00:20 #764 [Verbose] >
00:00:20 #765 [Verbose] > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #766 [Verbose] > |> _assert_approx_eq None 0.00000008274037099909037
00:00:20 #767 [Verbose] >
00:00:20 #768 [Verbose] > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #769 [Verbose] > |> _assert_approx_eq None 0.00008890058234101161
00:00:20 #770 [Verbose] >
00:00:20 #771 [Verbose] > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #772 [Verbose] > |> _assert_approx_eq None -0.0007992778373592246
00:00:20 #773 [Verbose] >
00:00:20 #774 [Verbose] > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:00:20 #775 [Verbose] > |> _assert_approx_eq None -1
00:00:20 #776 [Verbose] >
00:00:20 #777 [Verbose] > ╭─[ 252.62ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #778 [Verbose] > │ let rec method1 () : bool = │
00:00:20 #779 [Verbose] > │ true │
00:00:20 #780 [Verbose] > │ and method0 () : unit = │
00:00:20 #781 [Verbose] > │ let v0 : bool = method1() │
00:00:20 #782 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.25} / expected: %A{0.25}" │
00:00:20 #783 [Verbose] > │ let v2 : bool = v0 = false │
00:00:20 #784 [Verbose] > │ if v2 then │
00:00:20 #785 [Verbose] > │ failwith<unit> v1 │
00:00:20 #786 [Verbose] > │ let v3 : bool = method1() │
00:00:20 #787 [Verbose] > │ let v4 : string = $"__expect / actual: %A{2.499998827953931E-07} / │
00:00:20 #788 [Verbose] > │ expected: %A{2.499998827953931E-07}" │
00:00:20 #789 [Verbose] > │ let v5 : bool = v3 = false │
00:00:20 #790 [Verbose] > │ if v5 then │
00:00:20 #791 [Verbose] > │ failwith<unit> v4 │
00:00:20 #792 [Verbose] > │ let v6 : bool = method1() │
00:00:20 #793 [Verbose] > │ let v7 : string = $"__expect / actual: %A{1.000088900582341E-12} / │
00:00:20 #794 [Verbose] > │ expected: %A{1.000088900582341E-12}" │
00:00:20 #795 [Verbose] > │ let v8 : bool = v6 = false │
00:00:20 #796 [Verbose] > │ if v8 then │
00:00:20 #797 [Verbose] > │ failwith<unit> v7 │
00:00:20 #798 [Verbose] > │ let v9 : bool = method1() │
00:00:20 #799 [Verbose] > │ let v10 : string = $"__expect / actual: %A{8.274037099909037E-08} / │
00:00:20 #800 [Verbose] > │ expected: %A{8.274037099909037E-08}" │
00:00:20 #801 [Verbose] > │ let v11 : bool = v9 = false │
00:00:20 #802 [Verbose] > │ if v11 then │
00:00:20 #803 [Verbose] > │ failwith<unit> v10 │
00:00:20 #804 [Verbose] > │ let v12 : bool = method1() │
00:00:20 #805 [Verbose] > │ let v13 : string = $"__expect / actual: %A{8.890058234101161E-05} / │
00:00:20 #806 [Verbose] > │ expected: %A{8.890058234101161E-05}" │
00:00:20 #807 [Verbose] > │ let v14 : bool = v12 = false │
00:00:20 #808 [Verbose] > │ if v14 then │
00:00:20 #809 [Verbose] > │ failwith<unit> v13 │
00:00:20 #810 [Verbose] > │ let v15 : bool = method1() │
00:00:20 #811 [Verbose] > │ let v16 : string = $"__expect / actual: %A{-0.0007992778373592246} / │
00:00:20 #812 [Verbose] > │ expected: %A{-0.0007992778373592246}" │
00:00:20 #813 [Verbose] > │ let v17 : bool = v15 = false │
00:00:20 #814 [Verbose] > │ if v17 then │
00:00:20 #815 [Verbose] > │ failwith<unit> v16 │
00:00:20 #816 [Verbose] > │ let v18 : bool = method1() │
00:00:20 #817 [Verbose] > │ let v19 : string = $"__expect / actual: %A{-1.0} / expected: %A{-1.0}" │
00:00:20 #818 [Verbose] > │ let v20 : bool = v18 = false │
00:00:20 #819 [Verbose] > │ if v20 then │
00:00:20 #820 [Verbose] > │ failwith<unit> v19 │
00:00:20 #821 [Verbose] > │ method0() │
00:00:20 #822 [Verbose] > │ │
00:00:20 #823 [Verbose] > │ │
00:00:20 #824 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #825 [Verbose] >
00:00:20 #826 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 #827 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 #828 [Verbose] > │ ## integration │
00:00:20 #829 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #830 [Verbose] >
00:00:20 #831 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #832 [Verbose] > type integration = (f64 -> f64) -> f64 -> f64 -> f64
00:00:20 #833 [Verbose] >
00:00:20 #834 [Verbose] > inl integral dt : integration =
00:00:20 #835 [Verbose] > fun f a b =>
00:00:20 #836 [Verbose] > inl rec loop t y =
00:00:20 #837 [Verbose] > if t < b
00:00:20 #838 [Verbose] > then loop (t + dt) (y + f t * dt)
00:00:20 #839 [Verbose] > else t, y
00:00:20 #840 [Verbose] > loop (a + dt / 2) 0
00:00:20 #841 [Verbose] > |> snd
00:00:20 #842 [Verbose] >
00:00:20 #843 [Verbose] > ╭─[ 227.84ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #844 [Verbose] > │ () │
00:00:20 #845 [Verbose] > │ │
00:00:20 #846 [Verbose] > │ │
00:00:20 #847 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #848 [Verbose] >
00:00:20 #849 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #850 [Verbose] > // // test
00:00:20 #851 [Verbose] >
00:00:20 #852 [Verbose] > integral 0.01 math.square 0 1
00:00:20 #853 [Verbose] > |> _assert_approx_eq None 0.33332500000000004
00:00:20 #854 [Verbose] >
00:00:20 #855 [Verbose] > ╭─[ 234.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 #856 [Verbose] > │ let rec method1 () : bool = │
00:00:20 #857 [Verbose] > │ true │
00:00:20 #858 [Verbose] > │ and method0 () : unit = │
00:00:20 #859 [Verbose] > │ let v0 : bool = method1() │
00:00:20 #860 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.3333250000000004} / │
00:00:20 #861 [Verbose] > │ expected: %A{0.33332500000000004}" │
00:00:20 #862 [Verbose] > │ let v2 : bool = v0 = false │
00:00:20 #863 [Verbose] > │ if v2 then │
00:00:20 #864 [Verbose] > │ failwith<unit> v1 │
00:00:20 #865 [Verbose] > │ method0() │
00:00:20 #866 [Verbose] > │ │
00:00:20 #867 [Verbose] > │ │
00:00:20 #868 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 #869 [Verbose] >
00:00:20 #870 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:20 #871 [Verbose] > inl integral' dt : integration =
00:00:20 #872 [Verbose] > fun f a b =>
00:00:20 #873 [Verbose] > listm'.init_series (a + dt / 2) (b - dt / 2) dt
00:00:20 #874 [Verbose] > |> listm.map (f >> (*) dt)
00:00:20 #875 [Verbose] > |> listm'.sum
00:00:21 #876 [Verbose] >
00:00:21 #877 [Verbose] > ╭─[ 252.15ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 #878 [Verbose] > │ () │
00:00:21 #879 [Verbose] > │ │
00:00:21 #880 [Verbose] > │ │
00:00:21 #881 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #882 [Verbose] >
00:00:21 #883 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 #884 [Verbose] > // // test
00:00:21 #885 [Verbose] >
00:00:21 #886 [Verbose] > integral' 0.1 math.square 0 1
00:00:21 #887 [Verbose] > |> _assert_approx_eq None (integral 0.1 math.square 0 1)
00:00:21 #888 [Verbose] >
00:00:21 #889 [Verbose] > ╭─[ 221.35ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 #890 [Verbose] > │ let rec method1 () : bool = │
00:00:21 #891 [Verbose] > │ true │
00:00:21 #892 [Verbose] > │ and method0 () : unit = │
00:00:21 #893 [Verbose] > │ let v0 : bool = method1() │
00:00:21 #894 [Verbose] > │ let v1 : string = $"__expect / actual: %A{0.3325000000000001} / │
00:00:21 #895 [Verbose] > │ expected: %A{0.33249999999999996}" │
00:00:21 #896 [Verbose] > │ let v2 : bool = v0 = false │
00:00:21 #897 [Verbose] > │ if v2 then │
00:00:21 #898 [Verbose] > │ failwith<unit> v1 │
00:00:21 #899 [Verbose] > │ method0() │
00:00:21 #900 [Verbose] > │ │
00:00:21 #901 [Verbose] > │ │
00:00:21 #902 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #903 [Verbose] >
00:00:21 #904 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 #905 [Verbose] > inl integral'' dt : integration =
00:00:21 #906 [Verbose] > fun f a b =>
00:00:21 #907 [Verbose] > am'.init_series (a + dt / 2) (b - dt / 2) dt
00:00:21 #908 [Verbose] > |> am.map (f >> (*) dt)
00:00:21 #909 [Verbose] > |> am'.sum
00:00:21 #910 [Verbose] >
00:00:21 #911 [Verbose] > ╭─[ 209.58ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 #912 [Verbose] > │ () │
00:00:21 #913 [Verbose] > │ │
00:00:21 #914 [Verbose] > │ │
00:00:21 #915 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #916 [Verbose] >
00:00:21 #917 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 #918 [Verbose] > // // test
00:00:21 #919 [Verbose] >
00:00:21 #920 [Verbose] > integral'' 0.01 math.square 0 1
00:00:21 #921 [Verbose] > |> _assert_approx_eq None (integral 0.01 math.square 0 1)
00:00:21 #922 [Verbose] >
00:00:21 #923 [Verbose] > ╭─[ 337.27ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 #924 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:21 #925 [Verbose] > │ and Mut1 = {mutable l0 : int32; mutable l1 : float} │
00:00:21 #926 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:21 #927 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:21 #928 [Verbose] > │ let v2 : bool = v1 < 100 │
00:00:21 #929 [Verbose] > │ v2 │
00:00:21 #930 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:21 #931 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:21 #932 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:21 #933 [Verbose] > │ v3 │
00:00:21 #934 [Verbose] > │ and method3 (v0 : int32, v1 : Mut1) : bool = │
00:00:21 #935 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:21 #936 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:21 #937 [Verbose] > │ v3 │
00:00:21 #938 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:21 #939 [Verbose] > │ v0 │
00:00:21 #940 [Verbose] > │ and method0 () : unit = │
00:00:21 #941 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (100) │
00:00:21 #942 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:21 #943 [Verbose] > │ while method1(v1) do │
00:00:21 #944 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:21 #945 [Verbose] > │ let v4 : float = float v3 │
00:00:21 #946 [Verbose] > │ let v5 : float = 0.01 * v4 │
00:00:21 #947 [Verbose] > │ let v6 : float = 0.005 + v5 │
00:00:21 #948 [Verbose] > │ v0.[int v3] <- v6 │
00:00:21 #949 [Verbose] > │ let v7 : int32 = v3 + 1 │
00:00:21 #950 [Verbose] > │ v1.l0 <- v7 │
00:00:21 #951 [Verbose] > │ () │
00:00:21 #952 [Verbose] > │ let v8 : int32 = v0.Length │
00:00:21 #953 [Verbose] > │ let v9 : (float []) = Array.zeroCreate<float> (v8) │
00:00:21 #954 [Verbose] > │ let v10 : Mut0 = {l0 = 0} : Mut0 │
00:00:21 #955 [Verbose] > │ while method2(v8, v10) do │
00:00:21 #956 [Verbose] > │ let v12 : int32 = v10.l0 │
00:00:21 #957 [Verbose] > │ let v13 : float = v0.[int v12] │
00:00:21 #958 [Verbose] > │ let v14 : float = v13 ** 2.0 │
00:00:21 #959 [Verbose] > │ let v15 : float = 0.01 * v14 │
00:00:21 #960 [Verbose] > │ v9.[int v12] <- v15 │
00:00:21 #961 [Verbose] > │ let v16 : int32 = v12 + 1 │
00:00:21 #962 [Verbose] > │ v10.l0 <- v16 │
00:00:21 #963 [Verbose] > │ () │
00:00:21 #964 [Verbose] > │ let v17 : int32 = v9.Length │
00:00:21 #965 [Verbose] > │ let v18 : Mut1 = {l0 = 0; l1 = 0.0} : Mut1 │
00:00:21 #966 [Verbose] > │ while method3(v17, v18) do │
00:00:21 #967 [Verbose] > │ let v20 : int32 = v18.l0 │
00:00:21 #968 [Verbose] > │ let v21 : float = v18.l1 │
00:00:21 #969 [Verbose] > │ let v22 : float = v9.[int v20] │
00:00:21 #970 [Verbose] > │ let v23 : float = v21 + v22 │
00:00:21 #971 [Verbose] > │ let v24 : int32 = v20 + 1 │
00:00:21 #972 [Verbose] > │ v18.l0 <- v24 │
00:00:21 #973 [Verbose] > │ v18.l1 <- v23 │
00:00:21 #974 [Verbose] > │ () │
00:00:21 #975 [Verbose] > │ let v25 : float = v18.l1 │
00:00:21 #976 [Verbose] > │ let v26 : float = 0.3333250000000004 - v25 │
00:00:21 #977 [Verbose] > │ let v27 : float = -v26 │
00:00:21 #978 [Verbose] > │ let v28 : bool = v26 >= v27 │
00:00:21 #979 [Verbose] > │ let v29 : float = │
00:00:21 #980 [Verbose] > │ if v28 then │
00:00:21 #981 [Verbose] > │ v26 │
00:00:21 #982 [Verbose] > │ else │
00:00:21 #983 [Verbose] > │ v27 │
00:00:21 #984 [Verbose] > │ let v30 : bool = v29 < 1E-08 │
00:00:21 #985 [Verbose] > │ let v31 : bool = method4(v30) │
00:00:21 #986 [Verbose] > │ let v32 : string = $"__expect / actual: %A{v25} / expected: │
00:00:21 #987 [Verbose] > │ %A{0.3333250000000004}" │
00:00:21 #988 [Verbose] > │ let v33 : bool = v31 = false │
00:00:21 #989 [Verbose] > │ if v33 then │
00:00:21 #990 [Verbose] > │ failwith<unit> v32 │
00:00:21 #991 [Verbose] > │ method0() │
00:00:21 #992 [Verbose] > │ │
00:00:21 #993 [Verbose] > │ │
00:00:21 #994 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #995 [Verbose] >
00:00:21 #996 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 #997 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 #998 [Verbose] > │ ## anti_derivative │
00:00:21 #999 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 #1000 [Verbose] >
00:00:21 #1001 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:21 #1002 [Verbose] > inl anti_derivative dt v0 a t =
00:00:21 #1003 [Verbose] > v0 + integral' dt a 0 t
00:00:22 #1004 [Verbose] >
00:00:22 #1005 [Verbose] > ╭─[ 197.40ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 #1006 [Verbose] > │ () │
00:00:22 #1007 [Verbose] > │ │
00:00:22 #1008 [Verbose] > │ │
00:00:22 #1009 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1010 [Verbose] >
00:00:22 #1011 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 #1012 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 #1013 [Verbose] > │ ## velocity_ft │
00:00:22 #1014 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1015 [Verbose] >
00:00:22 #1016 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 #1017 [Verbose] > type velocity_ft = mass -> velocity -> list (time -> force) -> (time ->
00:00:22 #1018 [Verbose] > velocity)
00:00:22 #1019 [Verbose] >
00:00:22 #1020 [Verbose] > inl velocity_ft dt : velocity_ft =
00:00:22 #1021 [Verbose] > fun m v0 fs =>
00:00:22 #1022 [Verbose] > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum
00:00:22 #1023 [Verbose] > inl a t = f_net t / m
00:00:22 #1024 [Verbose] > anti_derivative dt v0 a
00:00:22 #1025 [Verbose] >
00:00:22 #1026 [Verbose] > ╭─[ 183.01ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 #1027 [Verbose] > │ () │
00:00:22 #1028 [Verbose] > │ │
00:00:22 #1029 [Verbose] > │ │
00:00:22 #1030 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1031 [Verbose] >
00:00:22 #1032 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:22 #1033 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:22 #1034 [Verbose] > │ ## position_ft │
00:00:22 #1035 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1036 [Verbose] >
00:00:22 #1037 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 #1038 [Verbose] > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time
00:00:22 #1039 [Verbose] > -> position)
00:00:22 #1040 [Verbose] >
00:00:22 #1041 [Verbose] > inl position_ft dt : position_ft =
00:00:22 #1042 [Verbose] > fun m x0 v0 fs =>
00:00:22 #1043 [Verbose] > velocity_ft dt m v0 fs
00:00:22 #1044 [Verbose] > |> anti_derivative dt x0
00:00:22 #1045 [Verbose] >
00:00:22 #1046 [Verbose] > ╭─[ 228.28ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 #1047 [Verbose] > │ () │
00:00:22 #1048 [Verbose] > │ │
00:00:22 #1049 [Verbose] > │ │
00:00:22 #1050 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1051 [Verbose] >
00:00:22 #1052 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 #1053 [Verbose] > // // test
00:00:22 #1054 [Verbose] >
00:00:22 #1055 [Verbose] > inl pedal_coast (t : time) : force =
00:00:22 #1056 [Verbose] > inl t_cycle = 20
00:00:22 #1057 [Verbose] > inl n_complete : i32 = t / t_cycle |> conv
00:00:22 #1058 [Verbose] > inl remainder = t - conv n_complete * t_cycle
00:00:22 #1059 [Verbose] > if remainder > 0 && remainder < 10
00:00:22 #1060 [Verbose] > then 10
00:00:22 #1061 [Verbose] > else 0
00:00:22 #1062 [Verbose] >
00:00:22 #1063 [Verbose] > inl x = am'.init_series -5 45 0.1
00:00:22 #1064 [Verbose] > inl y = x |> am.map pedal_coast
00:00:22 #1065 [Verbose] > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]]
00:00:22 #1066 [Verbose] >
00:00:22 #1067 [Verbose] > ╭─[ 367.85ms - return value ]──────────────────────────────────────────────────╮
00:00:22 #1068 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:22 #1069 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:22 #1070 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:22 #1071 [Verbose] > │ stroke="none"/> │
00:00:22 #1072 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:22 #1073 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:22 #1074 [Verbose] > │ fill="#FFFFFF"> │
00:00:22 #1075 [Verbose] > │ child pedaling then coasting │
00:00:22 #1076 [Verbose] > │ </text> │
00:00:22 #1077 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:22 #1078 [Verbose] > │ y2="75"/> │
00:00:22 #1079 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:22 #1080 [Verbose] > │ y2="75"/> │
00:00:22 #1081 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:22 #1082 [Verbose] > │ y2="75"/> │
00:00:22 #1083 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:22 #1084 [Verbose] > │ y2="75"/> │
00:00:22 #1085 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1=... │
00:00:22 #1086 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1087 [Verbose] >
00:00:22 #1088 [Verbose] > ╭─[ 387.72ms - stdout ]────────────────────────────────────────────────────────╮
00:00:22 #1089 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:22 #1090 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:22 #1091 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:22 #1092 [Verbose] > │ let v2 : bool = v1 < 501 │
00:00:22 #1093 [Verbose] > │ v2 │
00:00:22 #1094 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:22 #1095 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:22 #1096 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:22 #1097 [Verbose] > │ v3 │
00:00:22 #1098 [Verbose] > │ and method3 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:22 #1099 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:22 #1100 [Verbose] > │ v0 │
00:00:22 #1101 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:22 #1102 [Verbose] > │ []) * (float [])) [])) = │
00:00:22 #1103 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (501) │
00:00:22 #1104 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:22 #1105 [Verbose] > │ while method1(v1) do │
00:00:22 #1106 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:22 #1107 [Verbose] > │ let v4 : float = float v3 │
00:00:22 #1108 [Verbose] > │ let v5 : float = 0.1 * v4 │
00:00:22 #1109 [Verbose] > │ let v6 : float = -5.0 + v5 │
00:00:22 #1110 [Verbose] > │ v0.[int v3] <- v6 │
00:00:22 #1111 [Verbose] > │ let v7 : int32 = v3 + 1 │
00:00:22 #1112 [Verbose] > │ v1.l0 <- v7 │
00:00:22 #1113 [Verbose] > │ () │
00:00:22 #1114 [Verbose] > │ let v8 : int32 = v0.Length │
00:00:22 #1115 [Verbose] > │ let v9 : (float []) = Array.zeroCreate<float> (v8) │
00:00:22 #1116 [Verbose] > │ let v10 : Mut0 = {l0 = 0} : Mut0 │
00:00:22 #1117 [Verbose] > │ while method2(v8, v10) do │
00:00:22 #1118 [Verbose] > │ let v12 : int32 = v10.l0 │
00:00:22 #1119 [Verbose] > │ let v13 : float = v0.[int v12] │
00:00:22 #1120 [Verbose] > │ let v14 : float = v13 / 20.0 │
00:00:22 #1121 [Verbose] > │ let v15 : int32 = int32 v14 │
00:00:22 #1122 [Verbose] > │ let v16 : float = float v15 │
00:00:22 #1123 [Verbose] > │ let v17 : float = v16 * 20.0 │
00:00:22 #1124 [Verbose] > │ let v18 : float = v13 - v17 │
00:00:22 #1125 [Verbose] > │ let v19 : bool = v18 > 0.0 │
00:00:22 #1126 [Verbose] > │ let v21 : bool = │
00:00:22 #1127 [Verbose] > │ if v19 then │
00:00:22 #1128 [Verbose] > │ let v20 : bool = v18 < 10.0 │
00:00:22 #1129 [Verbose] > │ v20 │
00:00:22 #1130 [Verbose] > │ else │
00:00:22 #1131 [Verbose] > │ false │
00:00:22 #1132 [Verbose] > │ let v22 : float = │
00:00:22 #1133 [Verbose] > │ if v21 then │
00:00:22 #1134 [Verbose] > │ 10.0 │
00:00:22 #1135 [Verbose] > │ else │
00:00:22 #1136 [Verbose] > │ 0.0 │
00:00:22 #1137 [Verbose] > │ v9.[int v12] <- v22 │
00:00:22 #1138 [Verbose] > │ let v23 : int32 = v12 + 1 │
00:00:22 #1139 [Verbose] > │ v10.l0 <- v23 │
00:00:22 #1140 [Verbose] > │ () │
00:00:22 #1141 [Verbose] > │ let v24 : string = "force on bike (N)" │
00:00:22 #1142 [Verbose] > │ let v25 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:22 #1143 [Verbose] > │ (v24, v0, v9)|] │
00:00:22 #1144 [Verbose] > │ let v26 : (struct (string * (float []) * (float [])) []) = method3(v25) │
00:00:22 #1145 [Verbose] > │ let v27 : string = "child pedaling then coasting" │
00:00:22 #1146 [Verbose] > │ let v28 : string = "time (s)" │
00:00:22 #1147 [Verbose] > │ let v29 : string = "" │
00:00:22 #1148 [Verbose] > │ struct (v27, v28, v29, v26) │
00:00:22 #1149 [Verbose] > │ method0() │
00:00:22 #1150 [Verbose] > │ │
00:00:22 #1151 [Verbose] > │ │
00:00:22 #1152 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:22 #1153 [Verbose] >
00:00:22 #1154 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:22 #1155 [Verbose] > // // test
00:00:22 #1156 [Verbose] >
00:00:22 #1157 [Verbose] > inl x = am'.init_series -5 45 1
00:00:22 #1158 [Verbose] > inl y = x |> am.map (position_ft 0.1f64 20 0 0 [[ pedal_coast ]])
00:00:22 #1159 [Verbose] > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y
00:00:22 #1160 [Verbose] > ]]
00:00:23 #1161 [Verbose] >
00:00:23 #1162 [Verbose] > ╭─[ 580.47ms - return value ]──────────────────────────────────────────────────╮
00:00:23 #1163 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:23 #1164 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:23 #1165 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:23 #1166 [Verbose] > │ stroke="none"/> │
00:00:23 #1167 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:23 #1168 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:23 #1169 [Verbose] > │ fill="#FFFFFF"> │
00:00:23 #1170 [Verbose] > │ child pedaling then coasting │
00:00:23 #1171 [Verbose] > │ </text> │
00:00:23 #1172 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:23 #1173 [Verbose] > │ y2="75"/> │
00:00:23 #1174 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:23 #1175 [Verbose] > │ y2="75"/> │
00:00:23 #1176 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:23 #1177 [Verbose] > │ y2="75"/> │
00:00:23 #1178 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:23 #1179 [Verbose] > │ y2="75"/> │
00:00:23 #1180 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1=... │
00:00:23 #1181 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 #1182 [Verbose] >
00:00:23 #1183 [Verbose] > ╭─[ 592.62ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 #1184 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:23 #1185 [Verbose] > │ and UH0 = │
00:00:23 #1186 [Verbose] > │ | UH0_0 of float * UH0 │
00:00:23 #1187 [Verbose] > │ | UH0_1 │
00:00:23 #1188 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:23 #1189 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:23 #1190 [Verbose] > │ let v2 : bool = v1 < 51 │
00:00:23 #1191 [Verbose] > │ v2 │
00:00:23 #1192 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:23 #1193 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:23 #1194 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:23 #1195 [Verbose] > │ v3 │
00:00:23 #1196 [Verbose] > │ and method3 (v0 : float, v1 : float) : UH0 = │
00:00:23 #1197 [Verbose] > │ let v2 : bool = v1 < v0 │
00:00:23 #1198 [Verbose] > │ if v2 then │
00:00:23 #1199 [Verbose] > │ let v3 : float = 0.1 * v1 │
00:00:23 #1200 [Verbose] > │ let v4 : float = 0.05 + v3 │
00:00:23 #1201 [Verbose] > │ let v5 : float = v1 + 1.0 │
00:00:23 #1202 [Verbose] > │ let v6 : UH0 = method3(v0, v5) │
00:00:23 #1203 [Verbose] > │ UH0_0(v4, v6) │
00:00:23 #1204 [Verbose] > │ else │
00:00:23 #1205 [Verbose] > │ UH0_1 │
00:00:23 #1206 [Verbose] > │ and method5 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:23 #1207 [Verbose] > │ match v0 with │
00:00:23 #1208 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:23 #1209 [Verbose] > │ let v4 : UH0 = method5(v3, v1) │
00:00:23 #1210 [Verbose] > │ let v5 : float = v2 / 20.0 │
00:00:23 #1211 [Verbose] > │ let v6 : int32 = int32 v5 │
00:00:23 #1212 [Verbose] > │ let v7 : float = float v6 │
00:00:23 #1213 [Verbose] > │ let v8 : float = v7 * 20.0 │
00:00:23 #1214 [Verbose] > │ let v9 : float = v2 - v8 │
00:00:23 #1215 [Verbose] > │ let v10 : bool = v9 > 0.0 │
00:00:23 #1216 [Verbose] > │ let v12 : bool = │
00:00:23 #1217 [Verbose] > │ if v10 then │
00:00:23 #1218 [Verbose] > │ let v11 : bool = v9 < 10.0 │
00:00:23 #1219 [Verbose] > │ v11 │
00:00:23 #1220 [Verbose] > │ else │
00:00:23 #1221 [Verbose] > │ false │
00:00:23 #1222 [Verbose] > │ let v13 : float = │
00:00:23 #1223 [Verbose] > │ if v12 then │
00:00:23 #1224 [Verbose] > │ 10.0 │
00:00:23 #1225 [Verbose] > │ else │
00:00:23 #1226 [Verbose] > │ 0.0 │
00:00:23 #1227 [Verbose] > │ let v14 : float = v13 / 20.0 │
00:00:23 #1228 [Verbose] > │ let v15 : float = 0.1 * v14 │
00:00:23 #1229 [Verbose] > │ UH0_0(v15, v4) │
00:00:23 #1230 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:23 #1231 [Verbose] > │ v1 │
00:00:23 #1232 [Verbose] > │ and method6 (v0 : UH0, v1 : float) : float = │
00:00:23 #1233 [Verbose] > │ match v0 with │
00:00:23 #1234 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:23 #1235 [Verbose] > │ let v4 : float = v1 + v2 │
00:00:23 #1236 [Verbose] > │ method6(v3, v4) │
00:00:23 #1237 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:23 #1238 [Verbose] > │ v1 │
00:00:23 #1239 [Verbose] > │ and method4 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:23 #1240 [Verbose] > │ match v0 with │
00:00:23 #1241 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:23 #1242 [Verbose] > │ let v4 : UH0 = method4(v3, v1) │
00:00:23 #1243 [Verbose] > │ let v5 : float = v2 - 0.05 │
00:00:23 #1244 [Verbose] > │ let v6 : float = v5 - 0.05 │
00:00:23 #1245 [Verbose] > │ let v7 : float = v6 / 0.1 │
00:00:23 #1246 [Verbose] > │ let v8 : float = v7 + 1.0 │
00:00:23 #1247 [Verbose] > │ let v9 : float = 0.0 │
00:00:23 #1248 [Verbose] > │ let v10 : UH0 = method3(v8, v9) │
00:00:23 #1249 [Verbose] > │ let v11 : UH0 = UH0_1 │
00:00:23 #1250 [Verbose] > │ let v12 : UH0 = method5(v10, v11) │
00:00:23 #1251 [Verbose] > │ let v13 : float = 0.0 │
00:00:23 #1252 [Verbose] > │ let v14 : float = method6(v12, v13) │
00:00:23 #1253 [Verbose] > │ let v15 : float = 0.1 * v14 │
00:00:23 #1254 [Verbose] > │ UH0_0(v15, v4) │
00:00:23 #1255 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:23 #1256 [Verbose] > │ v1 │
00:00:23 #1257 [Verbose] > │ and method7 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:23 #1258 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:23 #1259 [Verbose] > │ v0 │
00:00:23 #1260 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:23 #1261 [Verbose] > │ []) * (float [])) [])) = │
00:00:23 #1262 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (51) │
00:00:23 #1263 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:23 #1264 [Verbose] > │ while method1(v1) do │
00:00:23 #1265 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:23 #1266 [Verbose] > │ let v4 : float = float v3 │
00:00:23 #1267 [Verbose] > │ let v5 : float = -5.0 + v4 │
00:00:23 #1268 [Verbose] > │ v0.[int v3] <- v5 │
00:00:23 #1269 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:23 #1270 [Verbose] > │ v1.l0 <- v6 │
00:00:23 #1271 [Verbose] > │ () │
00:00:23 #1272 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:23 #1273 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:23 #1274 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:23 #1275 [Verbose] > │ while method2(v7, v9) do │
00:00:23 #1276 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:23 #1277 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:23 #1278 [Verbose] > │ let v13 : float = v12 - 0.05 │
00:00:23 #1279 [Verbose] > │ let v14 : float = v13 - 0.05 │
00:00:23 #1280 [Verbose] > │ let v15 : float = v14 / 0.1 │
00:00:23 #1281 [Verbose] > │ let v16 : float = v15 + 1.0 │
00:00:23 #1282 [Verbose] > │ let v17 : float = 0.0 │
00:00:23 #1283 [Verbose] > │ let v18 : UH0 = method3(v16, v17) │
00:00:23 #1284 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:23 #1285 [Verbose] > │ let v20 : UH0 = method4(v18, v19) │
00:00:23 #1286 [Verbose] > │ let v21 : float = 0.0 │
00:00:23 #1287 [Verbose] > │ let v22 : float = method6(v20, v21) │
00:00:23 #1288 [Verbose] > │ v8.[int v11] <- v22 │
00:00:23 #1289 [Verbose] > │ let v23 : int32 = v11 + 1 │
00:00:23 #1290 [Verbose] > │ v9.l0 <- v23 │
00:00:23 #1291 [Verbose] > │ () │
00:00:23 #1292 [Verbose] > │ let v24 : string = "position of bike (m)" │
00:00:23 #1293 [Verbose] > │ let v25 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:23 #1294 [Verbose] > │ (v24, v0, v8)|] │
00:00:23 #1295 [Verbose] > │ let v26 : (struct (string * (float []) * (float [])) []) = method7(v25) │
00:00:23 #1296 [Verbose] > │ let v27 : string = "child pedaling then coasting" │
00:00:23 #1297 [Verbose] > │ let v28 : string = "time (s)" │
00:00:23 #1298 [Verbose] > │ let v29 : string = "" │
00:00:23 #1299 [Verbose] > │ struct (v27, v28, v29, v26) │
00:00:23 #1300 [Verbose] > │ method0() │
00:00:23 #1301 [Verbose] > │ │
00:00:23 #1302 [Verbose] > │ │
00:00:23 #1303 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 #1304 [Verbose] >
00:00:23 #1305 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:23 #1306 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:23 #1307 [Verbose] > │ ## velocity_fv │
00:00:23 #1308 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 #1309 [Verbose] >
00:00:23 #1310 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:23 #1311 [Verbose] > inl newton_second_v m fs v0 =
00:00:23 #1312 [Verbose] > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m
00:00:23 #1313 [Verbose] >
00:00:23 #1314 [Verbose] > inl update_velocity dt m fs v0 =
00:00:23 #1315 [Verbose] > v0 + newton_second_v m fs v0 * dt
00:00:23 #1316 [Verbose] >
00:00:23 #1317 [Verbose] > inl velocity_fv dt m v0 fs t =
00:00:23 #1318 [Verbose] > stream.iterate (update_velocity dt m fs) v0
00:00:23 #1319 [Verbose] > |> stream.try_item (t / dt |> math.round |> abs)
00:00:23 #1320 [Verbose] > |> optionm'.default_value 0
00:00:23 #1321 [Verbose] >
00:00:23 #1322 [Verbose] > ╭─[ 303.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:23 #1323 [Verbose] > │ () │
00:00:23 #1324 [Verbose] > │ │
00:00:23 #1325 [Verbose] > │ │
00:00:23 #1326 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:23 #1327 [Verbose] >
00:00:23 #1328 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:23 #1329 [Verbose] > inl f_air drag rho area v =
00:00:23 #1330 [Verbose] > -drag * rho * area * abs v * v / 2
00:00:24 #1331 [Verbose] >
00:00:24 #1332 [Verbose] > ╭─[ 242.42ms - stdout ]────────────────────────────────────────────────────────╮
00:00:24 #1333 [Verbose] > │ () │
00:00:24 #1334 [Verbose] > │ │
00:00:24 #1335 [Verbose] > │ │
00:00:24 #1336 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #1337 [Verbose] >
00:00:24 #1338 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 #1339 [Verbose] > // // test
00:00:24 #1340 [Verbose] >
00:00:24 #1341 [Verbose] > inl x = am'.init_series 0 60 0.5
00:00:24 #1342 [Verbose] > inl y = x |> am.map (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 0.6
00:00:24 #1343 [Verbose] > ]])
00:00:24 #1344 [Verbose] > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]]
00:00:24 #1345 [Verbose] >
00:00:24 #1346 [Verbose] > ╭─[ 508.18ms - return value ]──────────────────────────────────────────────────╮
00:00:24 #1347 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:24 #1348 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:24 #1349 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:24 #1350 [Verbose] > │ stroke="none"/> │
00:00:24 #1351 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:24 #1352 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:24 #1353 [Verbose] > │ fill="#FFFFFF"> │
00:00:24 #1354 [Verbose] > │ bike velocity │
00:00:24 #1355 [Verbose] > │ </text> │
00:00:24 #1356 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:00:24 #1357 [Verbose] > │ y2="75"/> │
00:00:24 #1358 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:24 #1359 [Verbose] > │ y2="75"/> │
00:00:24 #1360 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:00:24 #1361 [Verbose] > │ y2="75"/> │
00:00:24 #1362 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:00:24 #1363 [Verbose] > │ y2="75"/> │
00:00:24 #1364 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x... │
00:00:24 #1365 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #1366 [Verbose] >
00:00:24 #1367 [Verbose] > ╭─[ 523.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:24 #1368 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:24 #1369 [Verbose] > │ and UH0 = │
00:00:24 #1370 [Verbose] > │ | UH0_0 of float * (unit -> UH0) │
00:00:24 #1371 [Verbose] > │ | UH0_1 │
00:00:24 #1372 [Verbose] > │ and [<Struct>] US0 = │
00:00:24 #1373 [Verbose] > │ | US0_0 │
00:00:24 #1374 [Verbose] > │ | US0_1 of f1_0 : float │
00:00:24 #1375 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:24 #1376 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:24 #1377 [Verbose] > │ let v2 : bool = v1 < 121 │
00:00:24 #1378 [Verbose] > │ v2 │
00:00:24 #1379 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:24 #1380 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:24 #1381 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:24 #1382 [Verbose] > │ v3 │
00:00:24 #1383 [Verbose] > │ and closure129 () () : UH0 = │
00:00:24 #1384 [Verbose] > │ let v0 : (unit -> UH0) = closure129() │
00:00:24 #1385 [Verbose] > │ UH0_0(11.664236870396083, v0) │
00:00:24 #1386 [Verbose] > │ and closure128 () () : UH0 = │
00:00:24 #1387 [Verbose] > │ let v0 : (unit -> UH0) = closure129() │
00:00:24 #1388 [Verbose] > │ UH0_0(11.664236870396081, v0) │
00:00:24 #1389 [Verbose] > │ and closure127 () () : UH0 = │
00:00:24 #1390 [Verbose] > │ let v0 : (unit -> UH0) = closure128() │
00:00:24 #1391 [Verbose] > │ UH0_0(11.66423687039608, v0) │
00:00:24 #1392 [Verbose] > │ and closure126 () () : UH0 = │
00:00:24 #1393 [Verbose] > │ let v0 : (unit -> UH0) = closure127() │
00:00:24 #1394 [Verbose] > │ UH0_0(11.664236870396078, v0) │
00:00:24 #1395 [Verbose] > │ and closure125 () () : UH0 = │
00:00:24 #1396 [Verbose] > │ let v0 : (unit -> UH0) = closure126() │
00:00:24 #1397 [Verbose] > │ UH0_0(11.664236870396074, v0) │
00:00:24 #1398 [Verbose] > │ and closure124 () () : UH0 = │
00:00:24 #1399 [Verbose] > │ let v0 : (unit -> UH0) = closure125() │
00:00:24 #1400 [Verbose] > │ UH0_0(11.66423687039607, v0) │
00:00:24 #1401 [Verbose] > │ and closure123 () () : UH0 = │
00:00:24 #1402 [Verbose] > │ let v0 : (unit -> UH0) = closure124() │
00:00:24 #1403 [Verbose] > │ UH0_0(11.664236870396065, v0) │
00:00:24 #1404 [Verbose] > │ and closure122 () () : UH0 = │
00:00:24 #1405 [Verbose] > │ let v0 : (unit -> UH0) = closure123() │
00:00:24 #1406 [Verbose] > │ UH0_0(11.664236870396058, v0) │
00:00:24 #1407 [Verbose] > │ and closure121 () () : UH0 = │
00:00:24 #1408 [Verbose] > │ let v0 : (unit -> UH0) = closure122() │
00:00:24 #1409 [Verbose] > │ UH0_0(11.66423687039605, v0) │
00:00:24 #1410 [Verbose] > │ and closure120 () () : UH0 = │
00:00:24 #1411 [Verbose] > │ let v0 : (unit -> UH0) = closure121() │
00:00:24 #1412 [Verbose] > │ UH0_0(11.664236870396037, v0) │
00:00:24 #1413 [Verbose] > │ and closure119 () () : UH0 = │
00:00:24 #1414 [Verbose] > │ let v0 : (unit -> UH0) = closure120() │
00:00:24 #1415 [Verbose] > │ UH0_0(11.66423687039602, v0) │
00:00:24 #1416 [Verbose] > │ and closure118 () () : UH0 = │
00:00:24 #1417 [Verbose] > │ let v0 : (unit -> UH0) = closure119() │
00:00:24 #1418 [Verbose] > │ UH0_0(11.664236870396, v0) │
00:00:24 #1419 [Verbose] > │ and closure117 () () : UH0 = │
00:00:24 #1420 [Verbose] > │ let v0 : (unit -> UH0) = closure118() │
00:00:24 #1421 [Verbose] > │ UH0_0(11.664236870395971, v0) │
00:00:24 #1422 [Verbose] > │ and closure116 () () : UH0 = │
00:00:24 #1423 [Verbose] > │ let v0 : (unit -> UH0) = closure117() │
00:00:24 #1424 [Verbose] > │ UH0_0(11.664236870395934, v0) │
00:00:24 #1425 [Verbose] > │ and closure115 () () : UH0 = │
00:00:24 #1426 [Verbose] > │ let v0 : (unit -> UH0) = closure116() │
00:00:24 #1427 [Verbose] > │ UH0_0(11.664236870395884, v0) │
00:00:24 #1428 [Verbose] > │ and closure114 () () : UH0 = │
00:00:24 #1429 [Verbose] > │ let v0 : (unit -> UH0) = closure115() │
00:00:24 #1430 [Verbose] > │ UH0_0(11.664236870395818, v0) │
00:00:24 #1431 [Verbose] > │ and closure113 () () : UH0 = │
00:00:24 #1432 [Verbose] > │ let v0 : (unit -> UH0) = closure114() │
00:00:24 #1433 [Verbose] > │ UH0_0(11.664236870395731, v0) │
00:00:24 #1434 [Verbose] > │ and closure112 () () : UH0 = │
00:00:24 #1435 [Verbose] > │ let v0 : (unit -> UH0) = closure113() │
00:00:24 #1436 [Verbose] > │ UH0_0(11.664236870395616, v0) │
00:00:24 #1437 [Verbose] > │ and closure111 () () : UH0 = │
00:00:24 #1438 [Verbose] > │ let v0 : (unit -> UH0) = closure112() │
00:00:24 #1439 [Verbose] > │ UH0_0(11.664236870395463, v0) │
00:00:24 #1440 [Verbose] > │ and closure110 () () : UH0 = │
00:00:24 #1441 [Verbose] > │ let v0 : (unit -> UH0) = closure111() │
00:00:24 #1442 [Verbose] > │ UH0_0(11.66423687039526, v0) │
00:00:24 #1443 [Verbose] > │ and closure109 () () : UH0 = │
00:00:24 #1444 [Verbose] > │ let v0 : (unit -> UH0) = closure110() │
00:00:24 #1445 [Verbose] > │ UH0_0(11.664236870394992, v0) │
00:00:24 #1446 [Verbose] > │ and closure108 () () : UH0 = │
00:00:24 #1447 [Verbose] > │ let v0 : (unit -> UH0) = closure109() │
00:00:24 #1448 [Verbose] > │ UH0_0(11.664236870394637, v0) │
00:00:24 #1449 [Verbose] > │ and closure107 () () : UH0 = │
00:00:24 #1450 [Verbose] > │ let v0 : (unit -> UH0) = closure108() │
00:00:24 #1451 [Verbose] > │ UH0_0(11.664236870394168, v0) │
00:00:24 #1452 [Verbose] > │ and closure106 () () : UH0 = │
00:00:24 #1453 [Verbose] > │ let v0 : (unit -> UH0) = closure107() │
00:00:24 #1454 [Verbose] > │ UH0_0(11.664236870393546, v0) │
00:00:24 #1455 [Verbose] > │ and closure105 () () : UH0 = │
00:00:24 #1456 [Verbose] > │ let v0 : (unit -> UH0) = closure106() │
00:00:24 #1457 [Verbose] > │ UH0_0(11.664236870392722, v0) │
00:00:24 #1458 [Verbose] > │ and closure104 () () : UH0 = │
00:00:24 #1459 [Verbose] > │ let v0 : (unit -> UH0) = closure105() │
00:00:24 #1460 [Verbose] > │ UH0_0(11.664236870391631, v0) │
00:00:24 #1461 [Verbose] > │ and closure103 () () : UH0 = │
00:00:24 #1462 [Verbose] > │ let v0 : (unit -> UH0) = closure104() │
00:00:24 #1463 [Verbose] > │ UH0_0(11.664236870390187, v0) │
00:00:24 #1464 [Verbose] > │ and closure102 () () : UH0 = │
00:00:24 #1465 [Verbose] > │ let v0 : (unit -> UH0) = closure103() │
00:00:24 #1466 [Verbose] > │ UH0_0(11.664236870388274, v0) │
00:00:24 #1467 [Verbose] > │ and closure101 () () : UH0 = │
00:00:24 #1468 [Verbose] > │ let v0 : (unit -> UH0) = closure102() │
00:00:24 #1469 [Verbose] > │ UH0_0(11.66423687038574, v0) │
00:00:24 #1470 [Verbose] > │ and closure100 () () : UH0 = │
00:00:24 #1471 [Verbose] > │ let v0 : (unit -> UH0) = closure101() │
00:00:24 #1472 [Verbose] > │ UH0_0(11.664236870382384, v0) │
00:00:24 #1473 [Verbose] > │ and closure99 () () : UH0 = │
00:00:24 #1474 [Verbose] > │ let v0 : (unit -> UH0) = closure100() │
00:00:24 #1475 [Verbose] > │ UH0_0(11.664236870377938, v0) │
00:00:24 #1476 [Verbose] > │ and closure98 () () : UH0 = │
00:00:24 #1477 [Verbose] > │ let v0 : (unit -> UH0) = closure99() │
00:00:24 #1478 [Verbose] > │ UH0_0(11.66423687037205, v0) │
00:00:24 #1479 [Verbose] > │ and closure97 () () : UH0 = │
00:00:24 #1480 [Verbose] > │ let v0 : (unit -> UH0) = closure98() │
00:00:24 #1481 [Verbose] > │ UH0_0(11.664236870364254, v0) │
00:00:24 #1482 [Verbose] > │ and closure96 () () : UH0 = │
00:00:24 #1483 [Verbose] > │ let v0 : (unit -> UH0) = closure97() │
00:00:24 #1484 [Verbose] > │ UH0_0(11.664236870353927, v0) │
00:00:24 #1485 [Verbose] > │ and closure95 () () : UH0 = │
00:00:24 #1486 [Verbose] > │ let v0 : (unit -> UH0) = closure96() │
00:00:24 #1487 [Verbose] > │ UH0_0(11.664236870340249, v0) │
00:00:24 #1488 [Verbose] > │ and closure94 () () : UH0 = │
00:00:24 #1489 [Verbose] > │ let v0 : (unit -> UH0) = closure95() │
00:00:24 #1490 [Verbose] > │ UH0_0(11.664236870322135, v0) │
00:00:24 #1491 [Verbose] > │ and closure93 () () : UH0 = │
00:00:24 #1492 [Verbose] > │ let v0 : (unit -> UH0) = closure94() │
00:00:24 #1493 [Verbose] > │ UH0_0(11.664236870298145, v0) │
00:00:24 #1494 [Verbose] > │ and closure92 () () : UH0 = │
00:00:24 #1495 [Verbose] > │ let v0 : (unit -> UH0) = closure93() │
00:00:24 #1496 [Verbose] > │ UH0_0(11.664236870266372, v0) │
00:00:24 #1497 [Verbose] > │ and closure91 () () : UH0 = │
00:00:24 #1498 [Verbose] > │ let v0 : (unit -> UH0) = closure92() │
00:00:24 #1499 [Verbose] > │ UH0_0(11.664236870224292, v0) │
00:00:24 #1500 [Verbose] > │ and closure90 () () : UH0 = │
00:00:24 #1501 [Verbose] > │ let v0 : (unit -> UH0) = closure91() │
00:00:24 #1502 [Verbose] > │ UH0_0(11.66423687016856, v0) │
00:00:24 #1503 [Verbose] > │ and closure89 () () : UH0 = │
00:00:24 #1504 [Verbose] > │ let v0 : (unit -> UH0) = closure90() │
00:00:24 #1505 [Verbose] > │ UH0_0(11.664236870094747, v0) │
00:00:24 #1506 [Verbose] > │ and closure88 () () : UH0 = │
00:00:24 #1507 [Verbose] > │ let v0 : (unit -> UH0) = closure89() │
00:00:24 #1508 [Verbose] > │ UH0_0(11.664236869996989, v0) │
00:00:24 #1509 [Verbose] > │ and closure87 () () : UH0 = │
00:00:24 #1510 [Verbose] > │ let v0 : (unit -> UH0) = closure88() │
00:00:24 #1511 [Verbose] > │ UH0_0(11.664236869867516, v0) │
00:00:24 #1512 [Verbose] > │ and closure86 () () : UH0 = │
00:00:24 #1513 [Verbose] > │ let v0 : (unit -> UH0) = closure87() │
00:00:24 #1514 [Verbose] > │ UH0_0(11.66423686969604, v0) │
00:00:24 #1515 [Verbose] > │ and closure85 () () : UH0 = │
00:00:24 #1516 [Verbose] > │ let v0 : (unit -> UH0) = closure86() │
00:00:24 #1517 [Verbose] > │ UH0_0(11.664236869468937, v0) │
00:00:24 #1518 [Verbose] > │ and closure84 () () : UH0 = │
00:00:24 #1519 [Verbose] > │ let v0 : (unit -> UH0) = closure85() │
00:00:24 #1520 [Verbose] > │ UH0_0(11.664236869168157, v0) │
00:00:24 #1521 [Verbose] > │ and closure83 () () : UH0 = │
00:00:24 #1522 [Verbose] > │ let v0 : (unit -> UH0) = closure84() │
00:00:24 #1523 [Verbose] > │ UH0_0(11.6642368687698, v0) │
00:00:24 #1524 [Verbose] > │ and closure82 () () : UH0 = │
00:00:24 #1525 [Verbose] > │ let v0 : (unit -> UH0) = closure83() │
00:00:24 #1526 [Verbose] > │ UH0_0(11.664236868242211, v0) │
00:00:24 #1527 [Verbose] > │ and closure81 () () : UH0 = │
00:00:24 #1528 [Verbose] > │ let v0 : (unit -> UH0) = closure82() │
00:00:24 #1529 [Verbose] > │ UH0_0(11.664236867543465, v0) │
00:00:24 #1530 [Verbose] > │ and closure80 () () : UH0 = │
00:00:24 #1531 [Verbose] > │ let v0 : (unit -> UH0) = closure81() │
00:00:24 #1532 [Verbose] > │ UH0_0(11.664236866618037, v0) │
00:00:24 #1533 [Verbose] > │ and closure79 () () : UH0 = │
00:00:24 #1534 [Verbose] > │ let v0 : (unit -> UH0) = closure80() │
00:00:24 #1535 [Verbose] > │ UH0_0(11.664236865392386, v0) │
00:00:24 #1536 [Verbose] > │ and closure78 () () : UH0 = │
00:00:24 #1537 [Verbose] > │ let v0 : (unit -> UH0) = closure79() │
00:00:24 #1538 [Verbose] > │ UH0_0(11.664236863769117, v0) │
00:00:24 #1539 [Verbose] > │ and closure77 () () : UH0 = │
00:00:24 #1540 [Verbose] > │ let v0 : (unit -> UH0) = closure78() │
00:00:24 #1541 [Verbose] > │ UH0_0(11.664236861619237, v0) │
00:00:24 #1542 [Verbose] > │ and closure76 () () : UH0 = │
00:00:24 #1543 [Verbose] > │ let v0 : (unit -> UH0) = closure77() │
00:00:24 #1544 [Verbose] > │ UH0_0(11.664236858771906, v0) │
00:00:24 #1545 [Verbose] > │ and closure75 () () : UH0 = │
00:00:24 #1546 [Verbose] > │ let v0 : (unit -> UH0) = closure76() │
00:00:24 #1547 [Verbose] > │ UH0_0(11.66423685500086, v0) │
00:00:24 #1548 [Verbose] > │ and closure74 () () : UH0 = │
00:00:24 #1549 [Verbose] > │ let v0 : (unit -> UH0) = closure75() │
00:00:24 #1550 [Verbose] > │ UH0_0(11.664236850006436, v0) │
00:00:24 #1551 [Verbose] > │ and closure73 () () : UH0 = │
00:00:24 #1552 [Verbose] > │ let v0 : (unit -> UH0) = closure74() │
00:00:24 #1553 [Verbose] > │ UH0_0(11.664236843391752, v0) │
00:00:24 #1554 [Verbose] > │ and closure72 () () : UH0 = │
00:00:24 #1555 [Verbose] > │ let v0 : (unit -> UH0) = closure73() │
00:00:24 #1556 [Verbose] > │ UH0_0(11.664236834631172, v0) │
00:00:24 #1557 [Verbose] > │ and closure71 () () : UH0 = │
00:00:24 #1558 [Verbose] > │ let v0 : (unit -> UH0) = closure72() │
00:00:24 #1559 [Verbose] > │ UH0_0(11.66423682302854, v0) │
00:00:24 #1560 [Verbose] > │ and closure70 () () : UH0 = │
00:00:24 #1561 [Verbose] > │ let v0 : (unit -> UH0) = closure71() │
00:00:24 #1562 [Verbose] > │ UH0_0(11.664236807661855, v0) │
00:00:24 #1563 [Verbose] > │ and closure69 () () : UH0 = │
00:00:24 #1564 [Verbose] > │ let v0 : (unit -> UH0) = closure70() │
00:00:24 #1565 [Verbose] > │ UH0_0(11.664236787310005, v0) │
00:00:24 #1566 [Verbose] > │ and closure68 () () : UH0 = │
00:00:24 #1567 [Verbose] > │ let v0 : (unit -> UH0) = closure69() │
00:00:24 #1568 [Verbose] > │ UH0_0(11.664236760355733, v0) │
00:00:24 #1569 [Verbose] > │ and closure67 () () : UH0 = │
00:00:24 #1570 [Verbose] > │ let v0 : (unit -> UH0) = closure68() │
00:00:24 #1571 [Verbose] > │ UH0_0(11.664236724657123, v0) │
00:00:24 #1572 [Verbose] > │ and closure66 () () : UH0 = │
00:00:24 #1573 [Verbose] > │ let v0 : (unit -> UH0) = closure67() │
00:00:24 #1574 [Verbose] > │ UH0_0(11.66423667737739, v0) │
00:00:24 #1575 [Verbose] > │ and closure65 () () : UH0 = │
00:00:24 #1576 [Verbose] > │ let v0 : (unit -> UH0) = closure66() │
00:00:24 #1577 [Verbose] > │ UH0_0(11.664236614759462, v0) │
00:00:24 #1578 [Verbose] > │ and closure64 () () : UH0 = │
00:00:24 #1579 [Verbose] > │ let v0 : (unit -> UH0) = closure65() │
00:00:24 #1580 [Verbose] > │ UH0_0(11.664236531827415, v0) │
00:00:24 #1581 [Verbose] > │ and closure63 () () : UH0 = │
00:00:24 #1582 [Verbose] > │ let v0 : (unit -> UH0) = closure64() │
00:00:24 #1583 [Verbose] > │ UH0_0(11.664236421991067, v0) │
00:00:24 #1584 [Verbose] > │ and closure62 () () : UH0 = │
00:00:24 #1585 [Verbose] > │ let v0 : (unit -> UH0) = closure63() │
00:00:24 #1586 [Verbose] > │ UH0_0(11.664236276522294, v0) │
00:00:24 #1587 [Verbose] > │ and closure61 () () : UH0 = │
00:00:24 #1588 [Verbose] > │ let v0 : (unit -> UH0) = closure62() │
00:00:24 #1589 [Verbose] > │ UH0_0(11.664236083861448, v0) │
00:00:24 #1590 [Verbose] > │ and closure60 () () : UH0 = │
00:00:24 #1591 [Verbose] > │ let v0 : (unit -> UH0) = closure61() │
00:00:24 #1592 [Verbose] > │ UH0_0(11.664235828698772, v0) │
00:00:24 #1593 [Verbose] > │ and closure59 () () : UH0 = │
00:00:24 #1594 [Verbose] > │ let v0 : (unit -> UH0) = closure60() │
00:00:24 #1595 [Verbose] > │ UH0_0(11.664235490757811, v0) │
00:00:24 #1596 [Verbose] > │ and closure58 () () : UH0 = │
00:00:24 #1597 [Verbose] > │ let v0 : (unit -> UH0) = closure59() │
00:00:24 #1598 [Verbose] > │ UH0_0(11.664235043184158, v0) │
00:00:24 #1599 [Verbose] > │ and closure57 () () : UH0 = │
00:00:24 #1600 [Verbose] > │ let v0 : (unit -> UH0) = closure58() │
00:00:24 #1601 [Verbose] > │ UH0_0(11.66423445041147, v0) │
00:00:24 #1602 [Verbose] > │ and closure56 () () : UH0 = │
00:00:24 #1603 [Verbose] > │ let v0 : (unit -> UH0) = closure57() │
00:00:24 #1604 [Verbose] > │ UH0_0(11.664233665335203, v0) │
00:00:24 #1605 [Verbose] > │ and closure55 () () : UH0 = │
00:00:24 #1606 [Verbose] > │ let v0 : (unit -> UH0) = closure56() │
00:00:24 #1607 [Verbose] > │ UH0_0(11.664232625569467, v0) │
00:00:24 #1608 [Verbose] > │ and closure54 () () : UH0 = │
00:00:24 #1609 [Verbose] > │ let v0 : (unit -> UH0) = closure55() │
00:00:24 #1610 [Verbose] > │ UH0_0(11.664231248489562, v0) │
00:00:24 #1611 [Verbose] > │ and closure53 () () : UH0 = │
00:00:24 #1612 [Verbose] > │ let v0 : (unit -> UH0) = closure54() │
00:00:24 #1613 [Verbose] > │ UH0_0(11.664229424666262, v0) │
00:00:24 #1614 [Verbose] > │ and closure52 () () : UH0 = │
00:00:24 #1615 [Verbose] > │ let v0 : (unit -> UH0) = closure53() │
00:00:24 #1616 [Verbose] > │ UH0_0(11.66422700917009, v0) │
00:00:24 #1617 [Verbose] > │ and closure51 () () : UH0 = │
00:00:24 #1618 [Verbose] > │ let v0 : (unit -> UH0) = closure52() │
00:00:24 #1619 [Verbose] > │ UH0_0(11.664223810054642, v0) │
00:00:24 #1620 [Verbose] > │ and closure50 () () : UH0 = │
00:00:24 #1621 [Verbose] > │ let v0 : (unit -> UH0) = closure51() │
00:00:24 #1622 [Verbose] > │ UH0_0(11.664219573103773, v0) │
00:00:24 #1623 [Verbose] > │ and closure49 () () : UH0 = │
00:00:24 #1624 [Verbose] > │ let v0 : (unit -> UH0) = closure50() │
00:00:24 #1625 [Verbose] > │ UH0_0(11.6642139616307, v0) │
00:00:24 #1626 [Verbose] > │ and closure48 () () : UH0 = │
00:00:24 #1627 [Verbose] > │ let v0 : (unit -> UH0) = closure49() │
00:00:24 #1628 [Verbose] > │ UH0_0(11.664206529723813, v0) │
00:00:24 #1629 [Verbose] > │ and closure47 () () : UH0 = │
00:00:24 #1630 [Verbose] > │ let v0 : (unit -> UH0) = closure48() │
00:00:24 #1631 [Verbose] > │ UH0_0(11.664196686813408, v0) │
00:00:24 #1632 [Verbose] > │ and closure46 () () : UH0 = │
00:00:24 #1633 [Verbose] > │ let v0 : (unit -> UH0) = closure47() │
00:00:24 #1634 [Verbose] > │ UH0_0(11.664183650743945, v0) │
00:00:24 #1635 [Verbose] > │ and closure45 () () : UH0 = │
00:00:24 #1636 [Verbose] > │ let v0 : (unit -> UH0) = closure46() │
00:00:24 #1637 [Verbose] > │ UH0_0(11.664166385623318, v0) │
00:00:24 #1638 [Verbose] > │ and closure44 () () : UH0 = │
00:00:24 #1639 [Verbose] > │ let v0 : (unit -> UH0) = closure45() │
00:00:24 #1640 [Verbose] > │ UH0_0(11.664143519511356, v0) │
00:00:24 #1641 [Verbose] > │ and closure43 () () : UH0 = │
00:00:24 #1642 [Verbose] > │ let v0 : (unit -> UH0) = closure44() │
00:00:24 #1643 [Verbose] > │ UH0_0(11.664113235408447, v0) │
00:00:24 #1644 [Verbose] > │ and closure42 () () : UH0 = │
00:00:24 #1645 [Verbose] > │ let v0 : (unit -> UH0) = closure43() │
00:00:24 #1646 [Verbose] > │ UH0_0(11.66407312688485, v0) │
00:00:24 #1647 [Verbose] > │ and closure41 () () : UH0 = │
00:00:24 #1648 [Verbose] > │ let v0 : (unit -> UH0) = closure42() │
00:00:24 #1649 [Verbose] > │ UH0_0(11.664020006883758, v0) │
00:00:24 #1650 [Verbose] > │ and closure40 () () : UH0 = │
00:00:24 #1651 [Verbose] > │ let v0 : (unit -> UH0) = closure41() │
00:00:24 #1652 [Verbose] > │ UH0_0(11.663949654514292, v0) │
00:00:24 #1653 [Verbose] > │ and closure39 () () : UH0 = │
00:00:24 #1654 [Verbose] > │ let v0 : (unit -> UH0) = closure40() │
00:00:24 #1655 [Verbose] > │ UH0_0(11.663856479730171, v0) │
00:00:24 #1656 [Verbose] > │ and closure38 () () : UH0 = │
00:00:24 #1657 [Verbose] > │ let v0 : (unit -> UH0) = closure39() │
00:00:24 #1658 [Verbose] > │ UH0_0(11.663733079277343, v0) │
00:00:24 #1659 [Verbose] > │ and closure37 () () : UH0 = │
00:00:24 #1660 [Verbose] > │ let v0 : (unit -> UH0) = closure38() │
00:00:24 #1661 [Verbose] > │ UH0_0(11.663569648675777, v0) │
00:00:24 #1662 [Verbose] > │ and closure36 () () : UH0 = │
00:00:24 #1663 [Verbose] > │ let v0 : (unit -> UH0) = closure37() │
00:00:24 #1664 [Verbose] > │ UH0_0(11.663353203599439, v0) │
00:00:24 #1665 [Verbose] > │ and closure35 () () : UH0 = │
00:00:24 #1666 [Verbose] > │ let v0 : (unit -> UH0) = closure36() │
00:00:24 #1667 [Verbose] > │ UH0_0(11.663066548940721, v0) │
00:00:24 #1668 [Verbose] > │ and closure34 () () : UH0 = │
00:00:24 #1669 [Verbose] > │ let v0 : (unit -> UH0) = closure35() │
00:00:24 #1670 [Verbose] > │ UH0_0(11.662686913915445, v0) │
00:00:24 #1671 [Verbose] > │ and closure33 () () : UH0 = │
00:00:24 #1672 [Verbose] > │ let v0 : (unit -> UH0) = closure34() │
00:00:24 #1673 [Verbose] > │ UH0_0(11.662184145236864, v0) │
00:00:24 #1674 [Verbose] > │ and closure32 () () : UH0 = │
00:00:24 #1675 [Verbose] > │ let v0 : (unit -> UH0) = closure33() │
00:00:24 #1676 [Verbose] > │ UH0_0(11.661518315638029, v0) │
00:00:24 #1677 [Verbose] > │ and closure31 () () : UH0 = │
00:00:24 #1678 [Verbose] > │ let v0 : (unit -> UH0) = closure32() │
00:00:24 #1679 [Verbose] > │ UH0_0(11.66063655920926, v0) │
00:00:24 #1680 [Verbose] > │ and closure30 () () : UH0 = │
00:00:24 #1681 [Verbose] > │ let v0 : (unit -> UH0) = closure31() │
00:00:24 #1682 [Verbose] > │ UH0_0(11.659468884709733, v0) │
00:00:24 #1683 [Verbose] > │ and closure29 () () : UH0 = │
00:00:24 #1684 [Verbose] > │ let v0 : (unit -> UH0) = closure30() │
00:00:24 #1685 [Verbose] > │ UH0_0(11.657922638782631, v0) │
00:00:24 #1686 [Verbose] > │ and closure28 () () : UH0 = │
00:00:24 #1687 [Verbose] > │ let v0 : (unit -> UH0) = closure29() │
00:00:24 #1688 [Verbose] > │ UH0_0(11.655875187195818, v0) │
00:00:24 #1689 [Verbose] > │ and closure27 () () : UH0 = │
00:00:24 #1690 [Verbose] > │ let v0 : (unit -> UH0) = closure28() │
00:00:24 #1691 [Verbose] > │ UH0_0(11.653164246713697, v0) │
00:00:24 #1692 [Verbose] > │ and closure26 () () : UH0 = │
00:00:24 #1693 [Verbose] > │ let v0 : (unit -> UH0) = closure27() │
00:00:24 #1694 [Verbose] > │ UH0_0(11.64957512416459, v0) │
00:00:24 #1695 [Verbose] > │ and closure25 () () : UH0 = │
00:00:24 #1696 [Verbose] > │ let v0 : (unit -> UH0) = closure26() │
00:00:24 #1697 [Verbose] > │ UH0_0(11.644823892116417, v0) │
00:00:24 #1698 [Verbose] > │ and closure24 () () : UH0 = │
00:00:24 #1699 [Verbose] > │ let v0 : (unit -> UH0) = closure25() │
00:00:24 #1700 [Verbose] > │ UH0_0(11.63853524018339, v0) │
00:00:24 #1701 [Verbose] > │ and closure23 () () : UH0 = │
00:00:24 #1702 [Verbose] > │ let v0 : (unit -> UH0) = closure24() │
00:00:24 #1703 [Verbose] > │ UH0_0(11.630213374558416, v0) │
00:00:24 #1704 [Verbose] > │ and closure22 () () : UH0 = │
00:00:24 #1705 [Verbose] > │ let v0 : (unit -> UH0) = closure23() │
00:00:24 #1706 [Verbose] > │ UH0_0(11.619203884549703, v0) │
00:00:24 #1707 [Verbose] > │ and closure21 () () : UH0 = │
00:00:24 #1708 [Verbose] > │ let v0 : (unit -> UH0) = closure22() │
00:00:24 #1709 [Verbose] > │ UH0_0(11.604643948207235, v0) │
00:00:24 #1710 [Verbose] > │ and closure20 () () : UH0 = │
00:00:24 #1711 [Verbose] > │ let v0 : (unit -> UH0) = closure21() │
00:00:24 #1712 [Verbose] > │ UH0_0(11.585397618384544, v0) │
00:00:24 #1713 [Verbose] > │ and closure19 () () : UH0 = │
00:00:24 #1714 [Verbose] > │ let v0 : (unit -> UH0) = closure20() │
00:00:24 #1715 [Verbose] > │ UH0_0(11.559972254267073, v0) │
00:00:24 #1716 [Verbose] > │ and closure18 () () : UH0 = │
00:00:24 #1717 [Verbose] > │ let v0 : (unit -> UH0) = closure19() │
00:00:24 #1718 [Verbose] > │ UH0_0(11.526411536153837, v0) │
00:00:24 #1719 [Verbose] > │ and closure17 () () : UH0 = │
00:00:24 #1720 [Verbose] > │ let v0 : (unit -> UH0) = closure18() │
00:00:24 #1721 [Verbose] > │ UH0_0(11.48216011776808, v0) │
00:00:24 #1722 [Verbose] > │ and closure16 () () : UH0 = │
00:00:24 #1723 [Verbose] > │ let v0 : (unit -> UH0) = closure17() │
00:00:24 #1724 [Verbose] > │ UH0_0(11.42389519391233, v0) │
00:00:24 #1725 [Verbose] > │ and closure15 () () : UH0 = │
00:00:24 #1726 [Verbose] > │ let v0 : (unit -> UH0) = closure16() │
00:00:24 #1727 [Verbose] > │ UH0_0(11.347321723441393, v0) │
00:00:24 #1728 [Verbose] > │ and closure14 () () : UH0 = │
00:00:24 #1729 [Verbose] > │ let v0 : (unit -> UH0) = closure15() │
00:00:24 #1730 [Verbose] > │ UH0_0(11.246931775734161, v0) │
00:00:24 #1731 [Verbose] > │ and closure13 () () : UH0 = │
00:00:24 #1732 [Verbose] > │ let v0 : (unit -> UH0) = closure14() │
00:00:24 #1733 [Verbose] > │ UH0_0(11.115736011467376, v0) │
00:00:24 #1734 [Verbose] > │ and closure12 () () : UH0 = │
00:00:24 #1735 [Verbose] > │ let v0 : (unit -> UH0) = closure13() │
00:00:24 #1736 [Verbose] > │ UH0_0(10.94498876251829, v0) │
00:00:24 #1737 [Verbose] > │ and closure11 () () : UH0 = │
00:00:24 #1738 [Verbose] > │ let v0 : (unit -> UH0) = closure12() │
00:00:24 #1739 [Verbose] > │ UH0_0(10.72394989903564, v0) │
00:00:24 #1740 [Verbose] > │ and closure10 () () : UH0 = │
00:00:24 #1741 [Verbose] > │ let v0 : (unit -> UH0) = closure11() │
00:00:24 #1742 [Verbose] > │ UH0_0(10.439758275369812, v0) │
00:00:24 #1743 [Verbose] > │ and closure9 () () : UH0 = │
00:00:24 #1744 [Verbose] > │ let v0 : (unit -> UH0) = closure10() │
00:00:24 #1745 [Verbose] > │ UH0_0(10.077531599826058, v0) │
00:00:24 #1746 [Verbose] > │ and closure8 () () : UH0 = │
00:00:24 #1747 [Verbose] > │ let v0 : (unit -> UH0) = closure9() │
00:00:24 #1748 [Verbose] > │ UH0_0(9.62084761372258, v0) │
00:00:24 #1749 [Verbose] > │ and closure7 () () : UH0 = │
00:00:24 #1750 [Verbose] > │ let v0 : (unit -> UH0) = closure8() │
00:00:24 #1751 [Verbose] > │ UH0_0(9.052781056066443, v0) │
00:00:24 #1752 [Verbose] > │ and closure6 () () : UH0 = │
00:00:24 #1753 [Verbose] > │ let v0 : (unit -> UH0) = closure7() │
00:00:24 #1754 [Verbose] > │ UH0_0(8.357635347880503, v0) │
00:00:24 #1755 [Verbose] > │ and closure5 () () : UH0 = │
00:00:24 #1756 [Verbose] > │ let v0 : (unit -> UH0) = closure6() │
00:00:24 #1757 [Verbose] > │ UH0_0(7.523376447621674, v0) │
00:00:24 #1758 [Verbose] > │ and closure4 () () : UH0 = │
00:00:24 #1759 [Verbose] > │ let v0 : (unit -> UH0) = closure5() │
00:00:24 #1760 [Verbose] > │ UH0_0(6.544529054818572, v0) │
00:00:24 #1761 [Verbose] > │ and closure3 () () : UH0 = │
00:00:24 #1762 [Verbose] > │ let v0 : (unit -> UH0) = closure4() │
00:00:24 #1763 [Verbose] > │ UH0_0(5.424976512996006, v0) │
00:00:24 #1764 [Verbose] > │ and closure2 () () : UH0 = │
00:00:24 #1765 [Verbose] > │ let v0 : (unit -> UH0) = closure3() │
00:00:24 #1766 [Verbose] > │ UH0_0(4.179852321428571, v0) │
00:00:24 #1767 [Verbose] > │ and closure1 () () : UH0 = │
00:00:24 #1768 [Verbose] > │ let v0 : (unit -> UH0) = closure2() │
00:00:24 #1769 [Verbose] > │ UH0_0(2.835714285714286, v0) │
00:00:24 #1770 [Verbose] > │ and closure0 () () : UH0 = │
00:00:24 #1771 [Verbose] > │ let v0 : (unit -> UH0) = closure1() │
00:00:24 #1772 [Verbose] > │ UH0_0(1.4285714285714286, v0) │
00:00:24 #1773 [Verbose] > │ and method3 (v0 : float, v1 : UH0) : US0 = │
00:00:24 #1774 [Verbose] > │ match v1 with │
00:00:24 #1775 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:24 #1776 [Verbose] > │ let v4 : bool = v0 <= 0.0 │
00:00:24 #1777 [Verbose] > │ if v4 then │
00:00:24 #1778 [Verbose] > │ US0_1(v2) │
00:00:24 #1779 [Verbose] > │ else │
00:00:24 #1780 [Verbose] > │ let v6 : float = v0 - 1.0 │
00:00:24 #1781 [Verbose] > │ let v7 : UH0 = v3 () │
00:00:24 #1782 [Verbose] > │ method3(v6, v7) │
00:00:24 #1783 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:24 #1784 [Verbose] > │ US0_0 │
00:00:24 #1785 [Verbose] > │ and method4 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:24 #1786 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:24 #1787 [Verbose] > │ v0 │
00:00:24 #1788 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:24 #1789 [Verbose] > │ []) * (float [])) [])) = │
00:00:24 #1790 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (121) │
00:00:24 #1791 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:24 #1792 [Verbose] > │ while method1(v1) do │
00:00:24 #1793 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:24 #1794 [Verbose] > │ let v4 : float = float v3 │
00:00:24 #1795 [Verbose] > │ let v5 : float = 0.5 * v4 │
00:00:24 #1796 [Verbose] > │ v0.[int v3] <- v5 │
00:00:24 #1797 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:24 #1798 [Verbose] > │ v1.l0 <- v6 │
00:00:24 #1799 [Verbose] > │ () │
00:00:24 #1800 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:24 #1801 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:24 #1802 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:24 #1803 [Verbose] > │ while method2(v7, v9) do │
00:00:24 #1804 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:24 #1805 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:24 #1806 [Verbose] > │ let v13 : float = round v12 │
00:00:24 #1807 [Verbose] > │ let v14 : float = -v13 │
00:00:24 #1808 [Verbose] > │ let v15 : bool = v13 >= v14 │
00:00:24 #1809 [Verbose] > │ let v16 : float = │
00:00:24 #1810 [Verbose] > │ if v15 then │
00:00:24 #1811 [Verbose] > │ v13 │
00:00:24 #1812 [Verbose] > │ else │
00:00:24 #1813 [Verbose] > │ v14 │
00:00:24 #1814 [Verbose] > │ let v17 : float = 0.0 │
00:00:24 #1815 [Verbose] > │ let v18 : (unit -> UH0) = closure0() │
00:00:24 #1816 [Verbose] > │ let v19 : UH0 = UH0_0(v17, v18) │
00:00:24 #1817 [Verbose] > │ let v20 : US0 = method3(v16, v19) │
00:00:24 #1818 [Verbose] > │ let v23 : float = │
00:00:24 #1819 [Verbose] > │ match v20 with │
00:00:24 #1820 [Verbose] > │ | US0_0 -> (* None *) │
00:00:24 #1821 [Verbose] > │ 0.0 │
00:00:24 #1822 [Verbose] > │ | US0_1(v21) -> (* Some *) │
00:00:24 #1823 [Verbose] > │ v21 │
00:00:24 #1824 [Verbose] > │ v8.[int v11] <- v23 │
00:00:24 #1825 [Verbose] > │ let v24 : int32 = v11 + 1 │
00:00:24 #1826 [Verbose] > │ v9.l0 <- v24 │
00:00:24 #1827 [Verbose] > │ () │
00:00:24 #1828 [Verbose] > │ let v25 : string = "velocity of bike (m/s)" │
00:00:24 #1829 [Verbose] > │ let v26 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:24 #1830 [Verbose] > │ (v25, v0, v8)|] │
00:00:24 #1831 [Verbose] > │ let v27 : (struct (string * (float []) * (float [])) []) = method4(v26) │
00:00:24 #1832 [Verbose] > │ let v28 : string = "bike velocity" │
00:00:24 #1833 [Verbose] > │ let v29 : string = "time (s)" │
00:00:24 #1834 [Verbose] > │ let v30 : string = "" │
00:00:24 #1835 [Verbose] > │ struct (v28, v29, v30, v27) │
00:00:24 #1836 [Verbose] > │ method0() │
00:00:24 #1837 [Verbose] > │ │
00:00:24 #1838 [Verbose] > │ │
00:00:24 #1839 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #1840 [Verbose] >
00:00:24 #1841 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:24 #1842 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:24 #1843 [Verbose] > │ ## velocity_ftv │
00:00:24 #1844 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #1845 [Verbose] >
00:00:24 #1846 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 #1847 [Verbose] > inl newton_second_tv m fs (t, v0) =
00:00:24 #1848 [Verbose] > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum
00:00:24 #1849 [Verbose] > inl acc = f_net / m
00:00:24 #1850 [Verbose] > 1, acc
00:00:24 #1851 [Verbose] >
00:00:24 #1852 [Verbose] > inl update_tv dt m fs (t, v0) =
00:00:24 #1853 [Verbose] > inl dtdt, dvdt = newton_second_tv m fs (t, v0)
00:00:24 #1854 [Verbose] > t + dtdt * dt, v0 + dvdt * dt
00:00:24 #1855 [Verbose] >
00:00:24 #1856 [Verbose] > inl velocity_ftv dt m tv0 fs t =
00:00:24 #1857 [Verbose] > stream.iterate (join update_tv dt m fs) tv0
00:00:24 #1858 [Verbose] > |> stream.try_item (t / dt |> math.round |> abs)
00:00:24 #1859 [Verbose] > |> optionm.map snd
00:00:24 #1860 [Verbose] > |> optionm'.default_value 0
00:00:25 #1861 [Verbose] >
00:00:25 #1862 [Verbose] > ╭─[ 218.25ms - stdout ]────────────────────────────────────────────────────────╮
00:00:25 #1863 [Verbose] > │ () │
00:00:25 #1864 [Verbose] > │ │
00:00:25 #1865 [Verbose] > │ │
00:00:25 #1866 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #1867 [Verbose] >
00:00:25 #1868 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:25 #1869 [Verbose] > // // test
00:00:25 #1870 [Verbose] >
00:00:25 #1871 [Verbose] > inl x = am'.init_series 0 100 0.1
00:00:25 #1872 [Verbose] > inl y =
00:00:25 #1873 [Verbose] > x
00:00:25 #1874 [Verbose] > |> am.map (
00:00:25 #1875 [Verbose] > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_,
00:00:25 #1876 [Verbose] > v) => f_air 2 1.225 0.5 v ]]
00:00:25 #1877 [Verbose] > )
00:00:25 #1878 [Verbose] > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)",
00:00:25 #1879 [Verbose] > x, y ]]
00:00:25 #1880 [Verbose] >
00:00:25 #1881 [Verbose] > ╭─[ 506.71ms - return value ]──────────────────────────────────────────────────╮
00:00:25 #1882 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:25 #1883 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:25 #1884 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:25 #1885 [Verbose] > │ stroke="none"/> │
00:00:25 #1886 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:25 #1887 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:25 #1888 [Verbose] > │ fill="#FFFFFF"> │
00:00:25 #1889 [Verbose] > │ pedaling and coasting with air │
00:00:25 #1890 [Verbose] > │ </text> │
00:00:25 #1891 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:25 #1892 [Verbose] > │ y2="75"/> │
00:00:25 #1893 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:25 #1894 [Verbose] > │ y2="75"/> │
00:00:25 #1895 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:25 #1896 [Verbose] > │ y2="75"/> │
00:00:25 #1897 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:25 #1898 [Verbose] > │ y2="75"/> │
00:00:25 #1899 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x... │
00:00:25 #1900 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #1901 [Verbose] >
00:00:25 #1902 [Verbose] > ╭─[ 517.19ms - stdout ]────────────────────────────────────────────────────────╮
00:00:25 #1903 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:25 #1904 [Verbose] > │ and UH0 = │
00:00:25 #1905 [Verbose] > │ | UH0_0 of float * float * (unit -> UH0) │
00:00:25 #1906 [Verbose] > │ | UH0_1 │
00:00:25 #1907 [Verbose] > │ and [<Struct>] US0 = │
00:00:25 #1908 [Verbose] > │ | US0_0 │
00:00:25 #1909 [Verbose] > │ | US0_1 of f1_0 : float * f1_1 : float │
00:00:25 #1910 [Verbose] > │ and [<Struct>] US1 = │
00:00:25 #1911 [Verbose] > │ | US1_0 │
00:00:25 #1912 [Verbose] > │ | US1_1 of f1_0 : float │
00:00:25 #1913 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:25 #1914 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:25 #1915 [Verbose] > │ let v2 : bool = v1 < 1001 │
00:00:25 #1916 [Verbose] > │ v2 │
00:00:25 #1917 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:25 #1918 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:25 #1919 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:25 #1920 [Verbose] > │ v3 │
00:00:25 #1921 [Verbose] > │ and closure0 () struct (v0 : float, v1 : float) : struct (float * float) = │
00:00:25 #1922 [Verbose] > │ let v2 : float = -v1 │
00:00:25 #1923 [Verbose] > │ let v3 : bool = v1 >= v2 │
00:00:25 #1924 [Verbose] > │ let v4 : float = │
00:00:25 #1925 [Verbose] > │ if v3 then │
00:00:25 #1926 [Verbose] > │ v1 │
00:00:25 #1927 [Verbose] > │ else │
00:00:25 #1928 [Verbose] > │ v2 │
00:00:25 #1929 [Verbose] > │ let v5 : float = -1.225 * v4 │
00:00:25 #1930 [Verbose] > │ let v6 : float = v5 * v1 │
00:00:25 #1931 [Verbose] > │ let v7 : float = v6 / 2.0 │
00:00:25 #1932 [Verbose] > │ let v8 : float = v0 / 20.0 │
00:00:25 #1933 [Verbose] > │ let v9 : int32 = int32 v8 │
00:00:25 #1934 [Verbose] > │ let v10 : float = float v9 │
00:00:25 #1935 [Verbose] > │ let v11 : float = v10 * 20.0 │
00:00:25 #1936 [Verbose] > │ let v12 : float = v0 - v11 │
00:00:25 #1937 [Verbose] > │ let v13 : bool = v12 > 0.0 │
00:00:25 #1938 [Verbose] > │ let v15 : bool = │
00:00:25 #1939 [Verbose] > │ if v13 then │
00:00:25 #1940 [Verbose] > │ let v14 : bool = v12 < 10.0 │
00:00:25 #1941 [Verbose] > │ v14 │
00:00:25 #1942 [Verbose] > │ else │
00:00:25 #1943 [Verbose] > │ false │
00:00:25 #1944 [Verbose] > │ let v16 : float = │
00:00:25 #1945 [Verbose] > │ if v15 then │
00:00:25 #1946 [Verbose] > │ 10.0 │
00:00:25 #1947 [Verbose] > │ else │
00:00:25 #1948 [Verbose] > │ 0.0 │
00:00:25 #1949 [Verbose] > │ let v17 : float = v16 + v7 │
00:00:25 #1950 [Verbose] > │ let v18 : float = v17 / 20.0 │
00:00:25 #1951 [Verbose] > │ let v19 : float = v0 + 0.1 │
00:00:25 #1952 [Verbose] > │ let v20 : float = v18 * 0.1 │
00:00:25 #1953 [Verbose] > │ let v21 : float = v1 + v20 │
00:00:25 #1954 [Verbose] > │ struct (v19, v21) │
00:00:25 #1955 [Verbose] > │ and method3 () : (struct (float * float) -> struct (float * float)) = │
00:00:25 #1956 [Verbose] > │ closure0() │
00:00:25 #1957 [Verbose] > │ and closure1 (v0 : (struct (float * float) -> struct (float * float)), v1 : │
00:00:25 #1958 [Verbose] > │ float, v2 : float, v3 : float, v4 : float) () : UH0 = │
00:00:25 #1959 [Verbose] > │ let struct (v5 : float, v6 : float) = v0 struct (v3, v4) │
00:00:25 #1960 [Verbose] > │ let v7 : (unit -> UH0) = closure1(v0, v1, v2, v5, v6) │
00:00:25 #1961 [Verbose] > │ UH0_0(v3, v4, v7) │
00:00:25 #1962 [Verbose] > │ and method4 (v0 : float, v1 : UH0) : US0 = │
00:00:25 #1963 [Verbose] > │ match v1 with │
00:00:25 #1964 [Verbose] > │ | UH0_0(v2, v3, v4) -> (* StreamCons *) │
00:00:25 #1965 [Verbose] > │ let v5 : bool = v0 <= 0.0 │
00:00:25 #1966 [Verbose] > │ if v5 then │
00:00:25 #1967 [Verbose] > │ US0_1(v2, v3) │
00:00:25 #1968 [Verbose] > │ else │
00:00:25 #1969 [Verbose] > │ let v7 : float = v0 - 1.0 │
00:00:25 #1970 [Verbose] > │ let v8 : UH0 = v4 () │
00:00:25 #1971 [Verbose] > │ method4(v7, v8) │
00:00:25 #1972 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:25 #1973 [Verbose] > │ US0_0 │
00:00:25 #1974 [Verbose] > │ and method5 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:25 #1975 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:25 #1976 [Verbose] > │ v0 │
00:00:25 #1977 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:25 #1978 [Verbose] > │ []) * (float [])) [])) = │
00:00:25 #1979 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (1001) │
00:00:25 #1980 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:25 #1981 [Verbose] > │ while method1(v1) do │
00:00:25 #1982 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:25 #1983 [Verbose] > │ let v4 : float = float v3 │
00:00:25 #1984 [Verbose] > │ let v5 : float = 0.1 * v4 │
00:00:25 #1985 [Verbose] > │ v0.[int v3] <- v5 │
00:00:25 #1986 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:25 #1987 [Verbose] > │ v1.l0 <- v6 │
00:00:25 #1988 [Verbose] > │ () │
00:00:25 #1989 [Verbose] > │ let v7 : float = 0.0 │
00:00:25 #1990 [Verbose] > │ let v8 : float = 0.0 │
00:00:25 #1991 [Verbose] > │ let v9 : int32 = v0.Length │
00:00:25 #1992 [Verbose] > │ let v10 : (float []) = Array.zeroCreate<float> (v9) │
00:00:25 #1993 [Verbose] > │ let v11 : Mut0 = {l0 = 0} : Mut0 │
00:00:25 #1994 [Verbose] > │ while method2(v9, v11) do │
00:00:25 #1995 [Verbose] > │ let v13 : int32 = v11.l0 │
00:00:25 #1996 [Verbose] > │ let v14 : float = v0.[int v13] │
00:00:25 #1997 [Verbose] > │ let v15 : (struct (float * float) -> struct (float * float)) = │
00:00:25 #1998 [Verbose] > │ method3() │
00:00:25 #1999 [Verbose] > │ let struct (v16 : float, v17 : float) = v15 struct (v7, v8) │
00:00:25 #2000 [Verbose] > │ let v18 : float = v14 / 0.1 │
00:00:25 #2001 [Verbose] > │ let v19 : float = round v18 │
00:00:25 #2002 [Verbose] > │ let v20 : float = -v19 │
00:00:25 #2003 [Verbose] > │ let v21 : bool = v19 >= v20 │
00:00:25 #2004 [Verbose] > │ let v22 : float = │
00:00:25 #2005 [Verbose] > │ if v21 then │
00:00:25 #2006 [Verbose] > │ v19 │
00:00:25 #2007 [Verbose] > │ else │
00:00:25 #2008 [Verbose] > │ v20 │
00:00:25 #2009 [Verbose] > │ let v23 : (unit -> UH0) = closure1(v15, v7, v8, v16, v17) │
00:00:25 #2010 [Verbose] > │ let v24 : UH0 = UH0_0(v7, v8, v23) │
00:00:25 #2011 [Verbose] > │ let v25 : US0 = method4(v22, v24) │
00:00:25 #2012 [Verbose] > │ let v31 : US1 = │
00:00:25 #2013 [Verbose] > │ match v25 with │
00:00:25 #2014 [Verbose] > │ | US0_0 -> (* None *) │
00:00:25 #2015 [Verbose] > │ US1_0 │
00:00:25 #2016 [Verbose] > │ | US0_1(v26, v27) -> (* Some *) │
00:00:25 #2017 [Verbose] > │ US1_1(v27) │
00:00:25 #2018 [Verbose] > │ let v34 : float = │
00:00:25 #2019 [Verbose] > │ match v31 with │
00:00:25 #2020 [Verbose] > │ | US1_0 -> (* None *) │
00:00:25 #2021 [Verbose] > │ 0.0 │
00:00:25 #2022 [Verbose] > │ | US1_1(v32) -> (* Some *) │
00:00:25 #2023 [Verbose] > │ v32 │
00:00:25 #2024 [Verbose] > │ v10.[int v13] <- v34 │
00:00:25 #2025 [Verbose] > │ let v35 : int32 = v13 + 1 │
00:00:25 #2026 [Verbose] > │ v11.l0 <- v35 │
00:00:25 #2027 [Verbose] > │ () │
00:00:25 #2028 [Verbose] > │ let v36 : string = "velocity of bike (m/s)" │
00:00:25 #2029 [Verbose] > │ let v37 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:25 #2030 [Verbose] > │ (v36, v0, v10)|] │
00:00:25 #2031 [Verbose] > │ let v38 : (struct (string * (float []) * (float [])) []) = method5(v37) │
00:00:25 #2032 [Verbose] > │ let v39 : string = "pedaling and coasting with air" │
00:00:25 #2033 [Verbose] > │ let v40 : string = "time (s)" │
00:00:25 #2034 [Verbose] > │ let v41 : string = "" │
00:00:25 #2035 [Verbose] > │ struct (v39, v40, v41, v38) │
00:00:25 #2036 [Verbose] > │ method0() │
00:00:25 #2037 [Verbose] > │ │
00:00:25 #2038 [Verbose] > │ │
00:00:25 #2039 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #2040 [Verbose] >
00:00:25 #2041 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:25 #2042 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:25 #2043 [Verbose] > │ ## velocity_ftxv │
00:00:25 #2044 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #2045 [Verbose] >
00:00:25 #2046 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:25 #2047 [Verbose] > nominal state_1d = time * position * velocity
00:00:25 #2048 [Verbose] > nominal rrr = f64 * f64 * f64
00:00:25 #2049 [Verbose] >
00:00:25 #2050 [Verbose] > inl newton_second_1d m fs (state_1d (t, x0, v0)) =
00:00:25 #2051 [Verbose] > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |>
00:00:25 #2052 [Verbose] > listm'.sum
00:00:25 #2053 [Verbose] > inl acc = f_net / m
00:00:25 #2054 [Verbose] > rrr (1f64, v0, acc)
00:00:25 #2055 [Verbose] >
00:00:25 #2056 [Verbose] > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:00:25 #2057 [Verbose] > inl (rrr (_, _, dvdt)) = deriv t
00:00:25 #2058 [Verbose] > inl t1 = t0 + dt
00:00:25 #2059 [Verbose] > inl x1 = x0 + v0 * dt
00:00:25 #2060 [Verbose] > inl v1 = v0 + dvdt * dt
00:00:25 #2061 [Verbose] > state_1d (t1, x1, v1)
00:00:25 #2062 [Verbose] >
00:00:25 #2063 [Verbose] > inl update_txv dt m fs =
00:00:25 #2064 [Verbose] > newton_second_1d m fs |> euler_1d dt
00:00:25 #2065 [Verbose] >
00:00:25 #2066 [Verbose] > inl states_txv dt m txv0 fs =
00:00:25 #2067 [Verbose] > seq.iterate_ (update_txv dt m fs) txv0
00:00:25 #2068 [Verbose] >
00:00:25 #2069 [Verbose] > inl velocity_1d sts t =
00:00:25 #2070 [Verbose] > inl (state_1d (t0, _, _)) = sts 0
00:00:25 #2071 [Verbose] > inl (state_1d (t1, _, _)) = sts 1
00:00:25 #2072 [Verbose] > inl dt = t1 - t0
00:00:25 #2073 [Verbose] > inl num_steps = t / dt |> math.round |> abs
00:00:25 #2074 [Verbose] > inl (state_1d (_, _, v0)) = sts num_steps
00:00:25 #2075 [Verbose] > v0
00:00:25 #2076 [Verbose] >
00:00:25 #2077 [Verbose] > inl velocity_ftxv dt m txv0 fs =
00:00:25 #2078 [Verbose] > states_txv dt m txv0 fs |> velocity_1d
00:00:25 #2079 [Verbose] >
00:00:25 #2080 [Verbose] > inl position_1d sts t =
00:00:25 #2081 [Verbose] > inl (state_1d (t0, _, _)) = sts 0
00:00:25 #2082 [Verbose] > inl (state_1d (t1, _, _)) = sts 1
00:00:25 #2083 [Verbose] > inl dt = t1 - t0
00:00:25 #2084 [Verbose] > inl num_steps = t / dt |> math.round |> abs
00:00:25 #2085 [Verbose] > inl (state_1d (_, x0, _)) = sts num_steps
00:00:25 #2086 [Verbose] > x0
00:00:25 #2087 [Verbose] >
00:00:25 #2088 [Verbose] > inl position_ftxv dt m txv0 fs =
00:00:25 #2089 [Verbose] > states_txv dt m txv0 fs |> position_1d
00:00:25 #2090 [Verbose] >
00:00:25 #2091 [Verbose] > inl spring_force k (state_1d (_, x0, _)) =
00:00:25 #2092 [Verbose] > -k * x0
00:00:25 #2093 [Verbose] >
00:00:25 #2094 [Verbose] > ╭─[ 201.78ms - stdout ]────────────────────────────────────────────────────────╮
00:00:25 #2095 [Verbose] > │ () │
00:00:25 #2096 [Verbose] > │ │
00:00:25 #2097 [Verbose] > │ │
00:00:25 #2098 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #2099 [Verbose] >
00:00:25 #2100 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:25 #2101 [Verbose] > // // test
00:00:25 #2102 [Verbose] >
00:00:25 #2103 [Verbose] > inl damped_ho_forces () =
00:00:25 #2104 [Verbose] > [[
00:00:25 #2105 [Verbose] > spring_force 0.8
00:00:25 #2106 [Verbose] > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0
00:00:25 #2107 [Verbose] > fun _ => -0.0027 * 9.80665
00:00:25 #2108 [Verbose] > ]]
00:00:25 #2109 [Verbose] >
00:00:25 #2110 [Verbose] > inl damped_ho_states () =
00:00:25 #2111 [Verbose] > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ())
00:00:25 #2112 [Verbose] >
00:00:25 #2113 [Verbose] > inl pingpong_position t =
00:00:25 #2114 [Verbose] > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:00:25 #2115 [Verbose] >
00:00:25 #2116 [Verbose] > inl x : a _ f64 = am'.init_series 0 3 0.01
00:00:25 #2117 [Verbose] > inl y = x |> am.map pingpong_position
00:00:25 #2118 [Verbose] > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]]
00:00:26 #2119 [Verbose] >
00:00:26 #2120 [Verbose] > ╭─[ 361.37ms - return value ]──────────────────────────────────────────────────╮
00:00:26 #2121 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:26 #2122 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:26 #2123 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:26 #2124 [Verbose] > │ stroke="none"/> │
00:00:26 #2125 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:26 #2126 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:26 #2127 [Verbose] > │ fill="#FFFFFF"> │
00:00:26 #2128 [Verbose] > │ ping pong ball on a slinky │
00:00:26 #2129 [Verbose] > │ </text> │
00:00:26 #2130 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:00:26 #2131 [Verbose] > │ y2="75"/> │
00:00:26 #2132 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:26 #2133 [Verbose] > │ y2="75"/> │
00:00:26 #2134 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:00:26 #2135 [Verbose] > │ y2="75"/> │
00:00:26 #2136 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:00:26 #2137 [Verbose] > │ y2="75"/> │
00:00:26 #2138 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="9... │
00:00:26 #2139 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2140 [Verbose] >
00:00:26 #2141 [Verbose] > ╭─[ 372.96ms - stdout ]────────────────────────────────────────────────────────╮
00:00:26 #2142 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:26 #2143 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:26 #2144 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:26 #2145 [Verbose] > │ let v2 : bool = v1 < 301 │
00:00:26 #2146 [Verbose] > │ v2 │
00:00:26 #2147 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:26 #2148 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:26 #2149 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:26 #2150 [Verbose] > │ v3 │
00:00:26 #2151 [Verbose] > │ and method3 (v0 : float, v1 : float, v2 : float, v3 : float) : struct (float │
00:00:26 #2152 [Verbose] > │ * float * float) = │
00:00:26 #2153 [Verbose] > │ let v4 : bool = v3 <= 0.0 │
00:00:26 #2154 [Verbose] > │ if v4 then │
00:00:26 #2155 [Verbose] > │ struct (v0, v1, v2) │
00:00:26 #2156 [Verbose] > │ else │
00:00:26 #2157 [Verbose] > │ let v5 : float = -v2 │
00:00:26 #2158 [Verbose] > │ let v6 : bool = v2 >= v5 │
00:00:26 #2159 [Verbose] > │ let v7 : float = │
00:00:26 #2160 [Verbose] > │ if v6 then │
00:00:26 #2161 [Verbose] > │ v2 │
00:00:26 #2162 [Verbose] > │ else │
00:00:26 #2163 [Verbose] > │ v5 │
00:00:26 #2164 [Verbose] > │ let v8 : float = -0.0030787608005179976 * v7 │
00:00:26 #2165 [Verbose] > │ let v9 : float = v8 * v2 │
00:00:26 #2166 [Verbose] > │ let v10 : float = v9 / 2.0 │
00:00:26 #2167 [Verbose] > │ let v11 : float = -0.8 * v1 │
00:00:26 #2168 [Verbose] > │ let v12 : float = v11 + v10 │
00:00:26 #2169 [Verbose] > │ let v13 : float = v12 + -0.026477955 │
00:00:26 #2170 [Verbose] > │ let v14 : float = v13 / 0.0027 │
00:00:26 #2171 [Verbose] > │ let v15 : float = v0 + 0.001 │
00:00:26 #2172 [Verbose] > │ let v16 : float = v2 * 0.001 │
00:00:26 #2173 [Verbose] > │ let v17 : float = v1 + v16 │
00:00:26 #2174 [Verbose] > │ let v18 : float = v14 * 0.001 │
00:00:26 #2175 [Verbose] > │ let v19 : float = v2 + v18 │
00:00:26 #2176 [Verbose] > │ let v20 : float = v3 - 1.0 │
00:00:26 #2177 [Verbose] > │ method3(v15, v17, v19, v20) │
00:00:26 #2178 [Verbose] > │ and method4 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:26 #2179 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:26 #2180 [Verbose] > │ v0 │
00:00:26 #2181 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:26 #2182 [Verbose] > │ []) * (float [])) [])) = │
00:00:26 #2183 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (301) │
00:00:26 #2184 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:26 #2185 [Verbose] > │ while method1(v1) do │
00:00:26 #2186 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:26 #2187 [Verbose] > │ let v4 : float = float v3 │
00:00:26 #2188 [Verbose] > │ let v5 : float = 0.01 * v4 │
00:00:26 #2189 [Verbose] > │ v0.[int v3] <- v5 │
00:00:26 #2190 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:26 #2191 [Verbose] > │ v1.l0 <- v6 │
00:00:26 #2192 [Verbose] > │ () │
00:00:26 #2193 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:26 #2194 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:26 #2195 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:26 #2196 [Verbose] > │ while method2(v7, v9) do │
00:00:26 #2197 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:26 #2198 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:26 #2199 [Verbose] > │ let v13 : float = 0.0 │
00:00:26 #2200 [Verbose] > │ let v14 : float = 0.1 │
00:00:26 #2201 [Verbose] > │ let v15 : float = 0.0 │
00:00:26 #2202 [Verbose] > │ let v16 : float = 0.0 │
00:00:26 #2203 [Verbose] > │ let struct (v17 : float, v18 : float, v19 : float) = method3(v13, │
00:00:26 #2204 [Verbose] > │ v14, v15, v16) │
00:00:26 #2205 [Verbose] > │ let v20 : float = 0.0 │
00:00:26 #2206 [Verbose] > │ let v21 : float = 0.1 │
00:00:26 #2207 [Verbose] > │ let v22 : float = 0.0 │
00:00:26 #2208 [Verbose] > │ let v23 : float = 1.0 │
00:00:26 #2209 [Verbose] > │ let struct (v24 : float, v25 : float, v26 : float) = method3(v20, │
00:00:26 #2210 [Verbose] > │ v21, v22, v23) │
00:00:26 #2211 [Verbose] > │ let v27 : float = v24 - v17 │
00:00:26 #2212 [Verbose] > │ let v28 : float = v12 / v27 │
00:00:26 #2213 [Verbose] > │ let v29 : float = round v28 │
00:00:26 #2214 [Verbose] > │ let v30 : float = -v29 │
00:00:26 #2215 [Verbose] > │ let v31 : bool = v29 >= v30 │
00:00:26 #2216 [Verbose] > │ let v32 : float = │
00:00:26 #2217 [Verbose] > │ if v31 then │
00:00:26 #2218 [Verbose] > │ v29 │
00:00:26 #2219 [Verbose] > │ else │
00:00:26 #2220 [Verbose] > │ v30 │
00:00:26 #2221 [Verbose] > │ let v33 : float = 0.0 │
00:00:26 #2222 [Verbose] > │ let v34 : float = 0.1 │
00:00:26 #2223 [Verbose] > │ let v35 : float = 0.0 │
00:00:26 #2224 [Verbose] > │ let struct (v36 : float, v37 : float, v38 : float) = method3(v33, │
00:00:26 #2225 [Verbose] > │ v34, v35, v32) │
00:00:26 #2226 [Verbose] > │ v8.[int v11] <- v37 │
00:00:26 #2227 [Verbose] > │ let v39 : int32 = v11 + 1 │
00:00:26 #2228 [Verbose] > │ v9.l0 <- v39 │
00:00:26 #2229 [Verbose] > │ () │
00:00:26 #2230 [Verbose] > │ let v40 : string = "position (m)" │
00:00:26 #2231 [Verbose] > │ let v41 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:26 #2232 [Verbose] > │ (v40, v0, v8)|] │
00:00:26 #2233 [Verbose] > │ let v42 : (struct (string * (float []) * (float [])) []) = method4(v41) │
00:00:26 #2234 [Verbose] > │ let v43 : string = "ping pong ball on a slinky" │
00:00:26 #2235 [Verbose] > │ let v44 : string = "time (s)" │
00:00:26 #2236 [Verbose] > │ let v45 : string = "" │
00:00:26 #2237 [Verbose] > │ struct (v43, v44, v45, v42) │
00:00:26 #2238 [Verbose] > │ method0() │
00:00:26 #2239 [Verbose] > │ │
00:00:26 #2240 [Verbose] > │ │
00:00:26 #2241 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2242 [Verbose] >
00:00:26 #2243 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 #2244 [Verbose] > // // test
00:00:26 #2245 [Verbose] >
00:00:26 #2246 [Verbose] > inl pingpong_velocity t =
00:00:26 #2247 [Verbose] > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:00:26 #2248 [Verbose] >
00:00:26 #2249 [Verbose] > inl x = am'.init_series 0 3 0.01
00:00:26 #2250 [Verbose] > inl y = x |> am.map pingpong_velocity
00:00:26 #2251 [Verbose] > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]]
00:00:26 #2252 [Verbose] >
00:00:26 #2253 [Verbose] > ╭─[ 305.41ms - return value ]──────────────────────────────────────────────────╮
00:00:26 #2254 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:26 #2255 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:26 #2256 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:26 #2257 [Verbose] > │ stroke="none"/> │
00:00:26 #2258 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:26 #2259 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:26 #2260 [Verbose] > │ fill="#FFFFFF"> │
00:00:26 #2261 [Verbose] > │ ping pong ball on a slinky │
00:00:26 #2262 [Verbose] > │ </text> │
00:00:26 #2263 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:00:26 #2264 [Verbose] > │ y2="75"/> │
00:00:26 #2265 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:26 #2266 [Verbose] > │ y2="75"/> │
00:00:26 #2267 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:00:26 #2268 [Verbose] > │ y2="75"/> │
00:00:26 #2269 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:00:26 #2270 [Verbose] > │ y2="75"/> │
00:00:26 #2271 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="9... │
00:00:26 #2272 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2273 [Verbose] >
00:00:26 #2274 [Verbose] > ╭─[ 315.79ms - stdout ]────────────────────────────────────────────────────────╮
00:00:26 #2275 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:26 #2276 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:26 #2277 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:26 #2278 [Verbose] > │ let v2 : bool = v1 < 301 │
00:00:26 #2279 [Verbose] > │ v2 │
00:00:26 #2280 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:26 #2281 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:26 #2282 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:26 #2283 [Verbose] > │ v3 │
00:00:26 #2284 [Verbose] > │ and method3 (v0 : float, v1 : float, v2 : float, v3 : float) : struct (float │
00:00:26 #2285 [Verbose] > │ * float * float) = │
00:00:26 #2286 [Verbose] > │ let v4 : bool = v3 <= 0.0 │
00:00:26 #2287 [Verbose] > │ if v4 then │
00:00:26 #2288 [Verbose] > │ struct (v0, v1, v2) │
00:00:26 #2289 [Verbose] > │ else │
00:00:26 #2290 [Verbose] > │ let v5 : float = -v2 │
00:00:26 #2291 [Verbose] > │ let v6 : bool = v2 >= v5 │
00:00:26 #2292 [Verbose] > │ let v7 : float = │
00:00:26 #2293 [Verbose] > │ if v6 then │
00:00:26 #2294 [Verbose] > │ v2 │
00:00:26 #2295 [Verbose] > │ else │
00:00:26 #2296 [Verbose] > │ v5 │
00:00:26 #2297 [Verbose] > │ let v8 : float = -0.0030787608005179976 * v7 │
00:00:26 #2298 [Verbose] > │ let v9 : float = v8 * v2 │
00:00:26 #2299 [Verbose] > │ let v10 : float = v9 / 2.0 │
00:00:26 #2300 [Verbose] > │ let v11 : float = -0.8 * v1 │
00:00:26 #2301 [Verbose] > │ let v12 : float = v11 + v10 │
00:00:26 #2302 [Verbose] > │ let v13 : float = v12 + -0.026477955 │
00:00:26 #2303 [Verbose] > │ let v14 : float = v13 / 0.0027 │
00:00:26 #2304 [Verbose] > │ let v15 : float = v0 + 0.001 │
00:00:26 #2305 [Verbose] > │ let v16 : float = v2 * 0.001 │
00:00:26 #2306 [Verbose] > │ let v17 : float = v1 + v16 │
00:00:26 #2307 [Verbose] > │ let v18 : float = v14 * 0.001 │
00:00:26 #2308 [Verbose] > │ let v19 : float = v2 + v18 │
00:00:26 #2309 [Verbose] > │ let v20 : float = v3 - 1.0 │
00:00:26 #2310 [Verbose] > │ method3(v15, v17, v19, v20) │
00:00:26 #2311 [Verbose] > │ and method4 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:26 #2312 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:26 #2313 [Verbose] > │ v0 │
00:00:26 #2314 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:26 #2315 [Verbose] > │ []) * (float [])) [])) = │
00:00:26 #2316 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (301) │
00:00:26 #2317 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:26 #2318 [Verbose] > │ while method1(v1) do │
00:00:26 #2319 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:26 #2320 [Verbose] > │ let v4 : float = float v3 │
00:00:26 #2321 [Verbose] > │ let v5 : float = 0.01 * v4 │
00:00:26 #2322 [Verbose] > │ v0.[int v3] <- v5 │
00:00:26 #2323 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:26 #2324 [Verbose] > │ v1.l0 <- v6 │
00:00:26 #2325 [Verbose] > │ () │
00:00:26 #2326 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:26 #2327 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:26 #2328 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:26 #2329 [Verbose] > │ while method2(v7, v9) do │
00:00:26 #2330 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:26 #2331 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:26 #2332 [Verbose] > │ let v13 : float = 0.0 │
00:00:26 #2333 [Verbose] > │ let v14 : float = 0.1 │
00:00:26 #2334 [Verbose] > │ let v15 : float = 0.0 │
00:00:26 #2335 [Verbose] > │ let v16 : float = 0.0 │
00:00:26 #2336 [Verbose] > │ let struct (v17 : float, v18 : float, v19 : float) = method3(v13, │
00:00:26 #2337 [Verbose] > │ v14, v15, v16) │
00:00:26 #2338 [Verbose] > │ let v20 : float = 0.0 │
00:00:26 #2339 [Verbose] > │ let v21 : float = 0.1 │
00:00:26 #2340 [Verbose] > │ let v22 : float = 0.0 │
00:00:26 #2341 [Verbose] > │ let v23 : float = 1.0 │
00:00:26 #2342 [Verbose] > │ let struct (v24 : float, v25 : float, v26 : float) = method3(v20, │
00:00:26 #2343 [Verbose] > │ v21, v22, v23) │
00:00:26 #2344 [Verbose] > │ let v27 : float = v24 - v17 │
00:00:26 #2345 [Verbose] > │ let v28 : float = v12 / v27 │
00:00:26 #2346 [Verbose] > │ let v29 : float = round v28 │
00:00:26 #2347 [Verbose] > │ let v30 : float = -v29 │
00:00:26 #2348 [Verbose] > │ let v31 : bool = v29 >= v30 │
00:00:26 #2349 [Verbose] > │ let v32 : float = │
00:00:26 #2350 [Verbose] > │ if v31 then │
00:00:26 #2351 [Verbose] > │ v29 │
00:00:26 #2352 [Verbose] > │ else │
00:00:26 #2353 [Verbose] > │ v30 │
00:00:26 #2354 [Verbose] > │ let v33 : float = 0.0 │
00:00:26 #2355 [Verbose] > │ let v34 : float = 0.1 │
00:00:26 #2356 [Verbose] > │ let v35 : float = 0.0 │
00:00:26 #2357 [Verbose] > │ let struct (v36 : float, v37 : float, v38 : float) = method3(v33, │
00:00:26 #2358 [Verbose] > │ v34, v35, v32) │
00:00:26 #2359 [Verbose] > │ v8.[int v11] <- v38 │
00:00:26 #2360 [Verbose] > │ let v39 : int32 = v11 + 1 │
00:00:26 #2361 [Verbose] > │ v9.l0 <- v39 │
00:00:26 #2362 [Verbose] > │ () │
00:00:26 #2363 [Verbose] > │ let v40 : string = "velocity (m/s)" │
00:00:26 #2364 [Verbose] > │ let v41 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:26 #2365 [Verbose] > │ (v40, v0, v8)|] │
00:00:26 #2366 [Verbose] > │ let v42 : (struct (string * (float []) * (float [])) []) = method4(v41) │
00:00:26 #2367 [Verbose] > │ let v43 : string = "ping pong ball on a slinky" │
00:00:26 #2368 [Verbose] > │ let v44 : string = "time (s)" │
00:00:26 #2369 [Verbose] > │ let v45 : string = "" │
00:00:26 #2370 [Verbose] > │ struct (v43, v44, v45, v42) │
00:00:26 #2371 [Verbose] > │ method0() │
00:00:26 #2372 [Verbose] > │ │
00:00:26 #2373 [Verbose] > │ │
00:00:26 #2374 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2375 [Verbose] >
00:00:26 #2376 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:26 #2377 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:26 #2378 [Verbose] > │ ## shift │
00:00:26 #2379 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2380 [Verbose] >
00:00:26 #2381 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 #2382 [Verbose] > type update_function s = s -> s
00:00:26 #2383 [Verbose] >
00:00:26 #2384 [Verbose] > type differential_equation s ds = s -> ds
00:00:26 #2385 [Verbose] >
00:00:26 #2386 [Verbose] > type numerical_method s ds = differential_equation s ds -> update_function s
00:00:26 #2387 [Verbose] >
00:00:26 #2388 [Verbose] >
00:00:26 #2389 [Verbose] > inl solver method =
00:00:26 #2390 [Verbose] > method >> seq.iterate
00:00:26 #2391 [Verbose] > inl solver' method =
00:00:26 #2392 [Verbose] > method >> seq.iterate'
00:00:26 #2393 [Verbose] > inl solver_ method =
00:00:26 #2394 [Verbose] > method >> seq.iterate_
00:00:26 #2395 [Verbose] >
00:00:26 #2396 [Verbose] >
00:00:26 #2397 [Verbose] > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:00:26 #2398 [Verbose] > inl (rrr (_, _, dvdt)) = deriv t
00:00:26 #2399 [Verbose] > inl t1 = t0 + dt
00:00:26 #2400 [Verbose] > inl v1 = v0 + dvdt * dt
00:00:26 #2401 [Verbose] > inl x1 = x0 + v1 * dt
00:00:26 #2402 [Verbose] > state_1d (t1, x1, v1)
00:00:26 #2403 [Verbose] >
00:00:26 #2404 [Verbose] > inl update_txv_ec dt m fs =
00:00:26 #2405 [Verbose] > euler_cromer_1d dt (newton_second_1d m fs)
00:00:26 #2406 [Verbose] >
00:00:26 #2407 [Verbose] > prototype (+++) ds : ds -> ds -> ds
00:00:26 #2408 [Verbose] > prototype scale ds : f64 -> ds -> ds
00:00:26 #2409 [Verbose] >
00:00:26 #2410 [Verbose] > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1))
00:00:26 #2411 [Verbose] > =>
00:00:26 #2412 [Verbose] > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1)
00:00:26 #2413 [Verbose] >
00:00:26 #2414 [Verbose] > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) =>
00:00:26 #2415 [Verbose] > rrr (w * dtdt0, w * dxdt0, w * dvdt0)
00:00:26 #2416 [Verbose] >
00:00:26 #2417 [Verbose] > prototype shift s : forall ds. f64 -> ds -> s -> s
00:00:26 #2418 [Verbose] >
00:00:26 #2419 [Verbose] > instance shift state_1d = fun dt ds (state_1d (t, x, v)) =>
00:00:26 #2420 [Verbose] > inl dtdt, dxdt, dvdt =
00:00:26 #2421 [Verbose] > real
00:00:26 #2422 [Verbose] > match ds with
00:00:26 #2423 [Verbose] > | rrr x => x
00:00:26 #2424 [Verbose] > | state_1d x => x
00:00:26 #2425 [Verbose] > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt)
00:00:26 #2426 [Verbose] >
00:00:26 #2427 [Verbose] > inl euler dt deriv st0 =
00:00:26 #2428 [Verbose] > shift dt (deriv st0) st0
00:00:26 #2429 [Verbose] >
00:00:26 #2430 [Verbose] > inl runge_kutta_4 dt deriv st0 =
00:00:26 #2431 [Verbose] > inl m0 = deriv st0
00:00:26 #2432 [Verbose] > inl m1 = deriv (shift (dt / 2) m0 st0)
00:00:26 #2433 [Verbose] > inl m2 = deriv (shift (dt / 2) m1 st0)
00:00:26 #2434 [Verbose] > inl m3 = deriv (shift dt m2 st0)
00:00:26 #2435 [Verbose] > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0
00:00:26 #2436 [Verbose] >
00:00:26 #2437 [Verbose] > inl exponential (_, x0, v0) =
00:00:26 #2438 [Verbose] > 1f64, v0, x0
00:00:26 #2439 [Verbose] >
00:00:26 #2440 [Verbose] > inl of_state_1d (state_1d (t, x, v)) =
00:00:26 #2441 [Verbose] > t, x, v
00:00:26 #2442 [Verbose] >
00:00:26 #2443 [Verbose] > ╭─[ 228.20ms - stdout ]────────────────────────────────────────────────────────╮
00:00:26 #2444 [Verbose] > │ () │
00:00:26 #2445 [Verbose] > │ │
00:00:26 #2446 [Verbose] > │ │
00:00:26 #2447 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:26 #2448 [Verbose] >
00:00:26 #2449 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:26 #2450 [Verbose] > // // test
00:00:26 #2451 [Verbose] >
00:00:26 #2452 [Verbose] > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1,
00:00:26 #2453 [Verbose] > 1)) 800i32
00:00:26 #2454 [Verbose] > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326,
00:00:26 #2455 [Verbose] > 2864.8311229272326))
00:00:26 #2456 [Verbose] >
00:00:26 #2457 [Verbose] > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0,
00:00:26 #2458 [Verbose] > 1, 1)) 80i32
00:00:26 #2459 [Verbose] > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009,
00:00:26 #2460 [Verbose] > 2895.0121485099035))
00:00:26 #2461 [Verbose] >
00:00:26 #2462 [Verbose] > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1,
00:00:26 #2463 [Verbose] > 1)) 8i32
00:00:26 #2464 [Verbose] > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849))
00:00:27 #2465 [Verbose] >
00:00:27 #2466 [Verbose] > ╭─[ 358.91ms - stdout ]────────────────────────────────────────────────────────╮
00:00:27 #2467 [Verbose] > │ let rec method1 () : bool = │
00:00:27 #2468 [Verbose] > │ true │
00:00:27 #2469 [Verbose] > │ and method0 () : unit = │
00:00:27 #2470 [Verbose] > │ let v0 : bool = method1() │
00:00:27 #2471 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (7.999999999999874, │
00:00:27 #2472 [Verbose] > │ 2864.8311229272326, 2864.8311229272326)} / expected: %A{struct │
00:00:27 #2473 [Verbose] > │ (7.999999999999874, 2864.8311229272326, 2864.8311229272326)}" │
00:00:27 #2474 [Verbose] > │ let v2 : bool = v0 = false │
00:00:27 #2475 [Verbose] > │ if v2 then │
00:00:27 #2476 [Verbose] > │ failwith<unit> v1 │
00:00:27 #2477 [Verbose] > │ let v3 : bool = method1() │
00:00:27 #2478 [Verbose] > │ let v4 : string = $"__expect / actual: %A{struct (7.999999999999988, │
00:00:27 #2479 [Verbose] > │ 3043.379244966009, 2895.0121485099035)} / expected: %A{struct │
00:00:27 #2480 [Verbose] > │ (7.999999999999988, 3043.379244966009, 2895.0121485099035)}" │
00:00:27 #2481 [Verbose] > │ let v5 : bool = v3 = false │
00:00:27 #2482 [Verbose] > │ if v5 then │
00:00:27 #2483 [Verbose] > │ failwith<unit> v4 │
00:00:27 #2484 [Verbose] > │ let v6 : bool = method1() │
00:00:27 #2485 [Verbose] > │ let v7 : string = $"__expect / actual: %A{struct (8.0, │
00:00:27 #2486 [Verbose] > │ 2894.789038540849, 2894.789038540849)} / expected: %A{struct (8.0, │
00:00:27 #2487 [Verbose] > │ 2894.789038540849, 2894.789038540849)}" │
00:00:27 #2488 [Verbose] > │ let v8 : bool = v6 = false │
00:00:27 #2489 [Verbose] > │ if v8 then │
00:00:27 #2490 [Verbose] > │ failwith<unit> v7 │
00:00:27 #2491 [Verbose] > │ method0() │
00:00:27 #2492 [Verbose] > │ │
00:00:27 #2493 [Verbose] > │ │
00:00:27 #2494 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2495 [Verbose] >
00:00:27 #2496 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:27 #2497 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:27 #2498 [Verbose] > │ ## vec │
00:00:27 #2499 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2500 [Verbose] >
00:00:27 #2501 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:27 #2502 [Verbose] > type vec =
00:00:27 #2503 [Verbose] > {
00:00:27 #2504 [Verbose] > x : f64
00:00:27 #2505 [Verbose] > y : f64
00:00:27 #2506 [Verbose] > z : f64
00:00:27 #2507 [Verbose] > }
00:00:27 #2508 [Verbose] >
00:00:27 #2509 [Verbose] > inl vec x y z : vec =
00:00:27 #2510 [Verbose] > { x y z }
00:00:27 #2511 [Verbose] >
00:00:27 #2512 [Verbose] > ╭─[ 175.68ms - stdout ]────────────────────────────────────────────────────────╮
00:00:27 #2513 [Verbose] > │ () │
00:00:27 #2514 [Verbose] > │ │
00:00:27 #2515 [Verbose] > │ │
00:00:27 #2516 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2517 [Verbose] >
00:00:27 #2518 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:27 #2519 [Verbose] > // // test
00:00:27 #2520 [Verbose] >
00:00:27 #2521 [Verbose] > vec 1 2 3 .z
00:00:27 #2522 [Verbose] > |> _assert_eq 3
00:00:27 #2523 [Verbose] >
00:00:27 #2524 [Verbose] > ╭─[ 239.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:27 #2525 [Verbose] > │ let rec method1 () : bool = │
00:00:27 #2526 [Verbose] > │ true │
00:00:27 #2527 [Verbose] > │ and method0 () : unit = │
00:00:27 #2528 [Verbose] > │ let v0 : bool = method1() │
00:00:27 #2529 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3.0} / expected: %A{3.0}" │
00:00:27 #2530 [Verbose] > │ let v2 : bool = v0 = false │
00:00:27 #2531 [Verbose] > │ if v2 then │
00:00:27 #2532 [Verbose] > │ failwith<unit> v1 │
00:00:27 #2533 [Verbose] > │ method0() │
00:00:27 #2534 [Verbose] > │ │
00:00:27 #2535 [Verbose] > │ │
00:00:27 #2536 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2537 [Verbose] >
00:00:27 #2538 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:27 #2539 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:27 #2540 [Verbose] > │ ### consts │
00:00:27 #2541 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2542 [Verbose] >
00:00:27 #2543 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:27 #2544 [Verbose] > inl i_hat () = vec 1 0 0
00:00:27 #2545 [Verbose] > inl j_hat () = vec 0 1 0
00:00:27 #2546 [Verbose] > inl k_hat () = vec 0 0 1
00:00:27 #2547 [Verbose] > inl zero_vec () = vec 0 0 0
00:00:27 #2548 [Verbose] >
00:00:27 #2549 [Verbose] > ╭─[ 215.04ms - stdout ]────────────────────────────────────────────────────────╮
00:00:27 #2550 [Verbose] > │ () │
00:00:27 #2551 [Verbose] > │ │
00:00:27 #2552 [Verbose] > │ │
00:00:27 #2553 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2554 [Verbose] >
00:00:27 #2555 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:27 #2556 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:27 #2557 [Verbose] > │ ### ^+^ │
00:00:27 #2558 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:27 #2559 [Verbose] >
00:00:27 #2560 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:27 #2561 [Verbose] > inl (^+^) (a : vec) (b : vec) =
00:00:27 #2562 [Verbose] > vec (a.x + b.x) (a.y + b.y) (a.z + b.z)
00:00:28 #2563 [Verbose] >
00:00:28 #2564 [Verbose] > ╭─[ 211.00ms - stdout ]────────────────────────────────────────────────────────╮
00:00:28 #2565 [Verbose] > │ () │
00:00:28 #2566 [Verbose] > │ │
00:00:28 #2567 [Verbose] > │ │
00:00:28 #2568 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2569 [Verbose] >
00:00:28 #2570 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:28 #2571 [Verbose] > // // test
00:00:28 #2572 [Verbose] >
00:00:28 #2573 [Verbose] > vec 1 2 3 ^+^ vec 4 5 6
00:00:28 #2574 [Verbose] > |> _assert_eq (vec 5 7 9)
00:00:28 #2575 [Verbose] >
00:00:28 #2576 [Verbose] > ╭─[ 223.89ms - stdout ]────────────────────────────────────────────────────────╮
00:00:28 #2577 [Verbose] > │ let rec method1 () : bool = │
00:00:28 #2578 [Verbose] > │ true │
00:00:28 #2579 [Verbose] > │ and method0 () : unit = │
00:00:28 #2580 [Verbose] > │ let v0 : bool = method1() │
00:00:28 #2581 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5.0, 7.0, 9.0)} / │
00:00:28 #2582 [Verbose] > │ expected: %A{struct (5.0, 7.0, 9.0)}" │
00:00:28 #2583 [Verbose] > │ let v2 : bool = v0 = false │
00:00:28 #2584 [Verbose] > │ if v2 then │
00:00:28 #2585 [Verbose] > │ failwith<unit> v1 │
00:00:28 #2586 [Verbose] > │ method0() │
00:00:28 #2587 [Verbose] > │ │
00:00:28 #2588 [Verbose] > │ │
00:00:28 #2589 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2590 [Verbose] >
00:00:28 #2591 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 #2592 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 #2593 [Verbose] > │ ### sum_vec │
00:00:28 #2594 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2595 [Verbose] >
00:00:28 #2596 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:28 #2597 [Verbose] > inl sum_vec vs =
00:00:28 #2598 [Verbose] > vs |> listm.fold (^+^) (zero_vec ())
00:00:28 #2599 [Verbose] >
00:00:28 #2600 [Verbose] > ╭─[ 257.92ms - stdout ]────────────────────────────────────────────────────────╮
00:00:28 #2601 [Verbose] > │ () │
00:00:28 #2602 [Verbose] > │ │
00:00:28 #2603 [Verbose] > │ │
00:00:28 #2604 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2605 [Verbose] >
00:00:28 #2606 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:28 #2607 [Verbose] > // // test
00:00:28 #2608 [Verbose] >
00:00:28 #2609 [Verbose] > [[ vec 1 2 3; vec 4 5 6 ]]
00:00:28 #2610 [Verbose] > |> sum_vec
00:00:28 #2611 [Verbose] > |> _assert_eq (vec 5 7 9)
00:00:28 #2612 [Verbose] >
00:00:28 #2613 [Verbose] > ╭─[ 237.76ms - stdout ]────────────────────────────────────────────────────────╮
00:00:28 #2614 [Verbose] > │ let rec method1 () : bool = │
00:00:28 #2615 [Verbose] > │ true │
00:00:28 #2616 [Verbose] > │ and method0 () : unit = │
00:00:28 #2617 [Verbose] > │ let v0 : bool = method1() │
00:00:28 #2618 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5.0, 7.0, 9.0)} / │
00:00:28 #2619 [Verbose] > │ expected: %A{struct (5.0, 7.0, 9.0)}" │
00:00:28 #2620 [Verbose] > │ let v2 : bool = v0 = false │
00:00:28 #2621 [Verbose] > │ if v2 then │
00:00:28 #2622 [Verbose] > │ failwith<unit> v1 │
00:00:28 #2623 [Verbose] > │ method0() │
00:00:28 #2624 [Verbose] > │ │
00:00:28 #2625 [Verbose] > │ │
00:00:28 #2626 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2627 [Verbose] >
00:00:28 #2628 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:28 #2629 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:28 #2630 [Verbose] > │ ### *^ │
00:00:28 #2631 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:28 #2632 [Verbose] >
00:00:28 #2633 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:28 #2634 [Verbose] > inl (*^) c { x y z } =
00:00:28 #2635 [Verbose] > vec (c * x) (c * y) (c * z)
00:00:29 #2636 [Verbose] >
00:00:29 #2637 [Verbose] > ╭─[ 219.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:29 #2638 [Verbose] > │ () │
00:00:29 #2639 [Verbose] > │ │
00:00:29 #2640 [Verbose] > │ │
00:00:29 #2641 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 #2642 [Verbose] >
00:00:29 #2643 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:29 #2644 [Verbose] > // // test
00:00:29 #2645 [Verbose] >
00:00:29 #2646 [Verbose] > 5 *^ vec 1 2 3
00:00:29 #2647 [Verbose] > |> _assert_eq (vec 5 10 15)
00:00:29 #2648 [Verbose] >
00:00:29 #2649 [Verbose] > ╭─[ 290.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:29 #2650 [Verbose] > │ let rec method1 () : bool = │
00:00:29 #2651 [Verbose] > │ true │
00:00:29 #2652 [Verbose] > │ and method0 () : unit = │
00:00:29 #2653 [Verbose] > │ let v0 : bool = method1() │
00:00:29 #2654 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5.0, 10.0, 15.0)} / │
00:00:29 #2655 [Verbose] > │ expected: %A{struct (5.0, 10.0, 15.0)}" │
00:00:29 #2656 [Verbose] > │ let v2 : bool = v0 = false │
00:00:29 #2657 [Verbose] > │ if v2 then │
00:00:29 #2658 [Verbose] > │ failwith<unit> v1 │
00:00:29 #2659 [Verbose] > │ method0() │
00:00:29 #2660 [Verbose] > │ │
00:00:29 #2661 [Verbose] > │ │
00:00:29 #2662 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 #2663 [Verbose] >
00:00:29 #2664 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:29 #2665 [Verbose] > // // test
00:00:29 #2666 [Verbose] >
00:00:29 #2667 [Verbose] > 3 *^ i_hat () ^+^ 4 *^ k_hat ()
00:00:29 #2668 [Verbose] > |> _assert_eq (vec 3 0 4)
00:00:29 #2669 [Verbose] >
00:00:29 #2670 [Verbose] > ╭─[ 253.66ms - stdout ]────────────────────────────────────────────────────────╮
00:00:29 #2671 [Verbose] > │ let rec method1 () : bool = │
00:00:29 #2672 [Verbose] > │ true │
00:00:29 #2673 [Verbose] > │ and method0 () : unit = │
00:00:29 #2674 [Verbose] > │ let v0 : bool = method1() │
00:00:29 #2675 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (3.0, 0.0, 4.0)} / │
00:00:29 #2676 [Verbose] > │ expected: %A{struct (3.0, 0.0, 4.0)}" │
00:00:29 #2677 [Verbose] > │ let v2 : bool = v0 = false │
00:00:29 #2678 [Verbose] > │ if v2 then │
00:00:29 #2679 [Verbose] > │ failwith<unit> v1 │
00:00:29 #2680 [Verbose] > │ method0() │
00:00:29 #2681 [Verbose] > │ │
00:00:29 #2682 [Verbose] > │ │
00:00:29 #2683 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 #2684 [Verbose] >
00:00:29 #2685 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:29 #2686 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:29 #2687 [Verbose] > │ ### ^* │
00:00:29 #2688 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 #2689 [Verbose] >
00:00:29 #2690 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:29 #2691 [Verbose] > inl (^*) v c =
00:00:29 #2692 [Verbose] > (*^) c v
00:00:29 #2693 [Verbose] >
00:00:29 #2694 [Verbose] > ╭─[ 269.31ms - stdout ]────────────────────────────────────────────────────────╮
00:00:29 #2695 [Verbose] > │ () │
00:00:29 #2696 [Verbose] > │ │
00:00:29 #2697 [Verbose] > │ │
00:00:29 #2698 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:29 #2699 [Verbose] >
00:00:29 #2700 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:29 #2701 [Verbose] > // // test
00:00:29 #2702 [Verbose] >
00:00:29 #2703 [Verbose] > vec 1 2 3 ^* 5
00:00:29 #2704 [Verbose] > |> _assert_eq (vec 5 10 15)
00:00:30 #2705 [Verbose] >
00:00:30 #2706 [Verbose] > ╭─[ 217.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:30 #2707 [Verbose] > │ let rec method1 () : bool = │
00:00:30 #2708 [Verbose] > │ true │
00:00:30 #2709 [Verbose] > │ and method0 () : unit = │
00:00:30 #2710 [Verbose] > │ let v0 : bool = method1() │
00:00:30 #2711 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (5.0, 10.0, 15.0)} / │
00:00:30 #2712 [Verbose] > │ expected: %A{struct (5.0, 10.0, 15.0)}" │
00:00:30 #2713 [Verbose] > │ let v2 : bool = v0 = false │
00:00:30 #2714 [Verbose] > │ if v2 then │
00:00:30 #2715 [Verbose] > │ failwith<unit> v1 │
00:00:30 #2716 [Verbose] > │ method0() │
00:00:30 #2717 [Verbose] > │ │
00:00:30 #2718 [Verbose] > │ │
00:00:30 #2719 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2720 [Verbose] >
00:00:30 #2721 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:30 #2722 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:30 #2723 [Verbose] > │ ### ^/ │
00:00:30 #2724 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2725 [Verbose] >
00:00:30 #2726 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 #2727 [Verbose] > inl (^/) { x y z } c =
00:00:30 #2728 [Verbose] > vec (x / c) (y / c) (z / c)
00:00:30 #2729 [Verbose] >
00:00:30 #2730 [Verbose] > ╭─[ 252.29ms - stdout ]────────────────────────────────────────────────────────╮
00:00:30 #2731 [Verbose] > │ () │
00:00:30 #2732 [Verbose] > │ │
00:00:30 #2733 [Verbose] > │ │
00:00:30 #2734 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2735 [Verbose] >
00:00:30 #2736 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 #2737 [Verbose] > // // test
00:00:30 #2738 [Verbose] >
00:00:30 #2739 [Verbose] > vec 1 2 3 ^/ 5
00:00:30 #2740 [Verbose] > |> _assert_eq (vec 0.2 0.4 0.6)
00:00:30 #2741 [Verbose] >
00:00:30 #2742 [Verbose] > ╭─[ 207.56ms - stdout ]────────────────────────────────────────────────────────╮
00:00:30 #2743 [Verbose] > │ let rec method1 () : bool = │
00:00:30 #2744 [Verbose] > │ true │
00:00:30 #2745 [Verbose] > │ and method0 () : unit = │
00:00:30 #2746 [Verbose] > │ let v0 : bool = method1() │
00:00:30 #2747 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (0.2, 0.4, 0.6)} / │
00:00:30 #2748 [Verbose] > │ expected: %A{struct (0.2, 0.4, 0.6)}" │
00:00:30 #2749 [Verbose] > │ let v2 : bool = v0 = false │
00:00:30 #2750 [Verbose] > │ if v2 then │
00:00:30 #2751 [Verbose] > │ failwith<unit> v1 │
00:00:30 #2752 [Verbose] > │ method0() │
00:00:30 #2753 [Verbose] > │ │
00:00:30 #2754 [Verbose] > │ │
00:00:30 #2755 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2756 [Verbose] >
00:00:30 #2757 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:30 #2758 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:30 #2759 [Verbose] > │ ### negate_vec │
00:00:30 #2760 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2761 [Verbose] >
00:00:30 #2762 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 #2763 [Verbose] > inl negate_vec v =
00:00:30 #2764 [Verbose] > v ^* -1
00:00:30 #2765 [Verbose] >
00:00:30 #2766 [Verbose] > ╭─[ 182.18ms - stdout ]────────────────────────────────────────────────────────╮
00:00:30 #2767 [Verbose] > │ () │
00:00:30 #2768 [Verbose] > │ │
00:00:30 #2769 [Verbose] > │ │
00:00:30 #2770 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:30 #2771 [Verbose] >
00:00:30 #2772 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:30 #2773 [Verbose] > // // test
00:00:30 #2774 [Verbose] >
00:00:30 #2775 [Verbose] > vec 1 2 3
00:00:30 #2776 [Verbose] > |> negate_vec
00:00:30 #2777 [Verbose] > |> _assert_eq (vec -1 -2 -3)
00:00:31 #2778 [Verbose] >
00:00:31 #2779 [Verbose] > ╭─[ 217.05ms - stdout ]────────────────────────────────────────────────────────╮
00:00:31 #2780 [Verbose] > │ let rec method1 () : bool = │
00:00:31 #2781 [Verbose] > │ true │
00:00:31 #2782 [Verbose] > │ and method0 () : unit = │
00:00:31 #2783 [Verbose] > │ let v0 : bool = method1() │
00:00:31 #2784 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (-1.0, -2.0, -3.0)} / │
00:00:31 #2785 [Verbose] > │ expected: %A{struct (-1.0, -2.0, -3.0)}" │
00:00:31 #2786 [Verbose] > │ let v2 : bool = v0 = false │
00:00:31 #2787 [Verbose] > │ if v2 then │
00:00:31 #2788 [Verbose] > │ failwith<unit> v1 │
00:00:31 #2789 [Verbose] > │ method0() │
00:00:31 #2790 [Verbose] > │ │
00:00:31 #2791 [Verbose] > │ │
00:00:31 #2792 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2793 [Verbose] >
00:00:31 #2794 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:31 #2795 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:31 #2796 [Verbose] > │ ### ^-^ │
00:00:31 #2797 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2798 [Verbose] >
00:00:31 #2799 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:31 #2800 [Verbose] > inl (^-^) a b =
00:00:31 #2801 [Verbose] > a ^+^ (negate_vec b)
00:00:31 #2802 [Verbose] >
00:00:31 #2803 [Verbose] > ╭─[ 206.55ms - stdout ]────────────────────────────────────────────────────────╮
00:00:31 #2804 [Verbose] > │ () │
00:00:31 #2805 [Verbose] > │ │
00:00:31 #2806 [Verbose] > │ │
00:00:31 #2807 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2808 [Verbose] >
00:00:31 #2809 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:31 #2810 [Verbose] > // // test
00:00:31 #2811 [Verbose] >
00:00:31 #2812 [Verbose] > vec 1 2 3 ^-^ vec 4 5 6
00:00:31 #2813 [Verbose] > |> _assert_eq (vec -3 -3 -3)
00:00:31 #2814 [Verbose] >
00:00:31 #2815 [Verbose] > ╭─[ 282.96ms - stdout ]────────────────────────────────────────────────────────╮
00:00:31 #2816 [Verbose] > │ let rec method1 () : bool = │
00:00:31 #2817 [Verbose] > │ true │
00:00:31 #2818 [Verbose] > │ and method0 () : unit = │
00:00:31 #2819 [Verbose] > │ let v0 : bool = method1() │
00:00:31 #2820 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (-3.0, -3.0, -3.0)} / │
00:00:31 #2821 [Verbose] > │ expected: %A{struct (-3.0, -3.0, -3.0)}" │
00:00:31 #2822 [Verbose] > │ let v2 : bool = v0 = false │
00:00:31 #2823 [Verbose] > │ if v2 then │
00:00:31 #2824 [Verbose] > │ failwith<unit> v1 │
00:00:31 #2825 [Verbose] > │ method0() │
00:00:31 #2826 [Verbose] > │ │
00:00:31 #2827 [Verbose] > │ │
00:00:31 #2828 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2829 [Verbose] >
00:00:31 #2830 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:31 #2831 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:31 #2832 [Verbose] > │ ### <.> │
00:00:31 #2833 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2834 [Verbose] >
00:00:31 #2835 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:31 #2836 [Verbose] > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } =
00:00:31 #2837 [Verbose] > ax * bx + ay * by + az * bz
00:00:31 #2838 [Verbose] >
00:00:31 #2839 [Verbose] > ╭─[ 202.10ms - stdout ]────────────────────────────────────────────────────────╮
00:00:31 #2840 [Verbose] > │ () │
00:00:31 #2841 [Verbose] > │ │
00:00:31 #2842 [Verbose] > │ │
00:00:31 #2843 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #2844 [Verbose] >
00:00:31 #2845 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:31 #2846 [Verbose] > // // test
00:00:31 #2847 [Verbose] >
00:00:31 #2848 [Verbose] > vec 1 2 3 <.> vec 4 5 6
00:00:31 #2849 [Verbose] > |> _assert_eq 32
00:00:32 #2850 [Verbose] >
00:00:32 #2851 [Verbose] > ╭─[ 265.20ms - stdout ]────────────────────────────────────────────────────────╮
00:00:32 #2852 [Verbose] > │ let rec method1 () : bool = │
00:00:32 #2853 [Verbose] > │ true │
00:00:32 #2854 [Verbose] > │ and method0 () : unit = │
00:00:32 #2855 [Verbose] > │ let v0 : bool = method1() │
00:00:32 #2856 [Verbose] > │ let v1 : string = $"__expect / actual: %A{32.0} / expected: %A{32.0}" │
00:00:32 #2857 [Verbose] > │ let v2 : bool = v0 = false │
00:00:32 #2858 [Verbose] > │ if v2 then │
00:00:32 #2859 [Verbose] > │ failwith<unit> v1 │
00:00:32 #2860 [Verbose] > │ method0() │
00:00:32 #2861 [Verbose] > │ │
00:00:32 #2862 [Verbose] > │ │
00:00:32 #2863 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2864 [Verbose] >
00:00:32 #2865 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:32 #2866 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:32 #2867 [Verbose] > │ ### \>\< │
00:00:32 #2868 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2869 [Verbose] >
00:00:32 #2870 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:32 #2871 [Verbose] > inl (><) (a : vec) (b : vec) =
00:00:32 #2872 [Verbose] > vec
00:00:32 #2873 [Verbose] > (a.y * b.z - a.z * b.y)
00:00:32 #2874 [Verbose] > (a.z * b.x - a.x * b.z)
00:00:32 #2875 [Verbose] > (a.x * b.y - a.y * b.x)
00:00:32 #2876 [Verbose] >
00:00:32 #2877 [Verbose] > ╭─[ 240.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:32 #2878 [Verbose] > │ () │
00:00:32 #2879 [Verbose] > │ │
00:00:32 #2880 [Verbose] > │ │
00:00:32 #2881 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2882 [Verbose] >
00:00:32 #2883 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:32 #2884 [Verbose] > // // test
00:00:32 #2885 [Verbose] >
00:00:32 #2886 [Verbose] > vec 1 2 3 >< vec 4 5 6
00:00:32 #2887 [Verbose] > |> _assert_eq (vec -3 6 -3)
00:00:32 #2888 [Verbose] >
00:00:32 #2889 [Verbose] > ╭─[ 329.24ms - stdout ]────────────────────────────────────────────────────────╮
00:00:32 #2890 [Verbose] > │ let rec method1 () : bool = │
00:00:32 #2891 [Verbose] > │ true │
00:00:32 #2892 [Verbose] > │ and method0 () : unit = │
00:00:32 #2893 [Verbose] > │ let v0 : bool = method1() │
00:00:32 #2894 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (-3.0, 6.0, -3.0)} / │
00:00:32 #2895 [Verbose] > │ expected: %A{struct (-3.0, 6.0, -3.0)}" │
00:00:32 #2896 [Verbose] > │ let v2 : bool = v0 = false │
00:00:32 #2897 [Verbose] > │ if v2 then │
00:00:32 #2898 [Verbose] > │ failwith<unit> v1 │
00:00:32 #2899 [Verbose] > │ method0() │
00:00:32 #2900 [Verbose] > │ │
00:00:32 #2901 [Verbose] > │ │
00:00:32 #2902 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2903 [Verbose] >
00:00:32 #2904 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:32 #2905 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:32 #2906 [Verbose] > │ ### magnitude │
00:00:32 #2907 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2908 [Verbose] >
00:00:32 #2909 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:32 #2910 [Verbose] > inl magnitude v =
00:00:32 #2911 [Verbose] > v <.> v |> sqrt
00:00:32 #2912 [Verbose] >
00:00:32 #2913 [Verbose] > ╭─[ 185.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:32 #2914 [Verbose] > │ () │
00:00:32 #2915 [Verbose] > │ │
00:00:32 #2916 [Verbose] > │ │
00:00:32 #2917 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:32 #2918 [Verbose] >
00:00:32 #2919 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:32 #2920 [Verbose] > // // test
00:00:32 #2921 [Verbose] >
00:00:32 #2922 [Verbose] > vec 1 2 3
00:00:32 #2923 [Verbose] > |> magnitude
00:00:32 #2924 [Verbose] > |> _assert_approx_eq None 3.7416573867739413
00:00:33 #2925 [Verbose] >
00:00:33 #2926 [Verbose] > ╭─[ 205.57ms - stdout ]────────────────────────────────────────────────────────╮
00:00:33 #2927 [Verbose] > │ let rec method1 () : bool = │
00:00:33 #2928 [Verbose] > │ true │
00:00:33 #2929 [Verbose] > │ and method0 () : unit = │
00:00:33 #2930 [Verbose] > │ let v0 : bool = method1() │
00:00:33 #2931 [Verbose] > │ let v1 : string = $"__expect / actual: %A{3.7416573867739413} / │
00:00:33 #2932 [Verbose] > │ expected: %A{3.7416573867739413}" │
00:00:33 #2933 [Verbose] > │ let v2 : bool = v0 = false │
00:00:33 #2934 [Verbose] > │ if v2 then │
00:00:33 #2935 [Verbose] > │ failwith<unit> v1 │
00:00:33 #2936 [Verbose] > │ method0() │
00:00:33 #2937 [Verbose] > │ │
00:00:33 #2938 [Verbose] > │ │
00:00:33 #2939 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:33 #2940 [Verbose] >
00:00:33 #2941 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:33 #2942 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:33 #2943 [Verbose] > │ ### v1 │
00:00:33 #2944 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:33 #2945 [Verbose] >
00:00:33 #2946 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:33 #2947 [Verbose] > inl v1 t =
00:00:33 #2948 [Verbose] > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat
00:00:33 #2949 [Verbose] > ()))
00:00:34 #2950 [Verbose] >
00:00:34 #2951 [Verbose] > ╭─[ 1.52s - stdout ]───────────────────────────────────────────────────────────╮
00:00:34 #2952 [Verbose] > │ () │
00:00:34 #2953 [Verbose] > │ │
00:00:34 #2954 [Verbose] > │ │
00:00:34 #2955 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:34 #2956 [Verbose] >
00:00:34 #2957 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:34 #2958 [Verbose] > // // test
00:00:34 #2959 [Verbose] >
00:00:34 #2960 [Verbose] > v1 1
00:00:34 #2961 [Verbose] > |> _assert_eq (vec 2 6 6)
00:00:34 #2962 [Verbose] >
00:00:34 #2963 [Verbose] > ╭─[ 219.48ms - stdout ]────────────────────────────────────────────────────────╮
00:00:34 #2964 [Verbose] > │ let rec method1 () : bool = │
00:00:34 #2965 [Verbose] > │ true │
00:00:34 #2966 [Verbose] > │ and method0 () : unit = │
00:00:34 #2967 [Verbose] > │ let v0 : bool = method1() │
00:00:34 #2968 [Verbose] > │ let v1 : string = $"__expect / actual: %A{struct (2.0, 6.0, 6.0)} / │
00:00:34 #2969 [Verbose] > │ expected: %A{struct (2.0, 6.0, 6.0)}" │
00:00:34 #2970 [Verbose] > │ let v2 : bool = v0 = false │
00:00:34 #2971 [Verbose] > │ if v2 then │
00:00:34 #2972 [Verbose] > │ failwith<unit> v1 │
00:00:34 #2973 [Verbose] > │ method0() │
00:00:34 #2974 [Verbose] > │ │
00:00:34 #2975 [Verbose] > │ │
00:00:34 #2976 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:34 #2977 [Verbose] >
00:00:34 #2978 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:34 #2979 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:34 #2980 [Verbose] > │ ### vec_derivative │
00:00:34 #2981 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:34 #2982 [Verbose] >
00:00:34 #2983 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:34 #2984 [Verbose] > type vec_derivative = (f64 -> vec) -> f64 -> vec
00:00:34 #2985 [Verbose] >
00:00:34 #2986 [Verbose] > inl vec_derivative dt : vec_derivative =
00:00:34 #2987 [Verbose] > fun v t =>
00:00:34 #2988 [Verbose] > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt
00:00:35 #2989 [Verbose] >
00:00:35 #2990 [Verbose] > ╭─[ 239.72ms - stdout ]────────────────────────────────────────────────────────╮
00:00:35 #2991 [Verbose] > │ () │
00:00:35 #2992 [Verbose] > │ │
00:00:35 #2993 [Verbose] > │ │
00:00:35 #2994 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 #2995 [Verbose] >
00:00:35 #2996 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 #2997 [Verbose] > // // test
00:00:35 #2998 [Verbose] >
00:00:35 #2999 [Verbose] > vec_derivative 0.01 v1 3 .x
00:00:35 #3000 [Verbose] > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3)
00:00:35 #3001 [Verbose] >
00:00:35 #3002 [Verbose] > ╭─[ 212.22ms - stdout ]────────────────────────────────────────────────────────╮
00:00:35 #3003 [Verbose] > │ let rec method1 () : bool = │
00:00:35 #3004 [Verbose] > │ true │
00:00:35 #3005 [Verbose] > │ and method0 () : unit = │
00:00:35 #3006 [Verbose] > │ let v0 : bool = method1() │
00:00:35 #3007 [Verbose] > │ let v1 : string = $"__expect / actual: %A{11.999999999999744} / │
00:00:35 #3008 [Verbose] > │ expected: %A{11.999999999999744}" │
00:00:35 #3009 [Verbose] > │ let v2 : bool = v0 = false │
00:00:35 #3010 [Verbose] > │ if v2 then │
00:00:35 #3011 [Verbose] > │ failwith<unit> v1 │
00:00:35 #3012 [Verbose] > │ method0() │
00:00:35 #3013 [Verbose] > │ │
00:00:35 #3014 [Verbose] > │ │
00:00:35 #3015 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 #3016 [Verbose] >
00:00:35 #3017 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:35 #3018 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:35 #3019 [Verbose] > │ ## states_ps │
00:00:35 #3020 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 #3021 [Verbose] >
00:00:35 #3022 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 #3023 [Verbose] > nominal particle_state =
00:00:35 #3024 [Verbose] > {
00:00:35 #3025 [Verbose] > mass : f64
00:00:35 #3026 [Verbose] > charge : f64
00:00:35 #3027 [Verbose] > time : f64
00:00:35 #3028 [Verbose] > pos_vec : vec
00:00:35 #3029 [Verbose] > velocity : vec
00:00:35 #3030 [Verbose] > }
00:00:35 #3031 [Verbose] >
00:00:35 #3032 [Verbose] > inl default_particle_state () : particle_state =
00:00:35 #3033 [Verbose] > particle_state {
00:00:35 #3034 [Verbose] > mass = 1
00:00:35 #3035 [Verbose] > charge = 0
00:00:35 #3036 [Verbose] > time = 0
00:00:35 #3037 [Verbose] > pos_vec = zero_vec ()
00:00:35 #3038 [Verbose] > velocity = zero_vec ()
00:00:35 #3039 [Verbose] > }
00:00:35 #3040 [Verbose] >
00:00:35 #3041 [Verbose] > type one_body_force = particle_state -> vec
00:00:35 #3042 [Verbose] >
00:00:35 #3043 [Verbose] > nominal d_particle_state =
00:00:35 #3044 [Verbose] > {
00:00:35 #3045 [Verbose] > dmdt : f64
00:00:35 #3046 [Verbose] > dqdt : f64
00:00:35 #3047 [Verbose] > dtdt : f64
00:00:35 #3048 [Verbose] > drdt : vec
00:00:35 #3049 [Verbose] > dvdt : vec
00:00:35 #3050 [Verbose] > }
00:00:35 #3051 [Verbose] >
00:00:35 #3052 [Verbose] > inl newton_second_ps (fs : list one_body_force) (st : particle_state) :
00:00:35 #3053 [Verbose] > d_particle_state =
00:00:35 #3054 [Verbose] > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:00:35 #3055 [Verbose] > d_particle_state {
00:00:35 #3056 [Verbose] > dmdt = 0
00:00:35 #3057 [Verbose] > dqdt = 0
00:00:35 #3058 [Verbose] > dtdt = 1
00:00:35 #3059 [Verbose] > drdt = st.velocity
00:00:35 #3060 [Verbose] > dvdt = f_net ^/ st.mass
00:00:35 #3061 [Verbose] > }
00:00:35 #3062 [Verbose] >
00:00:35 #3063 [Verbose] > inl earth_surface_gravity (st : particle_state) =
00:00:35 #3064 [Verbose] > inl g = 9.80665
00:00:35 #3065 [Verbose] > -st.mass * g *^ k_hat ()
00:00:35 #3066 [Verbose] >
00:00:35 #3067 [Verbose] > inl air_resistance drag rho area (st : particle_state) =
00:00:35 #3068 [Verbose] > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity
00:00:35 #3069 [Verbose] >
00:00:35 #3070 [Verbose] > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state)
00:00:35 #3071 [Verbose] > (particle_state st) =
00:00:35 #3072 [Verbose] > inl dst : d_particle_state = deriv (particle_state st)
00:00:35 #3073 [Verbose] > inl v' = st.velocity ^+^ dst.dvdt ^* dt
00:00:35 #3074 [Verbose] > particle_state { st with
00:00:35 #3075 [Verbose] > time = st.time + dt
00:00:35 #3076 [Verbose] > pos_vec = st.pos_vec ^+^ v' ^* dt
00:00:35 #3077 [Verbose] > velocity = st.velocity ^+^ dst.dvdt ^* dt
00:00:35 #3078 [Verbose] > }
00:00:35 #3079 [Verbose] >
00:00:35 #3080 [Verbose] > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' :
00:00:35 #3081 [Verbose] > d_particle_state) =>
00:00:35 #3082 [Verbose] > d_particle_state {
00:00:35 #3083 [Verbose] > dmdt = dps.dmdt + dps'.dmdt
00:00:35 #3084 [Verbose] > dqdt = dps.dqdt + dps'.dqdt
00:00:35 #3085 [Verbose] > dtdt = dps.dtdt + dps'.dtdt
00:00:35 #3086 [Verbose] > drdt = dps.drdt ^+^ dps'.drdt
00:00:35 #3087 [Verbose] > dvdt = dps.dvdt ^+^ dps'.dvdt
00:00:35 #3088 [Verbose] > }
00:00:35 #3089 [Verbose] >
00:00:35 #3090 [Verbose] > instance scale d_particle_state = fun w (dps : d_particle_state) =>
00:00:35 #3091 [Verbose] > d_particle_state {
00:00:35 #3092 [Verbose] > dmdt = w * dps.dmdt
00:00:35 #3093 [Verbose] > dqdt = w * dps.dqdt
00:00:35 #3094 [Verbose] > dtdt = w * dps.dtdt
00:00:35 #3095 [Verbose] > drdt = w *^ dps.drdt
00:00:35 #3096 [Verbose] > dvdt = w *^ dps.dvdt
00:00:35 #3097 [Verbose] > }
00:00:35 #3098 [Verbose] >
00:00:35 #3099 [Verbose] > instance shift particle_state = fun dt dps (particle_state st) =>
00:00:35 #3100 [Verbose] > inl (d_particle_state dps) =
00:00:35 #3101 [Verbose] > real
00:00:35 #3102 [Verbose] > match dps with
00:00:35 #3103 [Verbose] > | d_particle_state _ => dps
00:00:35 #3104 [Verbose] > particle_state { st with
00:00:35 #3105 [Verbose] > time = st.time + dps.dtdt * dt
00:00:35 #3106 [Verbose] > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt
00:00:35 #3107 [Verbose] > velocity = st.velocity ^+^ dps.dvdt ^* dt
00:00:35 #3108 [Verbose] > }
00:00:35 #3109 [Verbose] >
00:00:35 #3110 [Verbose] > inl states_ps (method : numerical_method particle_state d_particle_state) : _ ->
00:00:35 #3111 [Verbose] > _ -> i32 -> particle_state =
00:00:35 #3112 [Verbose] > newton_second_ps >> method >> seq.iterate_
00:00:35 #3113 [Verbose] >
00:00:35 #3114 [Verbose] > inl z_ge0 sts =
00:00:35 #3115 [Verbose] > sts
00:00:35 #3116 [Verbose] > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0)
00:00:35 #3117 [Verbose] >
00:00:35 #3118 [Verbose] > inl trajectory sts =
00:00:35 #3119 [Verbose] > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z)
00:00:35 #3120 [Verbose] >
00:00:35 #3121 [Verbose] > ╭─[ 261.12ms - stdout ]────────────────────────────────────────────────────────╮
00:00:35 #3122 [Verbose] > │ () │
00:00:35 #3123 [Verbose] > │ │
00:00:35 #3124 [Verbose] > │ │
00:00:35 #3125 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 #3126 [Verbose] >
00:00:35 #3127 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 #3128 [Verbose] > // // test
00:00:35 #3129 [Verbose] >
00:00:35 #3130 [Verbose] > inl update_ps (method : numerical_method particle_state d_particle_state) =
00:00:35 #3131 [Verbose] > newton_second_ps >> method
00:00:35 #3132 [Verbose] >
00:00:35 #3133 [Verbose] > inl position_ps (method : numerical_method particle_state d_particle_state) fs
00:00:35 #3134 [Verbose] > st t =
00:00:35 #3135 [Verbose] > inl states : i32 -> particle_state = states_ps method fs st
00:00:35 #3136 [Verbose] > inl dt = (states 1).time - (states 0).time
00:00:35 #3137 [Verbose] > inl num_steps = t / dt |> math.round |> abs
00:00:35 #3138 [Verbose] > inl st1 = solver' method (newton_second_ps fs) st num_steps
00:00:35 #3139 [Verbose] > st1.pos_vec
00:00:35 #3140 [Verbose] >
00:00:35 #3141 [Verbose] > inl sun_gravity (st : particle_state) : vec =
00:00:35 #3142 [Verbose] > inl big_g = 0.0000000000667408
00:00:35 #3143 [Verbose] > inl sun_mass = 1988480000000000000000000000000
00:00:35 #3144 [Verbose] > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3
00:00:35 #3145 [Verbose] >
00:00:35 #3146 [Verbose] > inl wind_force v_wind drag rho area (st : particle_state) =
00:00:35 #3147 [Verbose] > inl v_rel = st.velocity ^-^ v_wind
00:00:35 #3148 [Verbose] > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel
00:00:35 #3149 [Verbose] >
00:00:35 #3150 [Verbose] > inl rock_state () =
00:00:35 #3151 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:35 #3152 [Verbose] > particle_state { default_particle_state' with
00:00:35 #3153 [Verbose] > mass = 2
00:00:35 #3154 [Verbose] > velocity = vec 3 0 4
00:00:35 #3155 [Verbose] > }
00:00:35 #3156 [Verbose] >
00:00:35 #3157 [Verbose] > inl halley_update dt =
00:00:35 #3158 [Verbose] > update_ps (euler_cromer_ps dt) [[ sun_gravity ]]
00:00:35 #3159 [Verbose] >
00:00:35 #3160 [Verbose] > inl halley_initial () =
00:00:35 #3161 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:35 #3162 [Verbose] > particle_state { default_particle_state' with
00:00:35 #3163 [Verbose] > mass = 220000000000000
00:00:35 #3164 [Verbose] > pos_vec = 87660000000 *^ i_hat ()
00:00:35 #3165 [Verbose] > velocity = 54569 *^ j_hat ()
00:00:35 #3166 [Verbose] > }
00:00:35 #3167 [Verbose] >
00:00:35 #3168 [Verbose] > ╭─[ 242.22ms - stdout ]────────────────────────────────────────────────────────╮
00:00:35 #3169 [Verbose] > │ () │
00:00:35 #3170 [Verbose] > │ │
00:00:35 #3171 [Verbose] > │ │
00:00:35 #3172 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:35 #3173 [Verbose] >
00:00:35 #3174 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:35 #3175 [Verbose] > // // test
00:00:35 #3176 [Verbose] >
00:00:35 #3177 [Verbose] > inl baseball_forces () =
00:00:35 #3178 [Verbose] > inl area = pi * (0.074 / 2) ** 2
00:00:35 #3179 [Verbose] > [[
00:00:35 #3180 [Verbose] > earth_surface_gravity
00:00:35 #3181 [Verbose] > air_resistance 0.3 1.225 area
00:00:35 #3182 [Verbose] > ]]
00:00:35 #3183 [Verbose] >
00:00:35 #3184 [Verbose] > inl baseball_trajectory dt v0 theta_deg =
00:00:35 #3185 [Verbose] > inl theta_rad = theta_deg * pi / 180
00:00:35 #3186 [Verbose] > inl vy0 = v0 * cos theta_rad
00:00:35 #3187 [Verbose] > inl vz0 = v0 * sin theta_rad
00:00:35 #3188 [Verbose] > inl initial_state =
00:00:35 #3189 [Verbose] > particle_state {
00:00:35 #3190 [Verbose] > mass = 0.145
00:00:35 #3191 [Verbose] > charge = 0
00:00:35 #3192 [Verbose] > time = 0
00:00:35 #3193 [Verbose] > pos_vec = zero_vec ()
00:00:35 #3194 [Verbose] > velocity = vec 0 vy0 vz0
00:00:35 #3195 [Verbose] > }
00:00:35 #3196 [Verbose] > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state
00:00:35 #3197 [Verbose] > >> Some
00:00:35 #3198 [Verbose] > |> z_ge0
00:00:35 #3199 [Verbose] > |> trajectory
00:00:35 #3200 [Verbose] >
00:00:35 #3201 [Verbose] > inl baseball_range dt v0 theta_deg =
00:00:35 #3202 [Verbose] > baseball_trajectory dt v0 theta_deg
00:00:35 #3203 [Verbose] > |> listm.fold (fun _ (y, _) => y) 0
00:00:35 #3204 [Verbose] >
00:00:35 #3205 [Verbose] > inl x : a _ f64 = am'.init_series 10 80 1
00:00:35 #3206 [Verbose] > inl y = x |> am.map (baseball_range 0.01 45)
00:00:35 #3207 [Verbose] > "range for a baseball hit at 45 m/s",
00:00:35 #3208 [Verbose] > "angle above horizontal (degrees)",
00:00:35 #3209 [Verbose] > "",
00:00:35 #3210 [Verbose] > ;[[ "horizontal range (m)", x, y ]]
00:00:36 #3211 [Verbose] >
00:00:36 #3212 [Verbose] > ╭─[ 969.22ms - return value ]──────────────────────────────────────────────────╮
00:00:36 #3213 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:36 #3214 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:36 #3215 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:36 #3216 [Verbose] > │ stroke="none"/> │
00:00:36 #3217 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:36 #3218 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:36 #3219 [Verbose] > │ fill="#FFFFFF"> │
00:00:36 #3220 [Verbose] > │ range for a baseball hit at 45 m/s │
00:00:36 #3221 [Verbose] > │ </text> │
00:00:36 #3222 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │
00:00:36 #3223 [Verbose] > │ y2="75"/> │
00:00:36 #3224 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:00:36 #3225 [Verbose] > │ y2="75"/> │
00:00:36 #3226 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:36 #3227 [Verbose] > │ y2="75"/> │
00:00:36 #3228 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:00:36 #3229 [Verbose] > │ y2="75"/> │
00:00:36 #3230 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="... │
00:00:36 #3231 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 #3232 [Verbose] >
00:00:36 #3233 [Verbose] > ╭─[ 982.57ms - stdout ]────────────────────────────────────────────────────────╮
00:00:36 #3234 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:00:36 #3235 [Verbose] > │ and UH0 = │
00:00:36 #3236 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:36 #3237 [Verbose] > │ * float * UH0 │
00:00:36 #3238 [Verbose] > │ | UH0_1 │
00:00:36 #3239 [Verbose] > │ and UH1 = │
00:00:36 #3240 [Verbose] > │ | UH1_0 of float * float * UH1 │
00:00:36 #3241 [Verbose] > │ | UH1_1 │
00:00:36 #3242 [Verbose] > │ let rec method1 (v0 : Mut0) : bool = │
00:00:36 #3243 [Verbose] > │ let v1 : int32 = v0.l0 │
00:00:36 #3244 [Verbose] > │ let v2 : bool = v1 < 71 │
00:00:36 #3245 [Verbose] > │ v2 │
00:00:36 #3246 [Verbose] > │ and method2 (v0 : int32, v1 : Mut0) : bool = │
00:00:36 #3247 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:36 #3248 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:36 #3249 [Verbose] > │ v3 │
00:00:36 #3250 [Verbose] > │ and method4 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, v5 │
00:00:36 #3251 [Verbose] > │ : float, v6 : float, v7 : float, v8 : float, v9 : int32) : struct (float * │
00:00:36 #3252 [Verbose] > │ float * float * float * float * float * float * float * float) = │
00:00:36 #3253 [Verbose] > │ let v10 : bool = v9 <= 0 │
00:00:36 #3254 [Verbose] > │ if v10 then │
00:00:36 #3255 [Verbose] > │ struct (v0, v1, v2, v3, v4, v5, v6, v7, v8) │
00:00:36 #3256 [Verbose] > │ else │
00:00:36 #3257 [Verbose] > │ let v11 : float = v6 * v6 │
00:00:36 #3258 [Verbose] > │ let v12 : float = v7 * v7 │
00:00:36 #3259 [Verbose] > │ let v13 : float = v11 + v12 │
00:00:36 #3260 [Verbose] > │ let v14 : float = v8 * v8 │
00:00:36 #3261 [Verbose] > │ let v15 : float = v13 + v14 │
00:00:36 #3262 [Verbose] > │ let v16 : float = sqrt v15 │
00:00:36 #3263 [Verbose] > │ let v17 : float = -0.0007902794129829633 * v16 │
00:00:36 #3264 [Verbose] > │ let v18 : float = v17 * v6 │
00:00:36 #3265 [Verbose] > │ let v19 : float = v17 * v7 │
00:00:36 #3266 [Verbose] > │ let v20 : float = v17 * v8 │
00:00:36 #3267 [Verbose] > │ let v21 : float = -v1 │
00:00:36 #3268 [Verbose] > │ let v22 : float = v21 * 9.80665 │
00:00:36 #3269 [Verbose] > │ let v23 : float = v22 * 0.0 │
00:00:36 #3270 [Verbose] > │ let v24 : float = v23 + v18 │
00:00:36 #3271 [Verbose] > │ let v25 : float = v23 + v19 │
00:00:36 #3272 [Verbose] > │ let v26 : float = v22 + v20 │
00:00:36 #3273 [Verbose] > │ let v27 : float = v24 / v1 │
00:00:36 #3274 [Verbose] > │ let v28 : float = v25 / v1 │
00:00:36 #3275 [Verbose] > │ let v29 : float = v26 / v1 │
00:00:36 #3276 [Verbose] > │ let v30 : float = 0.01 * v27 │
00:00:36 #3277 [Verbose] > │ let v31 : float = 0.01 * v28 │
00:00:36 #3278 [Verbose] > │ let v32 : float = 0.01 * v29 │
00:00:36 #3279 [Verbose] > │ let v33 : float = v6 + v30 │
00:00:36 #3280 [Verbose] > │ let v34 : float = v7 + v31 │
00:00:36 #3281 [Verbose] > │ let v35 : float = v8 + v32 │
00:00:36 #3282 [Verbose] > │ let v36 : float = v5 + 0.01 │
00:00:36 #3283 [Verbose] > │ let v37 : float = 0.01 * v33 │
00:00:36 #3284 [Verbose] > │ let v38 : float = 0.01 * v34 │
00:00:36 #3285 [Verbose] > │ let v39 : float = 0.01 * v35 │
00:00:36 #3286 [Verbose] > │ let v40 : float = v2 + v37 │
00:00:36 #3287 [Verbose] > │ let v41 : float = v3 + v38 │
00:00:36 #3288 [Verbose] > │ let v42 : float = v4 + v39 │
00:00:36 #3289 [Verbose] > │ let v43 : int32 = v9 - 1 │
00:00:36 #3290 [Verbose] > │ method4(v0, v1, v40, v41, v42, v36, v33, v34, v35, v43) │
00:00:36 #3291 [Verbose] > │ and method5 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:36 #3292 [Verbose] > │ match v0 with │
00:00:36 #3293 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:36 #3294 [Verbose] > │ let v12 : UH0 = UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:36 #3295 [Verbose] > │ method5(v11, v12) │
00:00:36 #3296 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:36 #3297 [Verbose] > │ v1 │
00:00:36 #3298 [Verbose] > │ and method3 (v0 : float, v1 : float, v2 : UH0, v3 : int32) : UH0 = │
00:00:36 #3299 [Verbose] > │ let v4 : float = 0.0 │
00:00:36 #3300 [Verbose] > │ let v5 : float = 0.145 │
00:00:36 #3301 [Verbose] > │ let v6 : float = 0.0 │
00:00:36 #3302 [Verbose] > │ let v7 : float = 0.0 │
00:00:36 #3303 [Verbose] > │ let v8 : float = 0.0 │
00:00:36 #3304 [Verbose] > │ let v9 : float = 0.0 │
00:00:36 #3305 [Verbose] > │ let v10 : float = 0.0 │
00:00:36 #3306 [Verbose] > │ let struct (v11 : float, v12 : float, v13 : float, v14 : float, v15 : │
00:00:36 #3307 [Verbose] > │ float, v16 : float, v17 : float, v18 : float, v19 : float) = method4(v4, v5, │
00:00:36 #3308 [Verbose] > │ v6, v7, v8, v9, v10, v0, v1, v3) │
00:00:36 #3309 [Verbose] > │ let v20 : bool = v15 >= 0.0 │
00:00:36 #3310 [Verbose] > │ if v20 then │
00:00:36 #3311 [Verbose] > │ let v21 : UH0 = UH0_0(v11, v12, v13, v14, v15, v16, v17, v18, v19, │
00:00:36 #3312 [Verbose] > │ v2) │
00:00:36 #3313 [Verbose] > │ let v22 : int32 = v3 + 1 │
00:00:36 #3314 [Verbose] > │ method3(v0, v1, v21, v22) │
00:00:36 #3315 [Verbose] > │ else │
00:00:36 #3316 [Verbose] > │ let v24 : UH0 = UH0_1 │
00:00:36 #3317 [Verbose] > │ method5(v2, v24) │
00:00:36 #3318 [Verbose] > │ and method6 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:36 #3319 [Verbose] > │ match v0 with │
00:00:36 #3320 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:36 #3321 [Verbose] > │ let v12 : UH1 = method6(v11, v1) │
00:00:36 #3322 [Verbose] > │ UH1_0(v5, v6, v12) │
00:00:36 #3323 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:36 #3324 [Verbose] > │ v1 │
00:00:36 #3325 [Verbose] > │ and method7 (v0 : UH1, v1 : float) : float = │
00:00:36 #3326 [Verbose] > │ match v0 with │
00:00:36 #3327 [Verbose] > │ | UH1_0(v2, v3, v4) -> (* Cons *) │
00:00:36 #3328 [Verbose] > │ method7(v4, v2) │
00:00:36 #3329 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:36 #3330 [Verbose] > │ v1 │
00:00:36 #3331 [Verbose] > │ and method8 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:36 #3332 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:36 #3333 [Verbose] > │ v0 │
00:00:36 #3334 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:36 #3335 [Verbose] > │ []) * (float [])) [])) = │
00:00:36 #3336 [Verbose] > │ let v0 : (float []) = Array.zeroCreate<float> (71) │
00:00:36 #3337 [Verbose] > │ let v1 : Mut0 = {l0 = 0} : Mut0 │
00:00:36 #3338 [Verbose] > │ while method1(v1) do │
00:00:36 #3339 [Verbose] > │ let v3 : int32 = v1.l0 │
00:00:36 #3340 [Verbose] > │ let v4 : float = float v3 │
00:00:36 #3341 [Verbose] > │ let v5 : float = 10.0 + v4 │
00:00:36 #3342 [Verbose] > │ v0.[int v3] <- v5 │
00:00:36 #3343 [Verbose] > │ let v6 : int32 = v3 + 1 │
00:00:36 #3344 [Verbose] > │ v1.l0 <- v6 │
00:00:36 #3345 [Verbose] > │ () │
00:00:36 #3346 [Verbose] > │ let v7 : int32 = v0.Length │
00:00:36 #3347 [Verbose] > │ let v8 : (float []) = Array.zeroCreate<float> (v7) │
00:00:36 #3348 [Verbose] > │ let v9 : Mut0 = {l0 = 0} : Mut0 │
00:00:36 #3349 [Verbose] > │ while method2(v7, v9) do │
00:00:36 #3350 [Verbose] > │ let v11 : int32 = v9.l0 │
00:00:36 #3351 [Verbose] > │ let v12 : float = v0.[int v11] │
00:00:36 #3352 [Verbose] > │ let v13 : float = v12 * 3.141592653589793 │
00:00:36 #3353 [Verbose] > │ let v14 : float = v13 / 180.0 │
00:00:36 #3354 [Verbose] > │ let v15 : float = cos v14 │
00:00:36 #3355 [Verbose] > │ let v16 : float = 45.0 * v15 │
00:00:36 #3356 [Verbose] > │ let v17 : float = sin v14 │
00:00:36 #3357 [Verbose] > │ let v18 : float = 45.0 * v17 │
00:00:36 #3358 [Verbose] > │ let v19 : UH0 = UH0_1 │
00:00:36 #3359 [Verbose] > │ let v20 : int32 = 0 │
00:00:36 #3360 [Verbose] > │ let v21 : UH0 = method3(v16, v18, v19, v20) │
00:00:36 #3361 [Verbose] > │ let v22 : UH1 = UH1_1 │
00:00:36 #3362 [Verbose] > │ let v23 : UH1 = method6(v21, v22) │
00:00:36 #3363 [Verbose] > │ let v24 : float = 0.0 │
00:00:36 #3364 [Verbose] > │ let v25 : float = method7(v23, v24) │
00:00:36 #3365 [Verbose] > │ v8.[int v11] <- v25 │
00:00:36 #3366 [Verbose] > │ let v26 : int32 = v11 + 1 │
00:00:36 #3367 [Verbose] > │ v9.l0 <- v26 │
00:00:36 #3368 [Verbose] > │ () │
00:00:36 #3369 [Verbose] > │ let v27 : string = "horizontal range (m)" │
00:00:36 #3370 [Verbose] > │ let v28 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:36 #3371 [Verbose] > │ (v27, v0, v8)|] │
00:00:36 #3372 [Verbose] > │ let v29 : (struct (string * (float []) * (float [])) []) = method8(v28) │
00:00:36 #3373 [Verbose] > │ let v30 : string = "range for a baseball hit at 45 m/s" │
00:00:36 #3374 [Verbose] > │ let v31 : string = "angle above horizontal (degrees)" │
00:00:36 #3375 [Verbose] > │ let v32 : string = "" │
00:00:36 #3376 [Verbose] > │ struct (v30, v31, v32, v29) │
00:00:36 #3377 [Verbose] > │ method0() │
00:00:36 #3378 [Verbose] > │ │
00:00:36 #3379 [Verbose] > │ │
00:00:36 #3380 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 #3381 [Verbose] >
00:00:36 #3382 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 #3383 [Verbose] > // // test
00:00:36 #3384 [Verbose] >
00:00:36 #3385 [Verbose] > inl best_angle (min, max) =
00:00:36 #3386 [Verbose] > let rec loop theta_deg (best_range, best_theta_deg) =
00:00:36 #3387 [Verbose] > if theta_deg > max
00:00:36 #3388 [Verbose] > then best_range, best_theta_deg
00:00:36 #3389 [Verbose] > else
00:00:36 #3390 [Verbose] > inl range = baseball_range 0.01 45 theta_deg
00:00:36 #3391 [Verbose] > loop
00:00:36 #3392 [Verbose] > (theta_deg + 1)
00:00:36 #3393 [Verbose] > (if range > best_range
00:00:36 #3394 [Verbose] > then range, theta_deg
00:00:36 #3395 [Verbose] > else best_range, best_theta_deg)
00:00:36 #3396 [Verbose] > loop min (0f64, min)
00:00:36 #3397 [Verbose] >
00:00:36 #3398 [Verbose] > best_angle (30f64, 60f64)
00:00:36 #3399 [Verbose] > |> _assert_eq (116.77499158246208, 41)
00:00:37 #3400 [Verbose] >
00:00:37 #3401 [Verbose] > ╭─[ 578.76ms - stdout ]────────────────────────────────────────────────────────╮
00:00:37 #3402 [Verbose] > │ type UH0 = │
00:00:37 #3403 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:37 #3404 [Verbose] > │ * float * UH0 │
00:00:37 #3405 [Verbose] > │ | UH0_1 │
00:00:37 #3406 [Verbose] > │ and UH1 = │
00:00:37 #3407 [Verbose] > │ | UH1_0 of float * float * UH1 │
00:00:37 #3408 [Verbose] > │ | UH1_1 │
00:00:37 #3409 [Verbose] > │ let rec method3 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, │
00:00:37 #3410 [Verbose] > │ v5 : float, v6 : float, v7 : float, v8 : float, v9 : int32) : struct (float │
00:00:37 #3411 [Verbose] > │ * float * float * float * float * float * float * float * float) = │
00:00:37 #3412 [Verbose] > │ let v10 : bool = v9 <= 0 │
00:00:37 #3413 [Verbose] > │ if v10 then │
00:00:37 #3414 [Verbose] > │ struct (v0, v1, v2, v3, v4, v5, v6, v7, v8) │
00:00:37 #3415 [Verbose] > │ else │
00:00:37 #3416 [Verbose] > │ let v11 : float = v6 * v6 │
00:00:37 #3417 [Verbose] > │ let v12 : float = v7 * v7 │
00:00:37 #3418 [Verbose] > │ let v13 : float = v11 + v12 │
00:00:37 #3419 [Verbose] > │ let v14 : float = v8 * v8 │
00:00:37 #3420 [Verbose] > │ let v15 : float = v13 + v14 │
00:00:37 #3421 [Verbose] > │ let v16 : float = sqrt v15 │
00:00:37 #3422 [Verbose] > │ let v17 : float = -0.0007902794129829633 * v16 │
00:00:37 #3423 [Verbose] > │ let v18 : float = v17 * v6 │
00:00:37 #3424 [Verbose] > │ let v19 : float = v17 * v7 │
00:00:37 #3425 [Verbose] > │ let v20 : float = v17 * v8 │
00:00:37 #3426 [Verbose] > │ let v21 : float = -v1 │
00:00:37 #3427 [Verbose] > │ let v22 : float = v21 * 9.80665 │
00:00:37 #3428 [Verbose] > │ let v23 : float = v22 * 0.0 │
00:00:37 #3429 [Verbose] > │ let v24 : float = v23 + v18 │
00:00:37 #3430 [Verbose] > │ let v25 : float = v23 + v19 │
00:00:37 #3431 [Verbose] > │ let v26 : float = v22 + v20 │
00:00:37 #3432 [Verbose] > │ let v27 : float = v24 / v1 │
00:00:37 #3433 [Verbose] > │ let v28 : float = v25 / v1 │
00:00:37 #3434 [Verbose] > │ let v29 : float = v26 / v1 │
00:00:37 #3435 [Verbose] > │ let v30 : float = 0.01 * v27 │
00:00:37 #3436 [Verbose] > │ let v31 : float = 0.01 * v28 │
00:00:37 #3437 [Verbose] > │ let v32 : float = 0.01 * v29 │
00:00:37 #3438 [Verbose] > │ let v33 : float = v6 + v30 │
00:00:37 #3439 [Verbose] > │ let v34 : float = v7 + v31 │
00:00:37 #3440 [Verbose] > │ let v35 : float = v8 + v32 │
00:00:37 #3441 [Verbose] > │ let v36 : float = v5 + 0.01 │
00:00:37 #3442 [Verbose] > │ let v37 : float = 0.01 * v33 │
00:00:37 #3443 [Verbose] > │ let v38 : float = 0.01 * v34 │
00:00:37 #3444 [Verbose] > │ let v39 : float = 0.01 * v35 │
00:00:37 #3445 [Verbose] > │ let v40 : float = v2 + v37 │
00:00:37 #3446 [Verbose] > │ let v41 : float = v3 + v38 │
00:00:37 #3447 [Verbose] > │ let v42 : float = v4 + v39 │
00:00:37 #3448 [Verbose] > │ let v43 : int32 = v9 - 1 │
00:00:37 #3449 [Verbose] > │ method3(v0, v1, v40, v41, v42, v36, v33, v34, v35, v43) │
00:00:37 #3450 [Verbose] > │ and method4 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:37 #3451 [Verbose] > │ match v0 with │
00:00:37 #3452 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:37 #3453 [Verbose] > │ let v12 : UH0 = UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:37 #3454 [Verbose] > │ method4(v11, v12) │
00:00:37 #3455 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:37 #3456 [Verbose] > │ v1 │
00:00:37 #3457 [Verbose] > │ and method2 (v0 : float, v1 : float, v2 : UH0, v3 : int32) : UH0 = │
00:00:37 #3458 [Verbose] > │ let v4 : float = 0.0 │
00:00:37 #3459 [Verbose] > │ let v5 : float = 0.145 │
00:00:37 #3460 [Verbose] > │ let v6 : float = 0.0 │
00:00:37 #3461 [Verbose] > │ let v7 : float = 0.0 │
00:00:37 #3462 [Verbose] > │ let v8 : float = 0.0 │
00:00:37 #3463 [Verbose] > │ let v9 : float = 0.0 │
00:00:37 #3464 [Verbose] > │ let v10 : float = 0.0 │
00:00:37 #3465 [Verbose] > │ let struct (v11 : float, v12 : float, v13 : float, v14 : float, v15 : │
00:00:37 #3466 [Verbose] > │ float, v16 : float, v17 : float, v18 : float, v19 : float) = method3(v4, v5, │
00:00:37 #3467 [Verbose] > │ v6, v7, v8, v9, v10, v0, v1, v3) │
00:00:37 #3468 [Verbose] > │ let v20 : bool = v15 >= 0.0 │
00:00:37 #3469 [Verbose] > │ if v20 then │
00:00:37 #3470 [Verbose] > │ let v21 : UH0 = UH0_0(v11, v12, v13, v14, v15, v16, v17, v18, v19, │
00:00:37 #3471 [Verbose] > │ v2) │
00:00:37 #3472 [Verbose] > │ let v22 : int32 = v3 + 1 │
00:00:37 #3473 [Verbose] > │ method2(v0, v1, v21, v22) │
00:00:37 #3474 [Verbose] > │ else │
00:00:37 #3475 [Verbose] > │ let v24 : UH0 = UH0_1 │
00:00:37 #3476 [Verbose] > │ method4(v2, v24) │
00:00:37 #3477 [Verbose] > │ and method5 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:37 #3478 [Verbose] > │ match v0 with │
00:00:37 #3479 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:37 #3480 [Verbose] > │ let v12 : UH1 = method5(v11, v1) │
00:00:37 #3481 [Verbose] > │ UH1_0(v5, v6, v12) │
00:00:37 #3482 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:37 #3483 [Verbose] > │ v1 │
00:00:37 #3484 [Verbose] > │ and method6 (v0 : UH1, v1 : float) : float = │
00:00:37 #3485 [Verbose] > │ match v0 with │
00:00:37 #3486 [Verbose] > │ | UH1_0(v2, v3, v4) -> (* Cons *) │
00:00:37 #3487 [Verbose] > │ method6(v4, v2) │
00:00:37 #3488 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:37 #3489 [Verbose] > │ v1 │
00:00:37 #3490 [Verbose] > │ and method1 (v0 : float, v1 : float, v2 : float) : struct (float * float) = │
00:00:37 #3491 [Verbose] > │ let v3 : bool = v0 > 60.0 │
00:00:37 #3492 [Verbose] > │ if v3 then │
00:00:37 #3493 [Verbose] > │ struct (v2, v1) │
00:00:37 #3494 [Verbose] > │ else │
00:00:37 #3495 [Verbose] > │ let v4 : float = v0 * 3.141592653589793 │
00:00:37 #3496 [Verbose] > │ let v5 : float = v4 / 180.0 │
00:00:37 #3497 [Verbose] > │ let v6 : float = cos v5 │
00:00:37 #3498 [Verbose] > │ let v7 : float = 45.0 * v6 │
00:00:37 #3499 [Verbose] > │ let v8 : float = sin v5 │
00:00:37 #3500 [Verbose] > │ let v9 : float = 45.0 * v8 │
00:00:37 #3501 [Verbose] > │ let v10 : UH0 = UH0_1 │
00:00:37 #3502 [Verbose] > │ let v11 : int32 = 0 │
00:00:37 #3503 [Verbose] > │ let v12 : UH0 = method2(v7, v9, v10, v11) │
00:00:37 #3504 [Verbose] > │ let v13 : UH1 = UH1_1 │
00:00:37 #3505 [Verbose] > │ let v14 : UH1 = method5(v12, v13) │
00:00:37 #3506 [Verbose] > │ let v15 : float = 0.0 │
00:00:37 #3507 [Verbose] > │ let v16 : float = method6(v14, v15) │
00:00:37 #3508 [Verbose] > │ let v17 : float = v0 + 1.0 │
00:00:37 #3509 [Verbose] > │ let v18 : bool = v16 > v2 │
00:00:37 #3510 [Verbose] > │ let struct (v19 : float, v20 : float) = │
00:00:37 #3511 [Verbose] > │ if v18 then │
00:00:37 #3512 [Verbose] > │ struct (v16, v0) │
00:00:37 #3513 [Verbose] > │ else │
00:00:37 #3514 [Verbose] > │ struct (v2, v1) │
00:00:37 #3515 [Verbose] > │ method1(v17, v20, v19) │
00:00:37 #3516 [Verbose] > │ and method7 (v0 : bool) : bool = │
00:00:37 #3517 [Verbose] > │ v0 │
00:00:37 #3518 [Verbose] > │ and method0 () : unit = │
00:00:37 #3519 [Verbose] > │ let v0 : float = 30.0 │
00:00:37 #3520 [Verbose] > │ let v1 : float = 0.0 │
00:00:37 #3521 [Verbose] > │ let v2 : float = 30.0 │
00:00:37 #3522 [Verbose] > │ let struct (v3 : float, v4 : float) = method1(v0, v2, v1) │
00:00:37 #3523 [Verbose] > │ let v5 : bool = v3 = 116.77499158246208 │
00:00:37 #3524 [Verbose] > │ let v7 : bool = │
00:00:37 #3525 [Verbose] > │ if v5 then │
00:00:37 #3526 [Verbose] > │ let v6 : bool = v4 = 41.0 │
00:00:37 #3527 [Verbose] > │ v6 │
00:00:37 #3528 [Verbose] > │ else │
00:00:37 #3529 [Verbose] > │ false │
00:00:37 #3530 [Verbose] > │ let v8 : bool = method7(v7) │
00:00:37 #3531 [Verbose] > │ let v9 : string = $"__expect / actual: %A{struct (v3, v4)} / expected: │
00:00:37 #3532 [Verbose] > │ %A{struct (116.77499158246208, 41.0)}" │
00:00:37 #3533 [Verbose] > │ let v10 : bool = v8 = false │
00:00:37 #3534 [Verbose] > │ if v10 then │
00:00:37 #3535 [Verbose] > │ failwith<unit> v9 │
00:00:37 #3536 [Verbose] > │ method0() │
00:00:37 #3537 [Verbose] > │ │
00:00:37 #3538 [Verbose] > │ │
00:00:37 #3539 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:37 #3540 [Verbose] >
00:00:37 #3541 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:37 #3542 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:37 #3543 [Verbose] > │ ## relativity_ps │
00:00:37 #3544 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:37 #3545 [Verbose] >
00:00:37 #3546 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:37 #3547 [Verbose] > inl relativity_ps fs (st : particle_state) =
00:00:37 #3548 [Verbose] > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:00:37 #3549 [Verbose] > inl c = 299792458
00:00:37 #3550 [Verbose] > inl u = st.velocity ^/ c
00:00:37 #3551 [Verbose] > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass
00:00:37 #3552 [Verbose] > d_particle_state {
00:00:37 #3553 [Verbose] > dmdt = 0
00:00:37 #3554 [Verbose] > dqdt = 0
00:00:37 #3555 [Verbose] > dtdt = 1
00:00:37 #3556 [Verbose] > drdt = st.velocity
00:00:37 #3557 [Verbose] > dvdt = acc
00:00:37 #3558 [Verbose] > }
00:00:37 #3559 [Verbose] >
00:00:37 #3560 [Verbose] > ╭─[ 228.38ms - stdout ]────────────────────────────────────────────────────────╮
00:00:37 #3561 [Verbose] > │ () │
00:00:37 #3562 [Verbose] > │ │
00:00:37 #3563 [Verbose] > │ │
00:00:37 #3564 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:37 #3565 [Verbose] >
00:00:37 #3566 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:37 #3567 [Verbose] > // // test
00:00:37 #3568 [Verbose] >
00:00:37 #3569 [Verbose] > inl year = 365.25 * 24 * 60 * 60
00:00:37 #3570 [Verbose] > inl c = 299792458
00:00:37 #3571 [Verbose] > inl ~method = runge_kutta_4 100000
00:00:37 #3572 [Verbose] > inl forces = [[ fun _ => 10 *^ i_hat () ]]
00:00:37 #3573 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:37 #3574 [Verbose] > inl initial_state =
00:00:37 #3575 [Verbose] > particle_state { default_particle_state' with
00:00:37 #3576 [Verbose] > mass = 1
00:00:37 #3577 [Verbose] > }
00:00:37 #3578 [Verbose] >
00:00:37 #3579 [Verbose] > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:00:37 #3580 [Verbose] > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:00:37 #3581 [Verbose] >
00:00:37 #3582 [Verbose] > inl newton_x, newton_y =
00:00:37 #3583 [Verbose] > newton_states
00:00:37 #3584 [Verbose] > >> Some
00:00:37 #3585 [Verbose] > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:00:37 #3586 [Verbose] > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:00:37 #3587 [Verbose] > |> listm'.unzip
00:00:37 #3588 [Verbose] >
00:00:37 #3589 [Verbose] > inl _, relativity_y =
00:00:37 #3590 [Verbose] > relativity_states
00:00:37 #3591 [Verbose] > >> Some
00:00:37 #3592 [Verbose] > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:00:37 #3593 [Verbose] > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:00:37 #3594 [Verbose] > |> listm'.unzip
00:00:37 #3595 [Verbose] >
00:00:37 #3596 [Verbose] > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:00:37 #3597 [Verbose] > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:00:37 #3598 [Verbose] > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:00:37 #3599 [Verbose] >
00:00:37 #3600 [Verbose] > "response to a constant force",
00:00:37 #3601 [Verbose] > "time (years)",
00:00:37 #3602 [Verbose] > "velocity (multiples of c)",
00:00:37 #3603 [Verbose] > ;[[
00:00:37 #3604 [Verbose] > "newtonian", newton_x, newton_y
00:00:37 #3605 [Verbose] > "relativistic", newton_x, relativity_y
00:00:37 #3606 [Verbose] > ]]
00:00:38 #3607 [Verbose] >
00:00:38 #3608 [Verbose] > ╭─[ 584.82ms - return value ]──────────────────────────────────────────────────╮
00:00:38 #3609 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:38 #3610 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:38 #3611 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:38 #3612 [Verbose] > │ stroke="none"/> │
00:00:38 #3613 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:38 #3614 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:38 #3615 [Verbose] > │ fill="#FFFFFF"> │
00:00:38 #3616 [Verbose] > │ response to a constant force │
00:00:38 #3617 [Verbose] > │ </text> │
00:00:38 #3618 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:38 #3619 [Verbose] > │ y2="75"/> │
00:00:38 #3620 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:38 #3621 [Verbose] > │ y2="75"/> │
00:00:38 #3622 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:38 #3623 [Verbose] > │ y2="75"/> │
00:00:38 #3624 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:38 #3625 [Verbose] > │ y2="75"/> │
00:00:38 #3626 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1=... │
00:00:38 #3627 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:38 #3628 [Verbose] >
00:00:38 #3629 [Verbose] > ╭─[ 597.27ms - stdout ]────────────────────────────────────────────────────────╮
00:00:38 #3630 [Verbose] > │ type UH0 = │
00:00:38 #3631 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:38 #3632 [Verbose] > │ * float * UH0 │
00:00:38 #3633 [Verbose] > │ | UH0_1 │
00:00:38 #3634 [Verbose] > │ and UH1 = │
00:00:38 #3635 [Verbose] > │ | UH1_0 of float * float * UH1 │
00:00:38 #3636 [Verbose] > │ | UH1_1 │
00:00:38 #3637 [Verbose] > │ and UH2 = │
00:00:38 #3638 [Verbose] > │ | UH2_0 of float * UH2 │
00:00:38 #3639 [Verbose] > │ | UH2_1 │
00:00:38 #3640 [Verbose] > │ let rec closure1 (v0 : (struct (float * float * float * float * float * │
00:00:38 #3641 [Verbose] > │ float * float * float * float) -> struct (float * float * float * float * │
00:00:38 #3642 [Verbose] > │ float * float * float * float * float))) struct (v1 : float, v2 : float, v3 │
00:00:38 #3643 [Verbose] > │ : float, v4 : float, v5 : float, v6 : float, v7 : float, v8 : float, v9 : │
00:00:38 #3644 [Verbose] > │ float) : struct (float * float * float * float * float * float * float * │
00:00:38 #3645 [Verbose] > │ float * float) = │
00:00:38 #3646 [Verbose] > │ let struct (v10 : float, v11 : float, v12 : float, v13 : float, v14 : │
00:00:38 #3647 [Verbose] > │ float, v15 : float, v16 : float, v17 : float, v18 : float) = v0 struct (v1, │
00:00:38 #3648 [Verbose] > │ v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:38 #3649 [Verbose] > │ let v19 : float = v15 * 50000.0 │
00:00:38 #3650 [Verbose] > │ let v20 : float = v6 + v19 │
00:00:38 #3651 [Verbose] > │ let v21 : float = 50000.0 * v12 │
00:00:38 #3652 [Verbose] > │ let v22 : float = 50000.0 * v13 │
00:00:38 #3653 [Verbose] > │ let v23 : float = 50000.0 * v14 │
00:00:38 #3654 [Verbose] > │ let v24 : float = v3 + v21 │
00:00:38 #3655 [Verbose] > │ let v25 : float = v4 + v22 │
00:00:38 #3656 [Verbose] > │ let v26 : float = v5 + v23 │
00:00:38 #3657 [Verbose] > │ let v27 : float = 50000.0 * v16 │
00:00:38 #3658 [Verbose] > │ let v28 : float = 50000.0 * v17 │
00:00:38 #3659 [Verbose] > │ let v29 : float = 50000.0 * v18 │
00:00:38 #3660 [Verbose] > │ let v30 : float = v7 + v27 │
00:00:38 #3661 [Verbose] > │ let v31 : float = v8 + v28 │
00:00:38 #3662 [Verbose] > │ let v32 : float = v9 + v29 │
00:00:38 #3663 [Verbose] > │ let struct (v33 : float, v34 : float, v35 : float, v36 : float, v37 : │
00:00:38 #3664 [Verbose] > │ float, v38 : float, v39 : float, v40 : float, v41 : float) = v0 struct (v1, │
00:00:38 #3665 [Verbose] > │ v2, v24, v25, v26, v20, v30, v31, v32) │
00:00:38 #3666 [Verbose] > │ let v42 : float = v38 * 50000.0 │
00:00:38 #3667 [Verbose] > │ let v43 : float = v6 + v42 │
00:00:38 #3668 [Verbose] > │ let v44 : float = 50000.0 * v35 │
00:00:38 #3669 [Verbose] > │ let v45 : float = 50000.0 * v36 │
00:00:38 #3670 [Verbose] > │ let v46 : float = 50000.0 * v37 │
00:00:38 #3671 [Verbose] > │ let v47 : float = v3 + v44 │
00:00:38 #3672 [Verbose] > │ let v48 : float = v4 + v45 │
00:00:38 #3673 [Verbose] > │ let v49 : float = v5 + v46 │
00:00:38 #3674 [Verbose] > │ let v50 : float = 50000.0 * v39 │
00:00:38 #3675 [Verbose] > │ let v51 : float = 50000.0 * v40 │
00:00:38 #3676 [Verbose] > │ let v52 : float = 50000.0 * v41 │
00:00:38 #3677 [Verbose] > │ let v53 : float = v7 + v50 │
00:00:38 #3678 [Verbose] > │ let v54 : float = v8 + v51 │
00:00:38 #3679 [Verbose] > │ let v55 : float = v9 + v52 │
00:00:38 #3680 [Verbose] > │ let struct (v56 : float, v57 : float, v58 : float, v59 : float, v60 : │
00:00:38 #3681 [Verbose] > │ float, v61 : float, v62 : float, v63 : float, v64 : float) = v0 struct (v1, │
00:00:38 #3682 [Verbose] > │ v2, v47, v48, v49, v43, v53, v54, v55) │
00:00:38 #3683 [Verbose] > │ let v65 : float = v61 * 100000.0 │
00:00:38 #3684 [Verbose] > │ let v66 : float = v6 + v65 │
00:00:38 #3685 [Verbose] > │ let v67 : float = 100000.0 * v58 │
00:00:38 #3686 [Verbose] > │ let v68 : float = 100000.0 * v59 │
00:00:38 #3687 [Verbose] > │ let v69 : float = 100000.0 * v60 │
00:00:38 #3688 [Verbose] > │ let v70 : float = v3 + v67 │
00:00:38 #3689 [Verbose] > │ let v71 : float = v4 + v68 │
00:00:38 #3690 [Verbose] > │ let v72 : float = v5 + v69 │
00:00:38 #3691 [Verbose] > │ let v73 : float = 100000.0 * v62 │
00:00:38 #3692 [Verbose] > │ let v74 : float = 100000.0 * v63 │
00:00:38 #3693 [Verbose] > │ let v75 : float = 100000.0 * v64 │
00:00:38 #3694 [Verbose] > │ let v76 : float = v7 + v73 │
00:00:38 #3695 [Verbose] > │ let v77 : float = v8 + v74 │
00:00:38 #3696 [Verbose] > │ let v78 : float = v9 + v75 │
00:00:38 #3697 [Verbose] > │ let struct (v79 : float, v80 : float, v81 : float, v82 : float, v83 : │
00:00:38 #3698 [Verbose] > │ float, v84 : float, v85 : float, v86 : float, v87 : float) = v0 struct (v1, │
00:00:38 #3699 [Verbose] > │ v2, v70, v71, v72, v66, v76, v77, v78) │
00:00:38 #3700 [Verbose] > │ let v88 : float = v10 + v33 │
00:00:38 #3701 [Verbose] > │ let v89 : float = v11 + v34 │
00:00:38 #3702 [Verbose] > │ let v90 : float = v15 + v38 │
00:00:38 #3703 [Verbose] > │ let v91 : float = v12 + v35 │
00:00:38 #3704 [Verbose] > │ let v92 : float = v13 + v36 │
00:00:38 #3705 [Verbose] > │ let v93 : float = v14 + v37 │
00:00:38 #3706 [Verbose] > │ let v94 : float = v16 + v39 │
00:00:38 #3707 [Verbose] > │ let v95 : float = v17 + v40 │
00:00:38 #3708 [Verbose] > │ let v96 : float = v18 + v41 │
00:00:38 #3709 [Verbose] > │ let v97 : float = v88 + v33 │
00:00:38 #3710 [Verbose] > │ let v98 : float = v89 + v34 │
00:00:38 #3711 [Verbose] > │ let v99 : float = v90 + v38 │
00:00:38 #3712 [Verbose] > │ let v100 : float = v91 + v35 │
00:00:38 #3713 [Verbose] > │ let v101 : float = v92 + v36 │
00:00:38 #3714 [Verbose] > │ let v102 : float = v93 + v37 │
00:00:38 #3715 [Verbose] > │ let v103 : float = v94 + v39 │
00:00:38 #3716 [Verbose] > │ let v104 : float = v95 + v40 │
00:00:38 #3717 [Verbose] > │ let v105 : float = v96 + v41 │
00:00:38 #3718 [Verbose] > │ let v106 : float = v97 + v56 │
00:00:38 #3719 [Verbose] > │ let v107 : float = v98 + v57 │
00:00:38 #3720 [Verbose] > │ let v108 : float = v99 + v61 │
00:00:38 #3721 [Verbose] > │ let v109 : float = v100 + v58 │
00:00:38 #3722 [Verbose] > │ let v110 : float = v101 + v59 │
00:00:38 #3723 [Verbose] > │ let v111 : float = v102 + v60 │
00:00:38 #3724 [Verbose] > │ let v112 : float = v103 + v62 │
00:00:38 #3725 [Verbose] > │ let v113 : float = v104 + v63 │
00:00:38 #3726 [Verbose] > │ let v114 : float = v105 + v64 │
00:00:38 #3727 [Verbose] > │ let v115 : float = v106 + v56 │
00:00:38 #3728 [Verbose] > │ let v116 : float = v107 + v57 │
00:00:38 #3729 [Verbose] > │ let v117 : float = v108 + v61 │
00:00:38 #3730 [Verbose] > │ let v118 : float = v109 + v58 │
00:00:38 #3731 [Verbose] > │ let v119 : float = v110 + v59 │
00:00:38 #3732 [Verbose] > │ let v120 : float = v111 + v60 │
00:00:38 #3733 [Verbose] > │ let v121 : float = v112 + v62 │
00:00:38 #3734 [Verbose] > │ let v122 : float = v113 + v63 │
00:00:38 #3735 [Verbose] > │ let v123 : float = v114 + v64 │
00:00:38 #3736 [Verbose] > │ let v124 : float = v115 + v79 │
00:00:38 #3737 [Verbose] > │ let v125 : float = v116 + v80 │
00:00:38 #3738 [Verbose] > │ let v126 : float = v117 + v84 │
00:00:38 #3739 [Verbose] > │ let v127 : float = v118 + v81 │
00:00:38 #3740 [Verbose] > │ let v128 : float = v119 + v82 │
00:00:38 #3741 [Verbose] > │ let v129 : float = v120 + v83 │
00:00:38 #3742 [Verbose] > │ let v130 : float = v121 + v85 │
00:00:38 #3743 [Verbose] > │ let v131 : float = v122 + v86 │
00:00:38 #3744 [Verbose] > │ let v132 : float = v123 + v87 │
00:00:38 #3745 [Verbose] > │ let v133 : float = v126 * 16666.666666666668 │
00:00:38 #3746 [Verbose] > │ let v134 : float = v6 + v133 │
00:00:38 #3747 [Verbose] > │ let v135 : float = 16666.666666666668 * v127 │
00:00:38 #3748 [Verbose] > │ let v136 : float = 16666.666666666668 * v128 │
00:00:38 #3749 [Verbose] > │ let v137 : float = 16666.666666666668 * v129 │
00:00:38 #3750 [Verbose] > │ let v138 : float = v3 + v135 │
00:00:38 #3751 [Verbose] > │ let v139 : float = v4 + v136 │
00:00:38 #3752 [Verbose] > │ let v140 : float = v5 + v137 │
00:00:38 #3753 [Verbose] > │ let v141 : float = 16666.666666666668 * v130 │
00:00:38 #3754 [Verbose] > │ let v142 : float = 16666.666666666668 * v131 │
00:00:38 #3755 [Verbose] > │ let v143 : float = 16666.666666666668 * v132 │
00:00:38 #3756 [Verbose] > │ let v144 : float = v7 + v141 │
00:00:38 #3757 [Verbose] > │ let v145 : float = v8 + v142 │
00:00:38 #3758 [Verbose] > │ let v146 : float = v9 + v143 │
00:00:38 #3759 [Verbose] > │ struct (v1, v2, v138, v139, v140, v134, v144, v145, v146) │
00:00:38 #3760 [Verbose] > │ and closure0 () (v0 : (struct (float * float * float * float * float * float │
00:00:38 #3761 [Verbose] > │ * float * float * float) -> struct (float * float * float * float * float * │
00:00:38 #3762 [Verbose] > │ float * float * float * float))) : (struct (float * float * float * float * │
00:00:38 #3763 [Verbose] > │ float * float * float * float * float) -> struct (float * float * float * │
00:00:38 #3764 [Verbose] > │ float * float * float * float * float * float)) = │
00:00:38 #3765 [Verbose] > │ closure1(v0) │
00:00:38 #3766 [Verbose] > │ and closure2 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 : │
00:00:38 #3767 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:38 #3768 [Verbose] > │ float * float * float * float * float * float * float * float) = │
00:00:38 #3769 [Verbose] > │ let v9 : float = 10.0 / v1 │
00:00:38 #3770 [Verbose] > │ let v10 : float = 0.0 / v1 │
00:00:38 #3771 [Verbose] > │ struct (0.0, 0.0, v6, v7, v8, 1.0, v9, v10, v10) │
00:00:38 #3772 [Verbose] > │ and closure3 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 : │
00:00:38 #3773 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:38 #3774 [Verbose] > │ float * float * float * float * float * float * float * float) = │
00:00:38 #3775 [Verbose] > │ let v9 : float = v6 / 299792458.0 │
00:00:38 #3776 [Verbose] > │ let v10 : float = v7 / 299792458.0 │
00:00:38 #3777 [Verbose] > │ let v11 : float = v8 / 299792458.0 │
00:00:38 #3778 [Verbose] > │ let v12 : float = v9 * v9 │
00:00:38 #3779 [Verbose] > │ let v13 : float = v10 * v10 │
00:00:38 #3780 [Verbose] > │ let v14 : float = v12 + v13 │
00:00:38 #3781 [Verbose] > │ let v15 : float = v11 * v11 │
00:00:38 #3782 [Verbose] > │ let v16 : float = v14 + v15 │
00:00:38 #3783 [Verbose] > │ let v17 : float = 1.0 - v16 │
00:00:38 #3784 [Verbose] > │ let v18 : float = sqrt v17 │
00:00:38 #3785 [Verbose] > │ let v19 : float = 10.0 * v9 │
00:00:38 #3786 [Verbose] > │ let v20 : float = 0.0 * v10 │
00:00:38 #3787 [Verbose] > │ let v21 : float = v19 + v20 │
00:00:38 #3788 [Verbose] > │ let v22 : float = 0.0 * v11 │
00:00:38 #3789 [Verbose] > │ let v23 : float = v21 + v22 │
00:00:38 #3790 [Verbose] > │ let v24 : float = v23 * v9 │
00:00:38 #3791 [Verbose] > │ let v25 : float = v23 * v10 │
00:00:38 #3792 [Verbose] > │ let v26 : float = v23 * v11 │
00:00:38 #3793 [Verbose] > │ let v27 : float = -1.0 * v24 │
00:00:38 #3794 [Verbose] > │ let v28 : float = -1.0 * v25 │
00:00:38 #3795 [Verbose] > │ let v29 : float = -1.0 * v26 │
00:00:38 #3796 [Verbose] > │ let v30 : float = 10.0 + v27 │
00:00:38 #3797 [Verbose] > │ let v31 : float = v18 * v30 │
00:00:38 #3798 [Verbose] > │ let v32 : float = v18 * v28 │
00:00:38 #3799 [Verbose] > │ let v33 : float = v18 * v29 │
00:00:38 #3800 [Verbose] > │ let v34 : float = v31 / v1 │
00:00:38 #3801 [Verbose] > │ let v35 : float = v32 / v1 │
00:00:38 #3802 [Verbose] > │ let v36 : float = v33 / v1 │
00:00:38 #3803 [Verbose] > │ struct (0.0, 0.0, v6, v7, v8, 1.0, v34, v35, v36) │
00:00:38 #3804 [Verbose] > │ and method2 (v0 : (struct (float * float * float * float * float * float * │
00:00:38 #3805 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:38 #3806 [Verbose] > │ float * float * float * float)), v1 : float, v2 : float, v3 : float, v4 : │
00:00:38 #3807 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float, v9 : float, v10 : │
00:00:38 #3808 [Verbose] > │ int32) : struct (float * float * float * float * float * float * float * │
00:00:38 #3809 [Verbose] > │ float * float) = │
00:00:38 #3810 [Verbose] > │ let v11 : bool = v10 <= 0 │
00:00:38 #3811 [Verbose] > │ if v11 then │
00:00:38 #3812 [Verbose] > │ struct (v1, v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:38 #3813 [Verbose] > │ else │
00:00:38 #3814 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 │
00:00:38 #3815 [Verbose] > │ : float, v17 : float, v18 : float, v19 : float, v20 : float) = v0 struct │
00:00:38 #3816 [Verbose] > │ (v1, v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:38 #3817 [Verbose] > │ let v21 : int32 = v10 - 1 │
00:00:38 #3818 [Verbose] > │ method2(v0, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) │
00:00:38 #3819 [Verbose] > │ and method3 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:38 #3820 [Verbose] > │ match v0 with │
00:00:38 #3821 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:38 #3822 [Verbose] > │ let v12 : UH0 = UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:38 #3823 [Verbose] > │ method3(v11, v12) │
00:00:38 #3824 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:38 #3825 [Verbose] > │ v1 │
00:00:38 #3826 [Verbose] > │ and method1 (v0 : (struct (float * float * float * float * float * float * │
00:00:38 #3827 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:38 #3828 [Verbose] > │ float * float * float * float)), v1 : UH0, v2 : int32) : UH0 = │
00:00:38 #3829 [Verbose] > │ let v3 : float = 0.0 │
00:00:38 #3830 [Verbose] > │ let v4 : float = 1.0 │
00:00:38 #3831 [Verbose] > │ let v5 : float = 0.0 │
00:00:38 #3832 [Verbose] > │ let v6 : float = 0.0 │
00:00:38 #3833 [Verbose] > │ let v7 : float = 0.0 │
00:00:38 #3834 [Verbose] > │ let v8 : float = 0.0 │
00:00:38 #3835 [Verbose] > │ let v9 : float = 0.0 │
00:00:38 #3836 [Verbose] > │ let v10 : float = 0.0 │
00:00:38 #3837 [Verbose] > │ let v11 : float = 0.0 │
00:00:38 #3838 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 : │
00:00:38 #3839 [Verbose] > │ float, v17 : float, v18 : float, v19 : float, v20 : float) = method2(v0, v3, │
00:00:38 #3840 [Verbose] > │ v4, v5, v6, v7, v8, v9, v10, v11, v2) │
00:00:38 #3841 [Verbose] > │ let v21 : bool = v17 <= 31557600.0 │
00:00:38 #3842 [Verbose] > │ if v21 then │
00:00:38 #3843 [Verbose] > │ let v22 : UH0 = UH0_0(v12, v13, v14, v15, v16, v17, v18, v19, v20, │
00:00:38 #3844 [Verbose] > │ v1) │
00:00:38 #3845 [Verbose] > │ let v23 : int32 = v2 + 1 │
00:00:38 #3846 [Verbose] > │ method1(v0, v22, v23) │
00:00:38 #3847 [Verbose] > │ else │
00:00:38 #3848 [Verbose] > │ let v25 : UH0 = UH0_1 │
00:00:38 #3849 [Verbose] > │ method3(v1, v25) │
00:00:38 #3850 [Verbose] > │ and method4 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:38 #3851 [Verbose] > │ match v0 with │
00:00:38 #3852 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:38 #3853 [Verbose] > │ let v12 : UH1 = method4(v11, v1) │
00:00:38 #3854 [Verbose] > │ let v13 : float = v7 / 31557600.0 │
00:00:38 #3855 [Verbose] > │ let v14 : float = v8 / 299792458.0 │
00:00:38 #3856 [Verbose] > │ UH1_0(v13, v14, v12) │
00:00:38 #3857 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:38 #3858 [Verbose] > │ v1 │
00:00:38 #3859 [Verbose] > │ and method5 (v0 : UH1, v1 : UH2, v2 : UH2) : struct (UH2 * UH2) = │
00:00:38 #3860 [Verbose] > │ match v0 with │
00:00:38 #3861 [Verbose] > │ | UH1_0(v3, v4, v5) -> (* Cons *) │
00:00:38 #3862 [Verbose] > │ let v6 : UH2 = UH2_0(v3, v1) │
00:00:38 #3863 [Verbose] > │ let v7 : UH2 = UH2_0(v4, v2) │
00:00:38 #3864 [Verbose] > │ method5(v5, v6, v7) │
00:00:38 #3865 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:38 #3866 [Verbose] > │ struct (v1, v2) │
00:00:38 #3867 [Verbose] > │ and method6 (v0 : UH2, v1 : UH2) : UH2 = │
00:00:38 #3868 [Verbose] > │ match v0 with │
00:00:38 #3869 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:38 #3870 [Verbose] > │ let v4 : UH2 = UH2_0(v2, v1) │
00:00:38 #3871 [Verbose] > │ method6(v3, v4) │
00:00:38 #3872 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:38 #3873 [Verbose] > │ v1 │
00:00:38 #3874 [Verbose] > │ and method7 (v0 : (struct (float * float * float * float * float * float * │
00:00:38 #3875 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:38 #3876 [Verbose] > │ float * float * float * float)), v1 : UH0, v2 : int32) : UH0 = │
00:00:38 #3877 [Verbose] > │ let v3 : float = 0.0 │
00:00:38 #3878 [Verbose] > │ let v4 : float = 1.0 │
00:00:38 #3879 [Verbose] > │ let v5 : float = 0.0 │
00:00:38 #3880 [Verbose] > │ let v6 : float = 0.0 │
00:00:38 #3881 [Verbose] > │ let v7 : float = 0.0 │
00:00:38 #3882 [Verbose] > │ let v8 : float = 0.0 │
00:00:38 #3883 [Verbose] > │ let v9 : float = 0.0 │
00:00:38 #3884 [Verbose] > │ let v10 : float = 0.0 │
00:00:38 #3885 [Verbose] > │ let v11 : float = 0.0 │
00:00:38 #3886 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 : │
00:00:38 #3887 [Verbose] > │ float, v17 : float, v18 : float, v19 : float, v20 : float) = method2(v0, v3, │
00:00:38 #3888 [Verbose] > │ v4, v5, v6, v7, v8, v9, v10, v11, v2) │
00:00:38 #3889 [Verbose] > │ let v21 : bool = v17 <= 31557600.0 │
00:00:38 #3890 [Verbose] > │ if v21 then │
00:00:38 #3891 [Verbose] > │ let v22 : UH0 = UH0_0(v12, v13, v14, v15, v16, v17, v18, v19, v20, │
00:00:38 #3892 [Verbose] > │ v1) │
00:00:38 #3893 [Verbose] > │ let v23 : int32 = v2 + 1 │
00:00:38 #3894 [Verbose] > │ method7(v0, v22, v23) │
00:00:38 #3895 [Verbose] > │ else │
00:00:38 #3896 [Verbose] > │ let v25 : UH0 = UH0_1 │
00:00:38 #3897 [Verbose] > │ method3(v1, v25) │
00:00:38 #3898 [Verbose] > │ and method8 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:38 #3899 [Verbose] > │ match v0 with │
00:00:38 #3900 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:38 #3901 [Verbose] > │ let v12 : UH1 = method8(v11, v1) │
00:00:38 #3902 [Verbose] > │ let v13 : float = v7 / 31557600.0 │
00:00:38 #3903 [Verbose] > │ let v14 : float = v8 / 299792458.0 │
00:00:38 #3904 [Verbose] > │ UH1_0(v13, v14, v12) │
00:00:38 #3905 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:38 #3906 [Verbose] > │ v1 │
00:00:38 #3907 [Verbose] > │ and method10 (v0 : UH2, v1 : int32) : int32 = │
00:00:38 #3908 [Verbose] > │ match v0 with │
00:00:38 #3909 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:38 #3910 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:38 #3911 [Verbose] > │ method10(v3, v4) │
00:00:38 #3912 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:38 #3913 [Verbose] > │ v1 │
00:00:38 #3914 [Verbose] > │ and method11 (v0 : (float []), v1 : UH2, v2 : int32) : int32 = │
00:00:38 #3915 [Verbose] > │ match v1 with │
00:00:38 #3916 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:38 #3917 [Verbose] > │ v0.[int v2] <- v3 │
00:00:38 #3918 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:38 #3919 [Verbose] > │ method11(v0, v4, v5) │
00:00:38 #3920 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:38 #3921 [Verbose] > │ v2 │
00:00:38 #3922 [Verbose] > │ and method9 (v0 : UH2) : (float []) = │
00:00:38 #3923 [Verbose] > │ let v1 : int32 = 0 │
00:00:38 #3924 [Verbose] > │ let v2 : int32 = method10(v0, v1) │
00:00:38 #3925 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:38 #3926 [Verbose] > │ let v4 : int32 = 0 │
00:00:38 #3927 [Verbose] > │ let v5 : int32 = method11(v3, v0, v4) │
00:00:38 #3928 [Verbose] > │ v3 │
00:00:38 #3929 [Verbose] > │ and method12 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:38 #3930 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:38 #3931 [Verbose] > │ v0 │
00:00:38 #3932 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:38 #3933 [Verbose] > │ []) * (float [])) [])) = │
00:00:38 #3934 [Verbose] > │ let v0 : ((struct (float * float * float * float * float * float * float │
00:00:38 #3935 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:38 #3936 [Verbose] > │ float * float * float)) -> (struct (float * float * float * float * float * │
00:00:38 #3937 [Verbose] > │ float * float * float * float) -> struct (float * float * float * float * │
00:00:38 #3938 [Verbose] > │ float * float * float * float * float))) = closure0() │
00:00:38 #3939 [Verbose] > │ let v1 : (struct (float * float * float * float * float * float * float │
00:00:38 #3940 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:38 #3941 [Verbose] > │ float * float * float)) = closure2() │
00:00:38 #3942 [Verbose] > │ let v2 : (struct (float * float * float * float * float * float * float │
00:00:38 #3943 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:38 #3944 [Verbose] > │ float * float * float)) = v0 v1 │
00:00:38 #3945 [Verbose] > │ let v3 : (struct (float * float * float * float * float * float * float │
00:00:38 #3946 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:38 #3947 [Verbose] > │ float * float * float)) = closure3() │
00:00:38 #3948 [Verbose] > │ let v4 : (struct (float * float * float * float * float * float * float │
00:00:38 #3949 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:38 #3950 [Verbose] > │ float * float * float)) = v0 v3 │
00:00:38 #3951 [Verbose] > │ let v5 : UH0 = UH0_1 │
00:00:38 #3952 [Verbose] > │ let v6 : int32 = 0 │
00:00:38 #3953 [Verbose] > │ let v7 : UH0 = method1(v2, v5, v6) │
00:00:38 #3954 [Verbose] > │ let v8 : UH1 = UH1_1 │
00:00:38 #3955 [Verbose] > │ let v9 : UH1 = method4(v7, v8) │
00:00:38 #3956 [Verbose] > │ let v10 : UH2 = UH2_1 │
00:00:38 #3957 [Verbose] > │ let v11 : UH2 = UH2_1 │
00:00:38 #3958 [Verbose] > │ let struct (v12 : UH2, v13 : UH2) = method5(v9, v10, v11) │
00:00:38 #3959 [Verbose] > │ let v14 : UH2 = UH2_1 │
00:00:38 #3960 [Verbose] > │ let v15 : UH2 = method6(v12, v14) │
00:00:38 #3961 [Verbose] > │ let v16 : UH2 = UH2_1 │
00:00:38 #3962 [Verbose] > │ let v17 : UH2 = method6(v13, v16) │
00:00:38 #3963 [Verbose] > │ let v18 : UH0 = UH0_1 │
00:00:38 #3964 [Verbose] > │ let v19 : int32 = 0 │
00:00:38 #3965 [Verbose] > │ let v20 : UH0 = method7(v4, v18, v19) │
00:00:38 #3966 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:38 #3967 [Verbose] > │ let v22 : UH1 = method8(v20, v21) │
00:00:38 #3968 [Verbose] > │ let v23 : UH2 = UH2_1 │
00:00:38 #3969 [Verbose] > │ let v24 : UH2 = UH2_1 │
00:00:38 #3970 [Verbose] > │ let struct (v25 : UH2, v26 : UH2) = method5(v22, v23, v24) │
00:00:38 #3971 [Verbose] > │ let v27 : UH2 = UH2_1 │
00:00:38 #3972 [Verbose] > │ let v28 : UH2 = method6(v25, v27) │
00:00:38 #3973 [Verbose] > │ let v29 : UH2 = UH2_1 │
00:00:38 #3974 [Verbose] > │ let v30 : UH2 = method6(v26, v29) │
00:00:38 #3975 [Verbose] > │ let v31 : (float []) = method9(v15) │
00:00:38 #3976 [Verbose] > │ let v32 : (float []) = method9(v17) │
00:00:38 #3977 [Verbose] > │ let v33 : (float []) = method9(v30) │
00:00:38 #3978 [Verbose] > │ let v34 : string = "newtonian" │
00:00:38 #3979 [Verbose] > │ let v35 : string = "relativistic" │
00:00:38 #3980 [Verbose] > │ let v36 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:38 #3981 [Verbose] > │ (v34, v31, v32); struct (v35, v31, v33)|] │
00:00:38 #3982 [Verbose] > │ let v37 : (struct (string * (float []) * (float [])) []) = method12(v36) │
00:00:38 #3983 [Verbose] > │ let v38 : string = "response to a constant force" │
00:00:38 #3984 [Verbose] > │ let v39 : string = "time (years)" │
00:00:38 #3985 [Verbose] > │ let v40 : string = "velocity (multiples of c)" │
00:00:38 #3986 [Verbose] > │ struct (v38, v39, v40, v37) │
00:00:38 #3987 [Verbose] > │ method0() │
00:00:38 #3988 [Verbose] > │ │
00:00:38 #3989 [Verbose] > │ │
00:00:38 #3990 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:38 #3991 [Verbose] >
00:00:38 #3992 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:38 #3993 [Verbose] > inl uniform_lorentz_force v_e v_b (st : particle_state) =
00:00:38 #3994 [Verbose] > st.charge *^ (v_e ^+^ st.velocity >< v_b)
00:00:38 #3995 [Verbose] >
00:00:38 #3996 [Verbose] > ╭─[ 363.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:38 #3997 [Verbose] > │ () │
00:00:38 #3998 [Verbose] > │ │
00:00:38 #3999 [Verbose] > │ │
00:00:38 #4000 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:38 #4001 [Verbose] >
00:00:38 #4002 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:38 #4003 [Verbose] > // // test
00:00:38 #4004 [Verbose] >
00:00:38 #4005 [Verbose] > inl c : f64 = 299792458
00:00:38 #4006 [Verbose] > inl ~method = runge_kutta_4 0.000000001
00:00:38 #4007 [Verbose] > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]]
00:00:38 #4008 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:38 #4009 [Verbose] > inl initial_state =
00:00:38 #4010 [Verbose] > particle_state { default_particle_state' with
00:00:38 #4011 [Verbose] > mass = 0.000000000000000000000000001672621898
00:00:38 #4012 [Verbose] > charge = 0.0000000000000000001602176621
00:00:38 #4013 [Verbose] > velocity = 0.8 *^ (c *^ j_hat ())
00:00:38 #4014 [Verbose] > }
00:00:38 #4015 [Verbose] >
00:00:38 #4016 [Verbose] > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:00:38 #4017 [Verbose] > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:00:38 #4018 [Verbose] >
00:00:38 #4019 [Verbose] > inl newton_x, newton_y =
00:00:38 #4020 [Verbose] > newton_states
00:00:38 #4021 [Verbose] > >> Some
00:00:38 #4022 [Verbose] > |> seq.take_while_ (fun (particle_state st) i => i < 100i32)
00:00:38 #4023 [Verbose] > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:00:38 #4024 [Verbose] > |> listm'.unzip
00:00:38 #4025 [Verbose] >
00:00:38 #4026 [Verbose] > inl relativity_x, relativity_y =
00:00:38 #4027 [Verbose] > relativity_states
00:00:38 #4028 [Verbose] > >> Some
00:00:38 #4029 [Verbose] > |> seq.take_while_ (fun (particle_state st) i => i < 165i32)
00:00:38 #4030 [Verbose] > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:00:38 #4031 [Verbose] > |> listm'.unzip
00:00:38 #4032 [Verbose] >
00:00:38 #4033 [Verbose] > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:00:38 #4034 [Verbose] > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:00:38 #4035 [Verbose] >
00:00:38 #4036 [Verbose] > inl relativity_x : a i32 _ = relativity_x |> listm.toArray
00:00:38 #4037 [Verbose] > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:00:38 #4038 [Verbose] >
00:00:38 #4039 [Verbose] > "proton in a 1-t magnetic field",
00:00:38 #4040 [Verbose] > "x (m)",
00:00:38 #4041 [Verbose] > "y (m)",
00:00:38 #4042 [Verbose] > ;[[
00:00:38 #4043 [Verbose] > "newtonian", newton_x, newton_y
00:00:38 #4044 [Verbose] > "relativistic", relativity_x, relativity_y
00:00:38 #4045 [Verbose] > ]]
00:00:39 #4046 [Verbose] >
00:00:39 #4047 [Verbose] > ╭─[ 554.33ms - return value ]──────────────────────────────────────────────────╮
00:00:39 #4048 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:39 #4049 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:39 #4050 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:39 #4051 [Verbose] > │ stroke="none"/> │
00:00:39 #4052 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:39 #4053 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:39 #4054 [Verbose] > │ fill="#FFFFFF"> │
00:00:39 #4055 [Verbose] > │ proton in a 1-t magnetic field │
00:00:39 #4056 [Verbose] > │ </text> │
00:00:39 #4057 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │
00:00:39 #4058 [Verbose] > │ y2="75"/> │
00:00:39 #4059 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:39 #4060 [Verbose] > │ y2="75"/> │
00:00:39 #4061 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │
00:00:39 #4062 [Verbose] > │ y2="75"/> │
00:00:39 #4063 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:00:39 #4064 [Verbose] > │ y2="75"/> │
00:00:39 #4065 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x... │
00:00:39 #4066 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 #4067 [Verbose] >
00:00:39 #4068 [Verbose] > ╭─[ 574.58ms - stdout ]────────────────────────────────────────────────────────╮
00:00:39 #4069 [Verbose] > │ type UH0 = │
00:00:39 #4070 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:39 #4071 [Verbose] > │ * float * UH0 │
00:00:39 #4072 [Verbose] > │ | UH0_1 │
00:00:39 #4073 [Verbose] > │ and UH1 = │
00:00:39 #4074 [Verbose] > │ | UH1_0 of float * float * UH1 │
00:00:39 #4075 [Verbose] > │ | UH1_1 │
00:00:39 #4076 [Verbose] > │ and UH2 = │
00:00:39 #4077 [Verbose] > │ | UH2_0 of float * UH2 │
00:00:39 #4078 [Verbose] > │ | UH2_1 │
00:00:39 #4079 [Verbose] > │ let rec closure1 (v0 : (struct (float * float * float * float * float * │
00:00:39 #4080 [Verbose] > │ float * float * float * float) -> struct (float * float * float * float * │
00:00:39 #4081 [Verbose] > │ float * float * float * float * float))) struct (v1 : float, v2 : float, v3 │
00:00:39 #4082 [Verbose] > │ : float, v4 : float, v5 : float, v6 : float, v7 : float, v8 : float, v9 : │
00:00:39 #4083 [Verbose] > │ float) : struct (float * float * float * float * float * float * float * │
00:00:39 #4084 [Verbose] > │ float * float) = │
00:00:39 #4085 [Verbose] > │ let struct (v10 : float, v11 : float, v12 : float, v13 : float, v14 : │
00:00:39 #4086 [Verbose] > │ float, v15 : float, v16 : float, v17 : float, v18 : float) = v0 struct (v1, │
00:00:39 #4087 [Verbose] > │ v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:39 #4088 [Verbose] > │ let v19 : float = v15 * 5E-10 │
00:00:39 #4089 [Verbose] > │ let v20 : float = v6 + v19 │
00:00:39 #4090 [Verbose] > │ let v21 : float = 5E-10 * v12 │
00:00:39 #4091 [Verbose] > │ let v22 : float = 5E-10 * v13 │
00:00:39 #4092 [Verbose] > │ let v23 : float = 5E-10 * v14 │
00:00:39 #4093 [Verbose] > │ let v24 : float = v3 + v21 │
00:00:39 #4094 [Verbose] > │ let v25 : float = v4 + v22 │
00:00:39 #4095 [Verbose] > │ let v26 : float = v5 + v23 │
00:00:39 #4096 [Verbose] > │ let v27 : float = 5E-10 * v16 │
00:00:39 #4097 [Verbose] > │ let v28 : float = 5E-10 * v17 │
00:00:39 #4098 [Verbose] > │ let v29 : float = 5E-10 * v18 │
00:00:39 #4099 [Verbose] > │ let v30 : float = v7 + v27 │
00:00:39 #4100 [Verbose] > │ let v31 : float = v8 + v28 │
00:00:39 #4101 [Verbose] > │ let v32 : float = v9 + v29 │
00:00:39 #4102 [Verbose] > │ let struct (v33 : float, v34 : float, v35 : float, v36 : float, v37 : │
00:00:39 #4103 [Verbose] > │ float, v38 : float, v39 : float, v40 : float, v41 : float) = v0 struct (v1, │
00:00:39 #4104 [Verbose] > │ v2, v24, v25, v26, v20, v30, v31, v32) │
00:00:39 #4105 [Verbose] > │ let v42 : float = v38 * 5E-10 │
00:00:39 #4106 [Verbose] > │ let v43 : float = v6 + v42 │
00:00:39 #4107 [Verbose] > │ let v44 : float = 5E-10 * v35 │
00:00:39 #4108 [Verbose] > │ let v45 : float = 5E-10 * v36 │
00:00:39 #4109 [Verbose] > │ let v46 : float = 5E-10 * v37 │
00:00:39 #4110 [Verbose] > │ let v47 : float = v3 + v44 │
00:00:39 #4111 [Verbose] > │ let v48 : float = v4 + v45 │
00:00:39 #4112 [Verbose] > │ let v49 : float = v5 + v46 │
00:00:39 #4113 [Verbose] > │ let v50 : float = 5E-10 * v39 │
00:00:39 #4114 [Verbose] > │ let v51 : float = 5E-10 * v40 │
00:00:39 #4115 [Verbose] > │ let v52 : float = 5E-10 * v41 │
00:00:39 #4116 [Verbose] > │ let v53 : float = v7 + v50 │
00:00:39 #4117 [Verbose] > │ let v54 : float = v8 + v51 │
00:00:39 #4118 [Verbose] > │ let v55 : float = v9 + v52 │
00:00:39 #4119 [Verbose] > │ let struct (v56 : float, v57 : float, v58 : float, v59 : float, v60 : │
00:00:39 #4120 [Verbose] > │ float, v61 : float, v62 : float, v63 : float, v64 : float) = v0 struct (v1, │
00:00:39 #4121 [Verbose] > │ v2, v47, v48, v49, v43, v53, v54, v55) │
00:00:39 #4122 [Verbose] > │ let v65 : float = v61 * 1E-09 │
00:00:39 #4123 [Verbose] > │ let v66 : float = v6 + v65 │
00:00:39 #4124 [Verbose] > │ let v67 : float = 1E-09 * v58 │
00:00:39 #4125 [Verbose] > │ let v68 : float = 1E-09 * v59 │
00:00:39 #4126 [Verbose] > │ let v69 : float = 1E-09 * v60 │
00:00:39 #4127 [Verbose] > │ let v70 : float = v3 + v67 │
00:00:39 #4128 [Verbose] > │ let v71 : float = v4 + v68 │
00:00:39 #4129 [Verbose] > │ let v72 : float = v5 + v69 │
00:00:39 #4130 [Verbose] > │ let v73 : float = 1E-09 * v62 │
00:00:39 #4131 [Verbose] > │ let v74 : float = 1E-09 * v63 │
00:00:39 #4132 [Verbose] > │ let v75 : float = 1E-09 * v64 │
00:00:39 #4133 [Verbose] > │ let v76 : float = v7 + v73 │
00:00:39 #4134 [Verbose] > │ let v77 : float = v8 + v74 │
00:00:39 #4135 [Verbose] > │ let v78 : float = v9 + v75 │
00:00:39 #4136 [Verbose] > │ let struct (v79 : float, v80 : float, v81 : float, v82 : float, v83 : │
00:00:39 #4137 [Verbose] > │ float, v84 : float, v85 : float, v86 : float, v87 : float) = v0 struct (v1, │
00:00:39 #4138 [Verbose] > │ v2, v70, v71, v72, v66, v76, v77, v78) │
00:00:39 #4139 [Verbose] > │ let v88 : float = v10 + v33 │
00:00:39 #4140 [Verbose] > │ let v89 : float = v11 + v34 │
00:00:39 #4141 [Verbose] > │ let v90 : float = v15 + v38 │
00:00:39 #4142 [Verbose] > │ let v91 : float = v12 + v35 │
00:00:39 #4143 [Verbose] > │ let v92 : float = v13 + v36 │
00:00:39 #4144 [Verbose] > │ let v93 : float = v14 + v37 │
00:00:39 #4145 [Verbose] > │ let v94 : float = v16 + v39 │
00:00:39 #4146 [Verbose] > │ let v95 : float = v17 + v40 │
00:00:39 #4147 [Verbose] > │ let v96 : float = v18 + v41 │
00:00:39 #4148 [Verbose] > │ let v97 : float = v88 + v33 │
00:00:39 #4149 [Verbose] > │ let v98 : float = v89 + v34 │
00:00:39 #4150 [Verbose] > │ let v99 : float = v90 + v38 │
00:00:39 #4151 [Verbose] > │ let v100 : float = v91 + v35 │
00:00:39 #4152 [Verbose] > │ let v101 : float = v92 + v36 │
00:00:39 #4153 [Verbose] > │ let v102 : float = v93 + v37 │
00:00:39 #4154 [Verbose] > │ let v103 : float = v94 + v39 │
00:00:39 #4155 [Verbose] > │ let v104 : float = v95 + v40 │
00:00:39 #4156 [Verbose] > │ let v105 : float = v96 + v41 │
00:00:39 #4157 [Verbose] > │ let v106 : float = v97 + v56 │
00:00:39 #4158 [Verbose] > │ let v107 : float = v98 + v57 │
00:00:39 #4159 [Verbose] > │ let v108 : float = v99 + v61 │
00:00:39 #4160 [Verbose] > │ let v109 : float = v100 + v58 │
00:00:39 #4161 [Verbose] > │ let v110 : float = v101 + v59 │
00:00:39 #4162 [Verbose] > │ let v111 : float = v102 + v60 │
00:00:39 #4163 [Verbose] > │ let v112 : float = v103 + v62 │
00:00:39 #4164 [Verbose] > │ let v113 : float = v104 + v63 │
00:00:39 #4165 [Verbose] > │ let v114 : float = v105 + v64 │
00:00:39 #4166 [Verbose] > │ let v115 : float = v106 + v56 │
00:00:39 #4167 [Verbose] > │ let v116 : float = v107 + v57 │
00:00:39 #4168 [Verbose] > │ let v117 : float = v108 + v61 │
00:00:39 #4169 [Verbose] > │ let v118 : float = v109 + v58 │
00:00:39 #4170 [Verbose] > │ let v119 : float = v110 + v59 │
00:00:39 #4171 [Verbose] > │ let v120 : float = v111 + v60 │
00:00:39 #4172 [Verbose] > │ let v121 : float = v112 + v62 │
00:00:39 #4173 [Verbose] > │ let v122 : float = v113 + v63 │
00:00:39 #4174 [Verbose] > │ let v123 : float = v114 + v64 │
00:00:39 #4175 [Verbose] > │ let v124 : float = v115 + v79 │
00:00:39 #4176 [Verbose] > │ let v125 : float = v116 + v80 │
00:00:39 #4177 [Verbose] > │ let v126 : float = v117 + v84 │
00:00:39 #4178 [Verbose] > │ let v127 : float = v118 + v81 │
00:00:39 #4179 [Verbose] > │ let v128 : float = v119 + v82 │
00:00:39 #4180 [Verbose] > │ let v129 : float = v120 + v83 │
00:00:39 #4181 [Verbose] > │ let v130 : float = v121 + v85 │
00:00:39 #4182 [Verbose] > │ let v131 : float = v122 + v86 │
00:00:39 #4183 [Verbose] > │ let v132 : float = v123 + v87 │
00:00:39 #4184 [Verbose] > │ let v133 : float = v126 * 1.6666666666666669E-10 │
00:00:39 #4185 [Verbose] > │ let v134 : float = v6 + v133 │
00:00:39 #4186 [Verbose] > │ let v135 : float = 1.6666666666666669E-10 * v127 │
00:00:39 #4187 [Verbose] > │ let v136 : float = 1.6666666666666669E-10 * v128 │
00:00:39 #4188 [Verbose] > │ let v137 : float = 1.6666666666666669E-10 * v129 │
00:00:39 #4189 [Verbose] > │ let v138 : float = v3 + v135 │
00:00:39 #4190 [Verbose] > │ let v139 : float = v4 + v136 │
00:00:39 #4191 [Verbose] > │ let v140 : float = v5 + v137 │
00:00:39 #4192 [Verbose] > │ let v141 : float = 1.6666666666666669E-10 * v130 │
00:00:39 #4193 [Verbose] > │ let v142 : float = 1.6666666666666669E-10 * v131 │
00:00:39 #4194 [Verbose] > │ let v143 : float = 1.6666666666666669E-10 * v132 │
00:00:39 #4195 [Verbose] > │ let v144 : float = v7 + v141 │
00:00:39 #4196 [Verbose] > │ let v145 : float = v8 + v142 │
00:00:39 #4197 [Verbose] > │ let v146 : float = v9 + v143 │
00:00:39 #4198 [Verbose] > │ struct (v1, v2, v138, v139, v140, v134, v144, v145, v146) │
00:00:39 #4199 [Verbose] > │ and closure0 () (v0 : (struct (float * float * float * float * float * float │
00:00:39 #4200 [Verbose] > │ * float * float * float) -> struct (float * float * float * float * float * │
00:00:39 #4201 [Verbose] > │ float * float * float * float))) : (struct (float * float * float * float * │
00:00:39 #4202 [Verbose] > │ float * float * float * float * float) -> struct (float * float * float * │
00:00:39 #4203 [Verbose] > │ float * float * float * float * float * float)) = │
00:00:39 #4204 [Verbose] > │ closure1(v0) │
00:00:39 #4205 [Verbose] > │ and closure2 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 : │
00:00:39 #4206 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:39 #4207 [Verbose] > │ float * float * float * float * float * float * float * float) = │
00:00:39 #4208 [Verbose] > │ let v9 : float = v8 * 0.0 │
00:00:39 #4209 [Verbose] > │ let v10 : float = v7 - v9 │
00:00:39 #4210 [Verbose] > │ let v11 : float = v9 - v6 │
00:00:39 #4211 [Verbose] > │ let v12 : float = v6 * 0.0 │
00:00:39 #4212 [Verbose] > │ let v13 : float = v7 * 0.0 │
00:00:39 #4213 [Verbose] > │ let v14 : float = v12 - v13 │
00:00:39 #4214 [Verbose] > │ let v15 : float = v0 * v10 │
00:00:39 #4215 [Verbose] > │ let v16 : float = v0 * v11 │
00:00:39 #4216 [Verbose] > │ let v17 : float = v0 * v14 │
00:00:39 #4217 [Verbose] > │ let v18 : float = v15 / v1 │
00:00:39 #4218 [Verbose] > │ let v19 : float = v16 / v1 │
00:00:39 #4219 [Verbose] > │ let v20 : float = v17 / v1 │
00:00:39 #4220 [Verbose] > │ struct (0.0, 0.0, v6, v7, v8, 1.0, v18, v19, v20) │
00:00:39 #4221 [Verbose] > │ and closure3 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 : │
00:00:39 #4222 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:39 #4223 [Verbose] > │ float * float * float * float * float * float * float * float) = │
00:00:39 #4224 [Verbose] > │ let v9 : float = v8 * 0.0 │
00:00:39 #4225 [Verbose] > │ let v10 : float = v7 - v9 │
00:00:39 #4226 [Verbose] > │ let v11 : float = v9 - v6 │
00:00:39 #4227 [Verbose] > │ let v12 : float = v6 * 0.0 │
00:00:39 #4228 [Verbose] > │ let v13 : float = v7 * 0.0 │
00:00:39 #4229 [Verbose] > │ let v14 : float = v12 - v13 │
00:00:39 #4230 [Verbose] > │ let v15 : float = v0 * v10 │
00:00:39 #4231 [Verbose] > │ let v16 : float = v0 * v11 │
00:00:39 #4232 [Verbose] > │ let v17 : float = v0 * v14 │
00:00:39 #4233 [Verbose] > │ let v18 : float = v6 / 299792458.0 │
00:00:39 #4234 [Verbose] > │ let v19 : float = v7 / 299792458.0 │
00:00:39 #4235 [Verbose] > │ let v20 : float = v8 / 299792458.0 │
00:00:39 #4236 [Verbose] > │ let v21 : float = v18 * v18 │
00:00:39 #4237 [Verbose] > │ let v22 : float = v19 * v19 │
00:00:39 #4238 [Verbose] > │ let v23 : float = v21 + v22 │
00:00:39 #4239 [Verbose] > │ let v24 : float = v20 * v20 │
00:00:39 #4240 [Verbose] > │ let v25 : float = v23 + v24 │
00:00:39 #4241 [Verbose] > │ let v26 : float = 1.0 - v25 │
00:00:39 #4242 [Verbose] > │ let v27 : float = sqrt v26 │
00:00:39 #4243 [Verbose] > │ let v28 : float = v15 * v18 │
00:00:39 #4244 [Verbose] > │ let v29 : float = v16 * v19 │
00:00:39 #4245 [Verbose] > │ let v30 : float = v28 + v29 │
00:00:39 #4246 [Verbose] > │ let v31 : float = v17 * v20 │
00:00:39 #4247 [Verbose] > │ let v32 : float = v30 + v31 │
00:00:39 #4248 [Verbose] > │ let v33 : float = v32 * v18 │
00:00:39 #4249 [Verbose] > │ let v34 : float = v32 * v19 │
00:00:39 #4250 [Verbose] > │ let v35 : float = v32 * v20 │
00:00:39 #4251 [Verbose] > │ let v36 : float = -1.0 * v33 │
00:00:39 #4252 [Verbose] > │ let v37 : float = -1.0 * v34 │
00:00:39 #4253 [Verbose] > │ let v38 : float = -1.0 * v35 │
00:00:39 #4254 [Verbose] > │ let v39 : float = v15 + v36 │
00:00:39 #4255 [Verbose] > │ let v40 : float = v16 + v37 │
00:00:39 #4256 [Verbose] > │ let v41 : float = v17 + v38 │
00:00:39 #4257 [Verbose] > │ let v42 : float = v27 * v39 │
00:00:39 #4258 [Verbose] > │ let v43 : float = v27 * v40 │
00:00:39 #4259 [Verbose] > │ let v44 : float = v27 * v41 │
00:00:39 #4260 [Verbose] > │ let v45 : float = v42 / v1 │
00:00:39 #4261 [Verbose] > │ let v46 : float = v43 / v1 │
00:00:39 #4262 [Verbose] > │ let v47 : float = v44 / v1 │
00:00:39 #4263 [Verbose] > │ struct (0.0, 0.0, v6, v7, v8, 1.0, v45, v46, v47) │
00:00:39 #4264 [Verbose] > │ and method2 (v0 : (struct (float * float * float * float * float * float * │
00:00:39 #4265 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:39 #4266 [Verbose] > │ float * float * float * float)), v1 : float, v2 : float, v3 : float, v4 : │
00:00:39 #4267 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float, v9 : float, v10 : │
00:00:39 #4268 [Verbose] > │ int32) : struct (float * float * float * float * float * float * float * │
00:00:39 #4269 [Verbose] > │ float * float) = │
00:00:39 #4270 [Verbose] > │ let v11 : bool = v10 <= 0 │
00:00:39 #4271 [Verbose] > │ if v11 then │
00:00:39 #4272 [Verbose] > │ struct (v1, v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:39 #4273 [Verbose] > │ else │
00:00:39 #4274 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 │
00:00:39 #4275 [Verbose] > │ : float, v17 : float, v18 : float, v19 : float, v20 : float) = v0 struct │
00:00:39 #4276 [Verbose] > │ (v1, v2, v3, v4, v5, v6, v7, v8, v9) │
00:00:39 #4277 [Verbose] > │ let v21 : int32 = v10 - 1 │
00:00:39 #4278 [Verbose] > │ method2(v0, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) │
00:00:39 #4279 [Verbose] > │ and method3 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:39 #4280 [Verbose] > │ match v0 with │
00:00:39 #4281 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:39 #4282 [Verbose] > │ let v12 : UH0 = UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:39 #4283 [Verbose] > │ method3(v11, v12) │
00:00:39 #4284 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:39 #4285 [Verbose] > │ v1 │
00:00:39 #4286 [Verbose] > │ and method1 (v0 : (struct (float * float * float * float * float * float * │
00:00:39 #4287 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:39 #4288 [Verbose] > │ float * float * float * float)), v1 : UH0, v2 : int32) : UH0 = │
00:00:39 #4289 [Verbose] > │ let v3 : float = 1.602176621E-19 │
00:00:39 #4290 [Verbose] > │ let v4 : float = 1.672621898E-27 │
00:00:39 #4291 [Verbose] > │ let v5 : float = 0.0 │
00:00:39 #4292 [Verbose] > │ let v6 : float = 0.0 │
00:00:39 #4293 [Verbose] > │ let v7 : float = 0.0 │
00:00:39 #4294 [Verbose] > │ let v8 : float = 0.0 │
00:00:39 #4295 [Verbose] > │ let v9 : float = 0.0 │
00:00:39 #4296 [Verbose] > │ let v10 : float = 239833966.4 │
00:00:39 #4297 [Verbose] > │ let v11 : float = 0.0 │
00:00:39 #4298 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 : │
00:00:39 #4299 [Verbose] > │ float, v17 : float, v18 : float, v19 : float, v20 : float) = method2(v0, v3, │
00:00:39 #4300 [Verbose] > │ v4, v5, v6, v7, v8, v9, v10, v11, v2) │
00:00:39 #4301 [Verbose] > │ let v21 : bool = v2 < 100 │
00:00:39 #4302 [Verbose] > │ if v21 then │
00:00:39 #4303 [Verbose] > │ let v22 : UH0 = UH0_0(v12, v13, v14, v15, v16, v17, v18, v19, v20, │
00:00:39 #4304 [Verbose] > │ v1) │
00:00:39 #4305 [Verbose] > │ let v23 : int32 = v2 + 1 │
00:00:39 #4306 [Verbose] > │ method1(v0, v22, v23) │
00:00:39 #4307 [Verbose] > │ else │
00:00:39 #4308 [Verbose] > │ let v25 : UH0 = UH0_1 │
00:00:39 #4309 [Verbose] > │ method3(v1, v25) │
00:00:39 #4310 [Verbose] > │ and method4 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:39 #4311 [Verbose] > │ match v0 with │
00:00:39 #4312 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:39 #4313 [Verbose] > │ let v12 : UH1 = method4(v11, v1) │
00:00:39 #4314 [Verbose] > │ UH1_0(v4, v5, v12) │
00:00:39 #4315 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:39 #4316 [Verbose] > │ v1 │
00:00:39 #4317 [Verbose] > │ and method5 (v0 : UH1, v1 : UH2, v2 : UH2) : struct (UH2 * UH2) = │
00:00:39 #4318 [Verbose] > │ match v0 with │
00:00:39 #4319 [Verbose] > │ | UH1_0(v3, v4, v5) -> (* Cons *) │
00:00:39 #4320 [Verbose] > │ let v6 : UH2 = UH2_0(v3, v1) │
00:00:39 #4321 [Verbose] > │ let v7 : UH2 = UH2_0(v4, v2) │
00:00:39 #4322 [Verbose] > │ method5(v5, v6, v7) │
00:00:39 #4323 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:39 #4324 [Verbose] > │ struct (v1, v2) │
00:00:39 #4325 [Verbose] > │ and method6 (v0 : UH2, v1 : UH2) : UH2 = │
00:00:39 #4326 [Verbose] > │ match v0 with │
00:00:39 #4327 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:39 #4328 [Verbose] > │ let v4 : UH2 = UH2_0(v2, v1) │
00:00:39 #4329 [Verbose] > │ method6(v3, v4) │
00:00:39 #4330 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:39 #4331 [Verbose] > │ v1 │
00:00:39 #4332 [Verbose] > │ and method7 (v0 : (struct (float * float * float * float * float * float * │
00:00:39 #4333 [Verbose] > │ float * float * float) -> struct (float * float * float * float * float * │
00:00:39 #4334 [Verbose] > │ float * float * float * float)), v1 : UH0, v2 : int32) : UH0 = │
00:00:39 #4335 [Verbose] > │ let v3 : float = 1.602176621E-19 │
00:00:39 #4336 [Verbose] > │ let v4 : float = 1.672621898E-27 │
00:00:39 #4337 [Verbose] > │ let v5 : float = 0.0 │
00:00:39 #4338 [Verbose] > │ let v6 : float = 0.0 │
00:00:39 #4339 [Verbose] > │ let v7 : float = 0.0 │
00:00:39 #4340 [Verbose] > │ let v8 : float = 0.0 │
00:00:39 #4341 [Verbose] > │ let v9 : float = 0.0 │
00:00:39 #4342 [Verbose] > │ let v10 : float = 239833966.4 │
00:00:39 #4343 [Verbose] > │ let v11 : float = 0.0 │
00:00:39 #4344 [Verbose] > │ let struct (v12 : float, v13 : float, v14 : float, v15 : float, v16 : │
00:00:39 #4345 [Verbose] > │ float, v17 : float, v18 : float, v19 : float, v20 : float) = method2(v0, v3, │
00:00:39 #4346 [Verbose] > │ v4, v5, v6, v7, v8, v9, v10, v11, v2) │
00:00:39 #4347 [Verbose] > │ let v21 : bool = v2 < 165 │
00:00:39 #4348 [Verbose] > │ if v21 then │
00:00:39 #4349 [Verbose] > │ let v22 : UH0 = UH0_0(v12, v13, v14, v15, v16, v17, v18, v19, v20, │
00:00:39 #4350 [Verbose] > │ v1) │
00:00:39 #4351 [Verbose] > │ let v23 : int32 = v2 + 1 │
00:00:39 #4352 [Verbose] > │ method7(v0, v22, v23) │
00:00:39 #4353 [Verbose] > │ else │
00:00:39 #4354 [Verbose] > │ let v25 : UH0 = UH0_1 │
00:00:39 #4355 [Verbose] > │ method3(v1, v25) │
00:00:39 #4356 [Verbose] > │ and method8 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:39 #4357 [Verbose] > │ match v0 with │
00:00:39 #4358 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:39 #4359 [Verbose] > │ let v12 : UH1 = method8(v11, v1) │
00:00:39 #4360 [Verbose] > │ UH1_0(v4, v5, v12) │
00:00:39 #4361 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:39 #4362 [Verbose] > │ v1 │
00:00:39 #4363 [Verbose] > │ and method10 (v0 : UH2, v1 : int32) : int32 = │
00:00:39 #4364 [Verbose] > │ match v0 with │
00:00:39 #4365 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:00:39 #4366 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:39 #4367 [Verbose] > │ method10(v3, v4) │
00:00:39 #4368 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:39 #4369 [Verbose] > │ v1 │
00:00:39 #4370 [Verbose] > │ and method11 (v0 : (float []), v1 : UH2, v2 : int32) : int32 = │
00:00:39 #4371 [Verbose] > │ match v1 with │
00:00:39 #4372 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:00:39 #4373 [Verbose] > │ v0.[int v2] <- v3 │
00:00:39 #4374 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:39 #4375 [Verbose] > │ method11(v0, v4, v5) │
00:00:39 #4376 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:39 #4377 [Verbose] > │ v2 │
00:00:39 #4378 [Verbose] > │ and method9 (v0 : UH2) : (float []) = │
00:00:39 #4379 [Verbose] > │ let v1 : int32 = 0 │
00:00:39 #4380 [Verbose] > │ let v2 : int32 = method10(v0, v1) │
00:00:39 #4381 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:39 #4382 [Verbose] > │ let v4 : int32 = 0 │
00:00:39 #4383 [Verbose] > │ let v5 : int32 = method11(v3, v0, v4) │
00:00:39 #4384 [Verbose] > │ v3 │
00:00:39 #4385 [Verbose] > │ and method12 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:39 #4386 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:39 #4387 [Verbose] > │ v0 │
00:00:39 #4388 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:39 #4389 [Verbose] > │ []) * (float [])) [])) = │
00:00:39 #4390 [Verbose] > │ let v0 : ((struct (float * float * float * float * float * float * float │
00:00:39 #4391 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:39 #4392 [Verbose] > │ float * float * float)) -> (struct (float * float * float * float * float * │
00:00:39 #4393 [Verbose] > │ float * float * float * float) -> struct (float * float * float * float * │
00:00:39 #4394 [Verbose] > │ float * float * float * float * float))) = closure0() │
00:00:39 #4395 [Verbose] > │ let v1 : (struct (float * float * float * float * float * float * float │
00:00:39 #4396 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:39 #4397 [Verbose] > │ float * float * float)) = closure2() │
00:00:39 #4398 [Verbose] > │ let v2 : (struct (float * float * float * float * float * float * float │
00:00:39 #4399 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:39 #4400 [Verbose] > │ float * float * float)) = v0 v1 │
00:00:39 #4401 [Verbose] > │ let v3 : (struct (float * float * float * float * float * float * float │
00:00:39 #4402 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:39 #4403 [Verbose] > │ float * float * float)) = closure3() │
00:00:39 #4404 [Verbose] > │ let v4 : (struct (float * float * float * float * float * float * float │
00:00:39 #4405 [Verbose] > │ * float * float) -> struct (float * float * float * float * float * float * │
00:00:39 #4406 [Verbose] > │ float * float * float)) = v0 v3 │
00:00:39 #4407 [Verbose] > │ let v5 : UH0 = UH0_1 │
00:00:39 #4408 [Verbose] > │ let v6 : int32 = 0 │
00:00:39 #4409 [Verbose] > │ let v7 : UH0 = method1(v2, v5, v6) │
00:00:39 #4410 [Verbose] > │ let v8 : UH1 = UH1_1 │
00:00:39 #4411 [Verbose] > │ let v9 : UH1 = method4(v7, v8) │
00:00:39 #4412 [Verbose] > │ let v10 : UH2 = UH2_1 │
00:00:39 #4413 [Verbose] > │ let v11 : UH2 = UH2_1 │
00:00:39 #4414 [Verbose] > │ let struct (v12 : UH2, v13 : UH2) = method5(v9, v10, v11) │
00:00:39 #4415 [Verbose] > │ let v14 : UH2 = UH2_1 │
00:00:39 #4416 [Verbose] > │ let v15 : UH2 = method6(v12, v14) │
00:00:39 #4417 [Verbose] > │ let v16 : UH2 = UH2_1 │
00:00:39 #4418 [Verbose] > │ let v17 : UH2 = method6(v13, v16) │
00:00:39 #4419 [Verbose] > │ let v18 : UH0 = UH0_1 │
00:00:39 #4420 [Verbose] > │ let v19 : int32 = 0 │
00:00:39 #4421 [Verbose] > │ let v20 : UH0 = method7(v4, v18, v19) │
00:00:39 #4422 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:39 #4423 [Verbose] > │ let v22 : UH1 = method8(v20, v21) │
00:00:39 #4424 [Verbose] > │ let v23 : UH2 = UH2_1 │
00:00:39 #4425 [Verbose] > │ let v24 : UH2 = UH2_1 │
00:00:39 #4426 [Verbose] > │ let struct (v25 : UH2, v26 : UH2) = method5(v22, v23, v24) │
00:00:39 #4427 [Verbose] > │ let v27 : UH2 = UH2_1 │
00:00:39 #4428 [Verbose] > │ let v28 : UH2 = method6(v25, v27) │
00:00:39 #4429 [Verbose] > │ let v29 : UH2 = UH2_1 │
00:00:39 #4430 [Verbose] > │ let v30 : UH2 = method6(v26, v29) │
00:00:39 #4431 [Verbose] > │ let v31 : (float []) = method9(v15) │
00:00:39 #4432 [Verbose] > │ let v32 : (float []) = method9(v17) │
00:00:39 #4433 [Verbose] > │ let v33 : (float []) = method9(v28) │
00:00:39 #4434 [Verbose] > │ let v34 : (float []) = method9(v30) │
00:00:39 #4435 [Verbose] > │ let v35 : string = "newtonian" │
00:00:39 #4436 [Verbose] > │ let v36 : string = "relativistic" │
00:00:39 #4437 [Verbose] > │ let v37 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:39 #4438 [Verbose] > │ (v35, v31, v32); struct (v36, v33, v34)|] │
00:00:39 #4439 [Verbose] > │ let v38 : (struct (string * (float []) * (float [])) []) = method12(v37) │
00:00:39 #4440 [Verbose] > │ let v39 : string = "proton in a 1-t magnetic field" │
00:00:39 #4441 [Verbose] > │ let v40 : string = "x (m)" │
00:00:39 #4442 [Verbose] > │ let v41 : string = "y (m)" │
00:00:39 #4443 [Verbose] > │ struct (v39, v40, v41, v38) │
00:00:39 #4444 [Verbose] > │ method0() │
00:00:39 #4445 [Verbose] > │ │
00:00:39 #4446 [Verbose] > │ │
00:00:39 #4447 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 #4448 [Verbose] >
00:00:39 #4449 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:39 #4450 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:39 #4451 [Verbose] > │ ### system kinetic energy versus time 1 │
00:00:39 #4452 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:39 #4453 [Verbose] >
00:00:39 #4454 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:39 #4455 [Verbose] > // // test
00:00:39 #4456 [Verbose] >
00:00:39 #4457 [Verbose] > inl central_force f (particle_state st1) (particle_state st2) =
00:00:39 #4458 [Verbose] > inl r1 = st1.pos_vec
00:00:39 #4459 [Verbose] > inl r2 = st2.pos_vec
00:00:39 #4460 [Verbose] > inl r21 = r2 ^-^ r1
00:00:39 #4461 [Verbose] > inl r21mag = magnitude r21
00:00:39 #4462 [Verbose] > f r21mag *^ r21 ^/ r21mag
00:00:39 #4463 [Verbose] >
00:00:39 #4464 [Verbose] > inl billiard_force k re =
00:00:39 #4465 [Verbose] > inl f r =
00:00:39 #4466 [Verbose] > if r >= re
00:00:39 #4467 [Verbose] > then 0
00:00:39 #4468 [Verbose] > else -k * (r - re)
00:00:39 #4469 [Verbose] > central_force f
00:00:39 #4470 [Verbose] >
00:00:39 #4471 [Verbose] > type force_vector = vec
00:00:39 #4472 [Verbose] > type two_body_force = particle_state -> particle_state -> force_vector
00:00:39 #4473 [Verbose] >
00:00:39 #4474 [Verbose] > union force =
00:00:39 #4475 [Verbose] > | ExternalForce : i32 * one_body_force
00:00:39 #4476 [Verbose] > | InternalForce : i32 * i32 * two_body_force
00:00:39 #4477 [Verbose] >
00:00:39 #4478 [Verbose] > nominal multi_particle_state = list particle_state
00:00:39 #4479 [Verbose] >
00:00:39 #4480 [Verbose] > nominal d_multi_particle_state = list d_particle_state
00:00:39 #4481 [Verbose] >
00:00:39 #4482 [Verbose] > inl force_on n sts force =
00:00:39 #4483 [Verbose] > match force with
00:00:39 #4484 [Verbose] > | ExternalForce (n0, f_one_body) =>
00:00:39 #4485 [Verbose] > if n = n0
00:00:39 #4486 [Verbose] > then f_one_body
00:00:39 #4487 [Verbose] > else fun _ => zero_vec ()
00:00:39 #4488 [Verbose] > | InternalForce (n0, n1, f_two_body) =>
00:00:39 #4489 [Verbose] > if n = n0
00:00:39 #4490 [Verbose] > then f_two_body (sts |> listm'.item n1)
00:00:39 #4491 [Verbose] > elif n = n1
00:00:39 #4492 [Verbose] > then f_two_body (sts |> listm'.item n0)
00:00:39 #4493 [Verbose] > else fun _ => zero_vec ()
00:00:39 #4494 [Verbose] >
00:00:39 #4495 [Verbose] > inl forces_on n (multi_particle_state sts) fs =
00:00:39 #4496 [Verbose] > fs |> listm.map (force_on n sts)
00:00:39 #4497 [Verbose] >
00:00:39 #4498 [Verbose] > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state =
00:00:39 #4499 [Verbose] > inl deriv (n, st) =
00:00:39 #4500 [Verbose] > newton_second_ps (forces_on n (multi_particle_state sts) fs) st
00:00:39 #4501 [Verbose] > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state
00:00:39 #4502 [Verbose] >
00:00:39 #4503 [Verbose] > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1)
00:00:39 #4504 [Verbose] > (d_multi_particle_state dsts2) =>
00:00:39 #4505 [Verbose] > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2)
00:00:39 #4506 [Verbose] >
00:00:39 #4507 [Verbose] > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:00:39 #4508 [Verbose] > d_multi_particle_state (dsts |> listm.map (scale w))
00:00:39 #4509 [Verbose] >
00:00:39 #4510 [Verbose] > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:00:39 #4511 [Verbose] > inl (d_multi_particle_state dsts) =
00:00:39 #4512 [Verbose] > real
00:00:39 #4513 [Verbose] > match dsts with
00:00:39 #4514 [Verbose] > | d_multi_particle_state _ => dsts
00:00:39 #4515 [Verbose] > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state
00:00:39 #4516 [Verbose] >
00:00:39 #4517 [Verbose] > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:00:39 #4518 [Verbose] > d_multi_particle_state =
00:00:39 #4519 [Verbose] > fun deriv mpst0 =>
00:00:39 #4520 [Verbose] > inl mpst1 = euler dt deriv mpst0
00:00:39 #4521 [Verbose] > inl (multi_particle_state sts0) = mpst0
00:00:39 #4522 [Verbose] > inl (multi_particle_state sts1) = mpst1
00:00:39 #4523 [Verbose] > sts1
00:00:39 #4524 [Verbose] > |> listm'.zip_ sts0
00:00:39 #4525 [Verbose] > |> listm.map (fun ((particle_state st0), (particle_state st1)) =>
00:00:39 #4526 [Verbose] > particle_state {
00:00:39 #4527 [Verbose] > st1 with
00:00:39 #4528 [Verbose] > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:00:39 #4529 [Verbose] > }
00:00:39 #4530 [Verbose] > )
00:00:39 #4531 [Verbose] > |> multi_particle_state
00:00:39 #4532 [Verbose] >
00:00:39 #4533 [Verbose] > inl update_mps (method : numerical_method multi_particle_state
00:00:39 #4534 [Verbose] > d_multi_particle_state) =
00:00:39 #4535 [Verbose] > newton_second_mps >> method
00:00:39 #4536 [Verbose] >
00:00:39 #4537 [Verbose] > inl states_mps (method : numerical_method multi_particle_state
00:00:39 #4538 [Verbose] > d_multi_particle_state) =
00:00:39 #4539 [Verbose] > newton_second_mps >> method >> seq.iterate_
00:00:39 #4540 [Verbose] >
00:00:39 #4541 [Verbose] >
00:00:39 #4542 [Verbose] > inl kinetic_energy (particle_state st) =
00:00:39 #4543 [Verbose] > inl m = st.mass
00:00:39 #4544 [Verbose] > inl v = magnitude st.velocity
00:00:39 #4545 [Verbose] > 0.5 * m * v ** 2
00:00:39 #4546 [Verbose] >
00:00:39 #4547 [Verbose] > inl system_ke (multi_particle_state sts) =
00:00:39 #4548 [Verbose] > sts |> listm.map kinetic_energy |> listm'.sum
00:00:39 #4549 [Verbose] >
00:00:39 #4550 [Verbose] > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:00:39 #4551 [Verbose] > inl r1 = st1.pos_vec
00:00:39 #4552 [Verbose] > inl r2 = st2.pos_vec
00:00:39 #4553 [Verbose] > inl r21 = r2 ^-^ r1
00:00:39 #4554 [Verbose] > inl r21mag = magnitude r21
00:00:39 #4555 [Verbose] > k * (r21mag - re) ** 2 / 2
00:00:39 #4556 [Verbose] >
00:00:39 #4557 [Verbose] > inl earth_surface_gravity_pe (particle_state st) =
00:00:39 #4558 [Verbose] > inl g = 9.80665
00:00:39 #4559 [Verbose] > inl m = st.mass
00:00:39 #4560 [Verbose] > inl z = st.pos_vec.z
00:00:39 #4561 [Verbose] > m * g * z
00:00:39 #4562 [Verbose] >
00:00:39 #4563 [Verbose] > inl two_springs_pe (multi_particle_state sts) =
00:00:39 #4564 [Verbose] > inl st0 = sts |> listm'.item 0i32
00:00:39 #4565 [Verbose] > inl st1 = sts |> listm'.item 1i32
00:00:39 #4566 [Verbose] > linear_spring_pe 100 0.5 (default_particle_state ()) st0
00:00:39 #4567 [Verbose] > + linear_spring_pe 100 0.5 st0 st1
00:00:39 #4568 [Verbose] > + earth_surface_gravity_pe st0
00:00:39 #4569 [Verbose] > + earth_surface_gravity_pe st1
00:00:39 #4570 [Verbose] >
00:00:39 #4571 [Verbose] > inl two_springs_me mpst =
00:00:39 #4572 [Verbose] > system_ke mpst + two_springs_pe mpst
00:00:39 #4573 [Verbose] >
00:00:39 #4574 [Verbose] > inl ball_radius () = 0.03
00:00:39 #4575 [Verbose] >
00:00:39 #4576 [Verbose] > inl billiard_forces k =
00:00:39 #4577 [Verbose] > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]]
00:00:39 #4578 [Verbose] >
00:00:39 #4579 [Verbose] > inl billiard_update n_method k dt =
00:00:39 #4580 [Verbose] > update_mps (n_method dt) (billiard_forces k)
00:00:39 #4581 [Verbose] >
00:00:39 #4582 [Verbose] > inl billiard_initial () =
00:00:39 #4583 [Verbose] > inl ball_mass = 0.160
00:00:39 #4584 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:39 #4585 [Verbose] > multi_particle_state [[
00:00:39 #4586 [Verbose] > particle_state {
00:00:39 #4587 [Verbose] > default_particle_state' with
00:00:39 #4588 [Verbose] > mass = ball_mass
00:00:39 #4589 [Verbose] > pos_vec = zero_vec ()
00:00:39 #4590 [Verbose] > velocity = 0.2 *^ i_hat ()
00:00:39 #4591 [Verbose] > }
00:00:39 #4592 [Verbose] > particle_state {
00:00:39 #4593 [Verbose] > default_particle_state' with
00:00:39 #4594 [Verbose] > mass = ball_mass
00:00:39 #4595 [Verbose] > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:00:39 #4596 [Verbose] > velocity = zero_vec ()
00:00:39 #4597 [Verbose] > }
00:00:39 #4598 [Verbose] > ]]
00:00:39 #4599 [Verbose] >
00:00:39 #4600 [Verbose] > inl billiard_states ~n_method k dt =
00:00:39 #4601 [Verbose] > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:00:39 #4602 [Verbose] >
00:00:39 #4603 [Verbose] > inl billiard_states_finite n_method k dt =
00:00:39 #4604 [Verbose] > billiard_states n_method k dt
00:00:39 #4605 [Verbose] > >> Some
00:00:39 #4606 [Verbose] > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:00:39 #4607 [Verbose] > (mpst |> listm'.item 0i32).time <= 10
00:00:39 #4608 [Verbose] > )
00:00:39 #4609 [Verbose] >
00:00:39 #4610 [Verbose] > inl momentum (particle_state st) =
00:00:39 #4611 [Verbose] > inl m = st.mass
00:00:39 #4612 [Verbose] > inl v = st.velocity
00:00:39 #4613 [Verbose] > m *^ v
00:00:39 #4614 [Verbose] >
00:00:39 #4615 [Verbose] > inl system_p (multi_particle_state sts) =
00:00:39 #4616 [Verbose] > sts |> listm.map momentum |> sum_vec
00:00:39 #4617 [Verbose] >
00:00:39 #4618 [Verbose] >
00:00:39 #4619 [Verbose] > inl time_ke_ec_x, time_ke_ec_y =
00:00:39 #4620 [Verbose] > billiard_states_finite euler_cromer_mps 30 0.03
00:00:39 #4621 [Verbose] > |> listm.map (fun (multi_particle_state mpst) =>
00:00:39 #4622 [Verbose] > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:00:39 #4623 [Verbose] > )
00:00:39 #4624 [Verbose] > |> listm'.unzip
00:00:39 #4625 [Verbose] >
00:00:39 #4626 [Verbose] > inl time_ke_rk4_x, time_ke_rk4_y =
00:00:39 #4627 [Verbose] > billiard_states_finite runge_kutta_4 30 0.03
00:00:39 #4628 [Verbose] > |> listm.map (fun (multi_particle_state mpst) =>
00:00:39 #4629 [Verbose] > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:00:39 #4630 [Verbose] > )
00:00:39 #4631 [Verbose] > |> listm'.unzip
00:00:39 #4632 [Verbose] >
00:00:39 #4633 [Verbose] > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:00:39 #4634 [Verbose] > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:00:39 #4635 [Verbose] >
00:00:39 #4636 [Verbose] > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:00:39 #4637 [Verbose] > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:00:39 #4638 [Verbose] >
00:00:39 #4639 [Verbose] > "system kinetic energy versus time",
00:00:39 #4640 [Verbose] > "time (s)",
00:00:39 #4641 [Verbose] > "system kinetic energy (j)",
00:00:39 #4642 [Verbose] > ;[[
00:00:39 #4643 [Verbose] > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:00:39 #4644 [Verbose] > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:00:39 #4645 [Verbose] > ]]
00:00:41 #4646 [Verbose] >
00:00:41 #4647 [Verbose] > ╭─[ 1.72s - return value ]─────────────────────────────────────────────────────╮
00:00:41 #4648 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:41 #4649 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:41 #4650 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:41 #4651 [Verbose] > │ stroke="none"/> │
00:00:41 #4652 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:41 #4653 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:41 #4654 [Verbose] > │ fill="#FFFFFF"> │
00:00:41 #4655 [Verbose] > │ system kinetic energy versus time │
00:00:41 #4656 [Verbose] > │ </text> │
00:00:41 #4657 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:41 #4658 [Verbose] > │ y2="75"/> │
00:00:41 #4659 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:41 #4660 [Verbose] > │ y2="75"/> │
00:00:41 #4661 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:41 #4662 [Verbose] > │ y2="75"/> │
00:00:41 #4663 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:41 #4664 [Verbose] > │ y2="75"/> │
00:00:41 #4665 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1... │
00:00:41 #4666 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:41 #4667 [Verbose] >
00:00:41 #4668 [Verbose] > ╭─[ 1.73s - stdout ]───────────────────────────────────────────────────────────╮
00:00:41 #4669 [Verbose] > │ type UH0 = │
00:00:41 #4670 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:41 #4671 [Verbose] > │ * float * UH0 │
00:00:41 #4672 [Verbose] > │ | UH0_1 │
00:00:41 #4673 [Verbose] > │ and UH1 = │
00:00:41 #4674 [Verbose] > │ | UH1_0 of float * float * float * float * float * float * float * float │
00:00:41 #4675 [Verbose] > │ * float * UH1 │
00:00:41 #4676 [Verbose] > │ | UH1_1 │
00:00:41 #4677 [Verbose] > │ and UH2 = │
00:00:41 #4678 [Verbose] > │ | UH2_0 of float * float * float * float * float * float * float * float │
00:00:41 #4679 [Verbose] > │ * float * float * float * float * float * float * float * float * float * │
00:00:41 #4680 [Verbose] > │ float * UH2 │
00:00:41 #4681 [Verbose] > │ | UH2_1 │
00:00:41 #4682 [Verbose] > │ and UH3 = │
00:00:41 #4683 [Verbose] > │ | UH3_0 of int32 * float * float * float * float * float * float * float │
00:00:41 #4684 [Verbose] > │ * float * float * UH3 │
00:00:41 #4685 [Verbose] > │ | UH3_1 │
00:00:41 #4686 [Verbose] > │ and [<Struct>] US0 = │
00:00:41 #4687 [Verbose] > │ | US0_0 │
00:00:41 #4688 [Verbose] > │ | US0_1 of f1_0 : float * f1_1 : float * f1_2 : float * f1_3 : float * │
00:00:41 #4689 [Verbose] > │ f1_4 : float * f1_5 : float * f1_6 : float * f1_7 : float * f1_8 : float │
00:00:41 #4690 [Verbose] > │ and UH4 = │
00:00:41 #4691 [Verbose] > │ | UH4_0 of UH0 * UH4 │
00:00:41 #4692 [Verbose] > │ | UH4_1 │
00:00:41 #4693 [Verbose] > │ and UH5 = │
00:00:41 #4694 [Verbose] > │ | UH5_0 of float * float * UH5 │
00:00:41 #4695 [Verbose] > │ | UH5_1 │
00:00:41 #4696 [Verbose] > │ and UH6 = │
00:00:41 #4697 [Verbose] > │ | UH6_0 of float * UH6 │
00:00:41 #4698 [Verbose] > │ | UH6_1 │
00:00:41 #4699 [Verbose] > │ let rec method2 (v0 : UH0, v1 : UH0) : UH0 = │
00:00:41 #4700 [Verbose] > │ match v0 with │
00:00:41 #4701 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:41 #4702 [Verbose] > │ let v12 : UH0 = UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:41 #4703 [Verbose] > │ method2(v11, v12) │
00:00:41 #4704 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4705 [Verbose] > │ v1 │
00:00:41 #4706 [Verbose] > │ and method1 (v0 : float, v1 : UH0, v2 : UH1, v3 : UH0) : UH0 = │
00:00:41 #4707 [Verbose] > │ match v2 with │
00:00:41 #4708 [Verbose] > │ | UH1_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* Cons *) │
00:00:41 #4709 [Verbose] > │ match v3 with │
00:00:41 #4710 [Verbose] > │ | UH0_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* Cons │
00:00:41 #4711 [Verbose] > │ *) │
00:00:41 #4712 [Verbose] > │ let v24 : float = v9 * v0 │
00:00:41 #4713 [Verbose] > │ let v25 : float = v19 + v24 │
00:00:41 #4714 [Verbose] > │ let v26 : float = v0 * v6 │
00:00:41 #4715 [Verbose] > │ let v27 : float = v0 * v7 │
00:00:41 #4716 [Verbose] > │ let v28 : float = v0 * v8 │
00:00:41 #4717 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:41 #4718 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:41 #4719 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:41 #4720 [Verbose] > │ let v32 : float = v0 * v10 │
00:00:41 #4721 [Verbose] > │ let v33 : float = v0 * v11 │
00:00:41 #4722 [Verbose] > │ let v34 : float = v0 * v12 │
00:00:41 #4723 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:41 #4724 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:41 #4725 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:41 #4726 [Verbose] > │ let v38 : UH0 = UH0_0(v14, v15, v29, v30, v31, v25, v35, v36, │
00:00:41 #4727 [Verbose] > │ v37, v1) │
00:00:41 #4728 [Verbose] > │ method1(v0, v38, v13, v23) │
00:00:41 #4729 [Verbose] > │ | _ -> │
00:00:41 #4730 [Verbose] > │ let v40 : UH0 = UH0_1 │
00:00:41 #4731 [Verbose] > │ method2(v1, v40) │
00:00:41 #4732 [Verbose] > │ | _ -> │
00:00:41 #4733 [Verbose] > │ let v43 : UH0 = UH0_1 │
00:00:41 #4734 [Verbose] > │ method2(v1, v43) │
00:00:41 #4735 [Verbose] > │ and method4 (v0 : UH2, v1 : UH2) : UH2 = │
00:00:41 #4736 [Verbose] > │ match v0 with │
00:00:41 #4737 [Verbose] > │ | UH2_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, │
00:00:41 #4738 [Verbose] > │ v16, v17, v18, v19, v20) -> (* Cons *) │
00:00:41 #4739 [Verbose] > │ let v21 : UH2 = UH2_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, │
00:00:41 #4740 [Verbose] > │ v13, v14, v15, v16, v17, v18, v19, v1) │
00:00:41 #4741 [Verbose] > │ method4(v20, v21) │
00:00:41 #4742 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:41 #4743 [Verbose] > │ v1 │
00:00:41 #4744 [Verbose] > │ and method3 (v0 : UH2, v1 : UH0, v2 : UH0) : UH2 = │
00:00:41 #4745 [Verbose] > │ match v1 with │
00:00:41 #4746 [Verbose] > │ | UH0_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* Cons *) │
00:00:41 #4747 [Verbose] > │ match v2 with │
00:00:41 #4748 [Verbose] > │ | UH0_0(v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -> (* Cons │
00:00:41 #4749 [Verbose] > │ *) │
00:00:41 #4750 [Verbose] > │ let v23 : UH2 = UH2_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v13, │
00:00:41 #4751 [Verbose] > │ v14, v15, v16, v17, v18, v19, v20, v21, v0) │
00:00:41 #4752 [Verbose] > │ method3(v23, v12, v22) │
00:00:41 #4753 [Verbose] > │ | _ -> │
00:00:41 #4754 [Verbose] > │ let v25 : UH2 = UH2_1 │
00:00:41 #4755 [Verbose] > │ method4(v0, v25) │
00:00:41 #4756 [Verbose] > │ | _ -> │
00:00:41 #4757 [Verbose] > │ let v28 : UH2 = UH2_1 │
00:00:41 #4758 [Verbose] > │ method4(v0, v28) │
00:00:41 #4759 [Verbose] > │ and method5 (v0 : float, v1 : UH2, v2 : UH0) : UH0 = │
00:00:41 #4760 [Verbose] > │ match v1 with │
00:00:41 #4761 [Verbose] > │ | UH2_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, │
00:00:41 #4762 [Verbose] > │ v17, v18, v19, v20, v21) -> (* Cons *) │
00:00:41 #4763 [Verbose] > │ let v22 : UH0 = method5(v0, v21, v2) │
00:00:41 #4764 [Verbose] > │ let v23 : float = v0 * v18 │
00:00:41 #4765 [Verbose] > │ let v24 : float = v0 * v19 │
00:00:41 #4766 [Verbose] > │ let v25 : float = v0 * v20 │
00:00:41 #4767 [Verbose] > │ let v26 : float = v5 + v23 │
00:00:41 #4768 [Verbose] > │ let v27 : float = v6 + v24 │
00:00:41 #4769 [Verbose] > │ let v28 : float = v7 + v25 │
00:00:41 #4770 [Verbose] > │ UH0_0(v12, v13, v26, v27, v28, v17, v18, v19, v20, v22) │
00:00:41 #4771 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:00:41 #4772 [Verbose] > │ v2 │
00:00:41 #4773 [Verbose] > │ and closure2 (v0 : float, v1 : (UH0 -> UH1)) (v2 : UH0) : UH0 = │
00:00:41 #4774 [Verbose] > │ let v3 : UH1 = v1 v2 │
00:00:41 #4775 [Verbose] > │ let v4 : UH0 = UH0_1 │
00:00:41 #4776 [Verbose] > │ let v5 : UH0 = method1(v0, v4, v3, v2) │
00:00:41 #4777 [Verbose] > │ let v6 : UH2 = UH2_1 │
00:00:41 #4778 [Verbose] > │ let v7 : UH2 = method3(v6, v2, v5) │
00:00:41 #4779 [Verbose] > │ let v8 : UH0 = UH0_1 │
00:00:41 #4780 [Verbose] > │ let v9 : UH0 = method5(v0, v7, v8) │
00:00:41 #4781 [Verbose] > │ v9 │
00:00:41 #4782 [Verbose] > │ and closure1 (v0 : float) (v1 : (UH0 -> UH1)) : (UH0 -> UH0) = │
00:00:41 #4783 [Verbose] > │ closure2(v0, v1) │
00:00:41 #4784 [Verbose] > │ and closure0 () (v0 : float) : ((UH0 -> UH1) -> (UH0 -> UH0)) = │
00:00:41 #4785 [Verbose] > │ closure1(v0) │
00:00:41 #4786 [Verbose] > │ and method6 (v0 : UH0, v1 : UH3, v2 : int32) : struct (UH3 * int32) = │
00:00:41 #4787 [Verbose] > │ match v0 with │
00:00:41 #4788 [Verbose] > │ | UH0_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* Cons *) │
00:00:41 #4789 [Verbose] > │ let v13 : int32 = v2 + 1 │
00:00:41 #4790 [Verbose] > │ let v14 : UH3 = UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v1) │
00:00:41 #4791 [Verbose] > │ method6(v12, v14, v13) │
00:00:41 #4792 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4793 [Verbose] > │ struct (v1, v2) │
00:00:41 #4794 [Verbose] > │ and method7 (v0 : UH3, v1 : UH3) : UH3 = │
00:00:41 #4795 [Verbose] > │ match v0 with │
00:00:41 #4796 [Verbose] > │ | UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* Cons *) │
00:00:41 #4797 [Verbose] > │ let v13 : UH3 = UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v1) │
00:00:41 #4798 [Verbose] > │ method7(v12, v13) │
00:00:41 #4799 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:41 #4800 [Verbose] > │ v1 │
00:00:41 #4801 [Verbose] > │ and closure4 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, v5 │
00:00:41 #4802 [Verbose] > │ : float, v6 : float, v7 : float, v8 : float) struct (v9 : float, v10 : │
00:00:41 #4803 [Verbose] > │ float, v11 : float, v12 : float, v13 : float, v14 : float, v15 : float, v16 │
00:00:41 #4804 [Verbose] > │ : float, v17 : float) : struct (float * float * float) = │
00:00:41 #4805 [Verbose] > │ let v18 : float = -1.0 * v2 │
00:00:41 #4806 [Verbose] > │ let v19 : float = -1.0 * v3 │
00:00:41 #4807 [Verbose] > │ let v20 : float = -1.0 * v4 │
00:00:41 #4808 [Verbose] > │ let v21 : float = v11 + v18 │
00:00:41 #4809 [Verbose] > │ let v22 : float = v12 + v19 │
00:00:41 #4810 [Verbose] > │ let v23 : float = v13 + v20 │
00:00:41 #4811 [Verbose] > │ let v24 : float = v21 * v21 │
00:00:41 #4812 [Verbose] > │ let v25 : float = v22 * v22 │
00:00:41 #4813 [Verbose] > │ let v26 : float = v24 + v25 │
00:00:41 #4814 [Verbose] > │ let v27 : float = v23 * v23 │
00:00:41 #4815 [Verbose] > │ let v28 : float = v26 + v27 │
00:00:41 #4816 [Verbose] > │ let v29 : float = sqrt v28 │
00:00:41 #4817 [Verbose] > │ let v30 : bool = v29 >= 0.06 │
00:00:41 #4818 [Verbose] > │ let v33 : float = │
00:00:41 #4819 [Verbose] > │ if v30 then │
00:00:41 #4820 [Verbose] > │ 0.0 │
00:00:41 #4821 [Verbose] > │ else │
00:00:41 #4822 [Verbose] > │ let v31 : float = v29 - 0.06 │
00:00:41 #4823 [Verbose] > │ let v32 : float = -30.0 * v31 │
00:00:41 #4824 [Verbose] > │ v32 │
00:00:41 #4825 [Verbose] > │ let v34 : float = v33 * v21 │
00:00:41 #4826 [Verbose] > │ let v35 : float = v33 * v22 │
00:00:41 #4827 [Verbose] > │ let v36 : float = v33 * v23 │
00:00:41 #4828 [Verbose] > │ let v37 : float = v34 / v29 │
00:00:41 #4829 [Verbose] > │ let v38 : float = v35 / v29 │
00:00:41 #4830 [Verbose] > │ let v39 : float = v36 / v29 │
00:00:41 #4831 [Verbose] > │ struct (v37, v38, v39) │
00:00:41 #4832 [Verbose] > │ and closure5 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 : │
00:00:41 #4833 [Verbose] > │ float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:41 #4834 [Verbose] > │ float * float) = │
00:00:41 #4835 [Verbose] > │ struct (0.0, 0.0, 0.0) │
00:00:41 #4836 [Verbose] > │ and method8 (v0 : UH0, v1 : UH3, v2 : UH1) : UH1 = │
00:00:41 #4837 [Verbose] > │ match v1 with │
00:00:41 #4838 [Verbose] > │ | UH3_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* Cons *) │
00:00:41 #4839 [Verbose] > │ let v14 : UH1 = method8(v0, v13, v2) │
00:00:41 #4840 [Verbose] > │ let v15 : bool = v3 = 0 │
00:00:41 #4841 [Verbose] > │ let v134 : (struct (float * float * float * float * float * float * │
00:00:41 #4842 [Verbose] > │ float * float * float) -> struct (float * float * float)) = │
00:00:41 #4843 [Verbose] > │ if v15 then │
00:00:41 #4844 [Verbose] > │ let v42 : US0 = │
00:00:41 #4845 [Verbose] > │ match v0 with │
00:00:41 #4846 [Verbose] > │ | UH0_0(v16, v17, v18, v19, v20, v21, v22, v23, v24, │
00:00:41 #4847 [Verbose] > │ v25) -> (* Cons *) │
00:00:41 #4848 [Verbose] > │ match v25 with │
00:00:41 #4849 [Verbose] > │ | UH0_0(v26, v27, v28, v29, v30, v31, v32, v33, v34, │
00:00:41 #4850 [Verbose] > │ v35) -> (* Cons *) │
00:00:41 #4851 [Verbose] > │ US0_1(v26, v27, v28, v29, v30, v31, v32, v33, │
00:00:41 #4852 [Verbose] > │ v34) │
00:00:41 #4853 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4854 [Verbose] > │ US0_0 │
00:00:41 #4855 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4856 [Verbose] > │ US0_0 │
00:00:41 #4857 [Verbose] > │ let struct (v70 : float, v71 : float, v72 : float, v73 : │
00:00:41 #4858 [Verbose] > │ float, v74 : float, v75 : float, v76 : float, v77 : float, v78 : float) = │
00:00:41 #4859 [Verbose] > │ match v42 with │
00:00:41 #4860 [Verbose] > │ | US0_0 -> (* None *) │
00:00:41 #4861 [Verbose] > │ failwith<struct (float * float * float * float * │
00:00:41 #4862 [Verbose] > │ float * float * float * float * float)> "Option does not have a value." │
00:00:41 #4863 [Verbose] > │ | US0_1(v43, v44, v45, v46, v47, v48, v49, v50, v51) -> │
00:00:41 #4864 [Verbose] > │ (* Some *) │
00:00:41 #4865 [Verbose] > │ struct (v43, v44, v45, v46, v47, v48, v49, v50, v51) │
00:00:41 #4866 [Verbose] > │ closure4(v70, v71, v72, v73, v74, v75, v76, v77, v78) │
00:00:41 #4867 [Verbose] > │ else │
00:00:41 #4868 [Verbose] > │ let v80 : bool = v3 = 1 │
00:00:41 #4869 [Verbose] > │ if v80 then │
00:00:41 #4870 [Verbose] > │ let v94 : US0 = │
00:00:41 #4871 [Verbose] > │ match v0 with │
00:00:41 #4872 [Verbose] > │ | UH0_0(v81, v82, v83, v84, v85, v86, v87, v88, v89, │
00:00:41 #4873 [Verbose] > │ v90) -> (* Cons *) │
00:00:41 #4874 [Verbose] > │ US0_1(v81, v82, v83, v84, v85, v86, v87, v88, │
00:00:41 #4875 [Verbose] > │ v89) │
00:00:41 #4876 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4877 [Verbose] > │ US0_0 │
00:00:41 #4878 [Verbose] > │ let struct (v122 : float, v123 : float, v124 : float, │
00:00:41 #4879 [Verbose] > │ v125 : float, v126 : float, v127 : float, v128 : float, v129 : float, v130 : │
00:00:41 #4880 [Verbose] > │ float) = │
00:00:41 #4881 [Verbose] > │ match v94 with │
00:00:41 #4882 [Verbose] > │ | US0_0 -> (* None *) │
00:00:41 #4883 [Verbose] > │ failwith<struct (float * float * float * float * │
00:00:41 #4884 [Verbose] > │ float * float * float * float * float)> "Option does not have a value." │
00:00:41 #4885 [Verbose] > │ | US0_1(v95, v96, v97, v98, v99, v100, v101, v102, │
00:00:41 #4886 [Verbose] > │ v103) -> (* Some *) │
00:00:41 #4887 [Verbose] > │ struct (v95, v96, v97, v98, v99, v100, v101, │
00:00:41 #4888 [Verbose] > │ v102, v103) │
00:00:41 #4889 [Verbose] > │ closure4(v122, v123, v124, v125, v126, v127, v128, v129, │
00:00:41 #4890 [Verbose] > │ v130) │
00:00:41 #4891 [Verbose] > │ else │
00:00:41 #4892 [Verbose] > │ closure5() │
00:00:41 #4893 [Verbose] > │ let struct (v135 : float, v136 : float, v137 : float) = v134 struct │
00:00:41 #4894 [Verbose] > │ (v4, v5, v6, v7, v8, v9, v10, v11, v12) │
00:00:41 #4895 [Verbose] > │ let v138 : float = v135 / v5 │
00:00:41 #4896 [Verbose] > │ let v139 : float = v136 / v5 │
00:00:41 #4897 [Verbose] > │ let v140 : float = v137 / v5 │
00:00:41 #4898 [Verbose] > │ UH1_0(0.0, 0.0, v10, v11, v12, 1.0, v138, v139, v140, v14) │
00:00:41 #4899 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:00:41 #4900 [Verbose] > │ v2 │
00:00:41 #4901 [Verbose] > │ and closure3 () (v0 : UH0) : UH1 = │
00:00:41 #4902 [Verbose] > │ let v1 : UH3 = UH3_1 │
00:00:41 #4903 [Verbose] > │ let v2 : int32 = 0 │
00:00:41 #4904 [Verbose] > │ let struct (v3 : UH3, v4 : int32) = method6(v0, v1, v2) │
00:00:41 #4905 [Verbose] > │ let v5 : UH3 = UH3_1 │
00:00:41 #4906 [Verbose] > │ let v6 : UH3 = method7(v3, v5) │
00:00:41 #4907 [Verbose] > │ let v7 : UH1 = UH1_1 │
00:00:41 #4908 [Verbose] > │ let v8 : UH1 = method8(v0, v6, v7) │
00:00:41 #4909 [Verbose] > │ v8 │
00:00:41 #4910 [Verbose] > │ and method10 (v0 : (UH0 -> UH0), v1 : UH0, v2 : int32) : UH0 = │
00:00:41 #4911 [Verbose] > │ let v3 : bool = v2 <= 0 │
00:00:41 #4912 [Verbose] > │ if v3 then │
00:00:41 #4913 [Verbose] > │ v1 │
00:00:41 #4914 [Verbose] > │ else │
00:00:41 #4915 [Verbose] > │ let v4 : UH0 = v0 v1 │
00:00:41 #4916 [Verbose] > │ let v5 : int32 = v2 - 1 │
00:00:41 #4917 [Verbose] > │ method10(v0, v4, v5) │
00:00:41 #4918 [Verbose] > │ and method11 (v0 : UH4, v1 : UH4) : UH4 = │
00:00:41 #4919 [Verbose] > │ match v0 with │
00:00:41 #4920 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:41 #4921 [Verbose] > │ let v4 : UH4 = UH4_0(v2, v1) │
00:00:41 #4922 [Verbose] > │ method11(v3, v4) │
00:00:41 #4923 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:41 #4924 [Verbose] > │ v1 │
00:00:41 #4925 [Verbose] > │ and method9 (v0 : (UH0 -> UH0), v1 : UH4, v2 : int32) : UH4 = │
00:00:41 #4926 [Verbose] > │ let v3 : float = 0.0 │
00:00:41 #4927 [Verbose] > │ let v4 : float = 0.16 │
00:00:41 #4928 [Verbose] > │ let v5 : float = 0.0 │
00:00:41 #4929 [Verbose] > │ let v6 : float = 0.0 │
00:00:41 #4930 [Verbose] > │ let v7 : float = 0.0 │
00:00:41 #4931 [Verbose] > │ let v8 : float = 0.0 │
00:00:41 #4932 [Verbose] > │ let v9 : float = 0.2 │
00:00:41 #4933 [Verbose] > │ let v10 : float = 0.0 │
00:00:41 #4934 [Verbose] > │ let v11 : float = 0.0 │
00:00:41 #4935 [Verbose] > │ let v12 : float = 1.0 │
00:00:41 #4936 [Verbose] > │ let v13 : float = 0.02 │
00:00:41 #4937 [Verbose] > │ let v14 : float = 0.0 │
00:00:41 #4938 [Verbose] > │ let v15 : float = 0.0 │
00:00:41 #4939 [Verbose] > │ let v16 : float = 0.0 │
00:00:41 #4940 [Verbose] > │ let v17 : float = 0.0 │
00:00:41 #4941 [Verbose] > │ let v18 : UH0 = UH0_1 │
00:00:41 #4942 [Verbose] > │ let v19 : UH0 = UH0_0(v3, v4, v12, v13, v14, v8, v15, v16, v17, v18) │
00:00:41 #4943 [Verbose] > │ let v20 : UH0 = UH0_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v19) │
00:00:41 #4944 [Verbose] > │ let v21 : UH0 = method10(v0, v20, v2) │
00:00:41 #4945 [Verbose] > │ let v35 : US0 = │
00:00:41 #4946 [Verbose] > │ match v21 with │
00:00:41 #4947 [Verbose] > │ | UH0_0(v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) -> (* Cons │
00:00:41 #4948 [Verbose] > │ *) │
00:00:41 #4949 [Verbose] > │ US0_1(v22, v23, v24, v25, v26, v27, v28, v29, v30) │
00:00:41 #4950 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4951 [Verbose] > │ US0_0 │
00:00:41 #4952 [Verbose] > │ let struct (v63 : float, v64 : float, v65 : float, v66 : float, v67 : │
00:00:41 #4953 [Verbose] > │ float, v68 : float, v69 : float, v70 : float, v71 : float) = │
00:00:41 #4954 [Verbose] > │ match v35 with │
00:00:41 #4955 [Verbose] > │ | US0_0 -> (* None *) │
00:00:41 #4956 [Verbose] > │ failwith<struct (float * float * float * float * float * float * │
00:00:41 #4957 [Verbose] > │ float * float * float)> "Option does not have a value." │
00:00:41 #4958 [Verbose] > │ | US0_1(v36, v37, v38, v39, v40, v41, v42, v43, v44) -> (* Some *) │
00:00:41 #4959 [Verbose] > │ struct (v36, v37, v38, v39, v40, v41, v42, v43, v44) │
00:00:41 #4960 [Verbose] > │ let v72 : bool = v68 <= 10.0 │
00:00:41 #4961 [Verbose] > │ if v72 then │
00:00:41 #4962 [Verbose] > │ let v73 : UH4 = UH4_0(v21, v1) │
00:00:41 #4963 [Verbose] > │ let v74 : int32 = v2 + 1 │
00:00:41 #4964 [Verbose] > │ method9(v0, v73, v74) │
00:00:41 #4965 [Verbose] > │ else │
00:00:41 #4966 [Verbose] > │ let v76 : UH4 = UH4_1 │
00:00:41 #4967 [Verbose] > │ method11(v1, v76) │
00:00:41 #4968 [Verbose] > │ and method13 (v0 : UH0, v1 : UH6) : UH6 = │
00:00:41 #4969 [Verbose] > │ match v0 with │
00:00:41 #4970 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:41 #4971 [Verbose] > │ let v12 : UH6 = method13(v11, v1) │
00:00:41 #4972 [Verbose] > │ let v13 : float = v8 * v8 │
00:00:41 #4973 [Verbose] > │ let v14 : float = v9 * v9 │
00:00:41 #4974 [Verbose] > │ let v15 : float = v13 + v14 │
00:00:41 #4975 [Verbose] > │ let v16 : float = v10 * v10 │
00:00:41 #4976 [Verbose] > │ let v17 : float = v15 + v16 │
00:00:41 #4977 [Verbose] > │ let v18 : float = sqrt v17 │
00:00:41 #4978 [Verbose] > │ let v19 : float = 0.5 * v3 │
00:00:41 #4979 [Verbose] > │ let v20 : float = v18 ** 2.0 │
00:00:41 #4980 [Verbose] > │ let v21 : float = v19 * v20 │
00:00:41 #4981 [Verbose] > │ UH6_0(v21, v12) │
00:00:41 #4982 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #4983 [Verbose] > │ v1 │
00:00:41 #4984 [Verbose] > │ and method14 (v0 : UH6, v1 : float) : float = │
00:00:41 #4985 [Verbose] > │ match v0 with │
00:00:41 #4986 [Verbose] > │ | UH6_0(v2, v3) -> (* Cons *) │
00:00:41 #4987 [Verbose] > │ let v4 : float = v1 + v2 │
00:00:41 #4988 [Verbose] > │ method14(v3, v4) │
00:00:41 #4989 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:41 #4990 [Verbose] > │ v1 │
00:00:41 #4991 [Verbose] > │ and method12 (v0 : UH4, v1 : UH5) : UH5 = │
00:00:41 #4992 [Verbose] > │ match v0 with │
00:00:41 #4993 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:41 #4994 [Verbose] > │ let v4 : UH5 = method12(v3, v1) │
00:00:41 #4995 [Verbose] > │ let v18 : US0 = │
00:00:41 #4996 [Verbose] > │ match v2 with │
00:00:41 #4997 [Verbose] > │ | UH0_0(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> (* Cons │
00:00:41 #4998 [Verbose] > │ *) │
00:00:41 #4999 [Verbose] > │ US0_1(v5, v6, v7, v8, v9, v10, v11, v12, v13) │
00:00:41 #5000 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #5001 [Verbose] > │ US0_0 │
00:00:41 #5002 [Verbose] > │ let struct (v46 : float, v47 : float, v48 : float, v49 : float, v50 │
00:00:41 #5003 [Verbose] > │ : float, v51 : float, v52 : float, v53 : float, v54 : float) = │
00:00:41 #5004 [Verbose] > │ match v18 with │
00:00:41 #5005 [Verbose] > │ | US0_0 -> (* None *) │
00:00:41 #5006 [Verbose] > │ failwith<struct (float * float * float * float * float * │
00:00:41 #5007 [Verbose] > │ float * float * float * float)> "Option does not have a value." │
00:00:41 #5008 [Verbose] > │ | US0_1(v19, v20, v21, v22, v23, v24, v25, v26, v27) -> (* Some │
00:00:41 #5009 [Verbose] > │ *) │
00:00:41 #5010 [Verbose] > │ struct (v19, v20, v21, v22, v23, v24, v25, v26, v27) │
00:00:41 #5011 [Verbose] > │ let v55 : UH6 = UH6_1 │
00:00:41 #5012 [Verbose] > │ let v56 : UH6 = method13(v2, v55) │
00:00:41 #5013 [Verbose] > │ let v57 : float = 0.0 │
00:00:41 #5014 [Verbose] > │ let v58 : float = method14(v56, v57) │
00:00:41 #5015 [Verbose] > │ UH5_0(v51, v58, v4) │
00:00:41 #5016 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:41 #5017 [Verbose] > │ v1 │
00:00:41 #5018 [Verbose] > │ and method15 (v0 : UH5, v1 : UH6, v2 : UH6) : struct (UH6 * UH6) = │
00:00:41 #5019 [Verbose] > │ match v0 with │
00:00:41 #5020 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:00:41 #5021 [Verbose] > │ let v6 : UH6 = UH6_0(v3, v1) │
00:00:41 #5022 [Verbose] > │ let v7 : UH6 = UH6_0(v4, v2) │
00:00:41 #5023 [Verbose] > │ method15(v5, v6, v7) │
00:00:41 #5024 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:41 #5025 [Verbose] > │ struct (v1, v2) │
00:00:41 #5026 [Verbose] > │ and method16 (v0 : UH6, v1 : UH6) : UH6 = │
00:00:41 #5027 [Verbose] > │ match v0 with │
00:00:41 #5028 [Verbose] > │ | UH6_0(v2, v3) -> (* Cons *) │
00:00:41 #5029 [Verbose] > │ let v4 : UH6 = UH6_0(v2, v1) │
00:00:41 #5030 [Verbose] > │ method16(v3, v4) │
00:00:41 #5031 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:41 #5032 [Verbose] > │ v1 │
00:00:41 #5033 [Verbose] > │ and method18 (v0 : UH1, v1 : UH1) : UH1 = │
00:00:41 #5034 [Verbose] > │ match v0 with │
00:00:41 #5035 [Verbose] > │ | UH1_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* Cons *) │
00:00:41 #5036 [Verbose] > │ let v12 : UH1 = UH1_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v1) │
00:00:41 #5037 [Verbose] > │ method18(v11, v12) │
00:00:41 #5038 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:41 #5039 [Verbose] > │ v1 │
00:00:41 #5040 [Verbose] > │ and method17 (v0 : UH1, v1 : UH1, v2 : UH1) : UH1 = │
00:00:41 #5041 [Verbose] > │ match v1 with │
00:00:41 #5042 [Verbose] > │ | UH1_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* Cons *) │
00:00:41 #5043 [Verbose] > │ match v2 with │
00:00:41 #5044 [Verbose] > │ | UH1_0(v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -> (* Cons │
00:00:41 #5045 [Verbose] > │ *) │
00:00:41 #5046 [Verbose] > │ let v23 : float = v3 + v13 │
00:00:41 #5047 [Verbose] > │ let v24 : float = v4 + v14 │
00:00:41 #5048 [Verbose] > │ let v25 : float = v8 + v18 │
00:00:41 #5049 [Verbose] > │ let v26 : float = v5 + v15 │
00:00:41 #5050 [Verbose] > │ let v27 : float = v6 + v16 │
00:00:41 #5051 [Verbose] > │ let v28 : float = v7 + v17 │
00:00:41 #5052 [Verbose] > │ let v29 : float = v9 + v19 │
00:00:41 #5053 [Verbose] > │ let v30 : float = v10 + v20 │
00:00:41 #5054 [Verbose] > │ let v31 : float = v11 + v21 │
00:00:41 #5055 [Verbose] > │ let v32 : UH1 = UH1_0(v23, v24, v26, v27, v28, v25, v29, v30, │
00:00:41 #5056 [Verbose] > │ v31, v0) │
00:00:41 #5057 [Verbose] > │ method17(v32, v12, v22) │
00:00:41 #5058 [Verbose] > │ | _ -> │
00:00:41 #5059 [Verbose] > │ let v34 : UH1 = UH1_1 │
00:00:41 #5060 [Verbose] > │ method18(v0, v34) │
00:00:41 #5061 [Verbose] > │ | _ -> │
00:00:41 #5062 [Verbose] > │ let v37 : UH1 = UH1_1 │
00:00:41 #5063 [Verbose] > │ method18(v0, v37) │
00:00:41 #5064 [Verbose] > │ and closure8 (v0 : float, v1 : (UH0 -> UH1)) (v2 : UH0) : UH0 = │
00:00:41 #5065 [Verbose] > │ let v3 : UH1 = v1 v2 │
00:00:41 #5066 [Verbose] > │ let v4 : float = v0 / 2.0 │
00:00:41 #5067 [Verbose] > │ let v5 : UH0 = UH0_1 │
00:00:41 #5068 [Verbose] > │ let v6 : UH0 = method1(v4, v5, v3, v2) │
00:00:41 #5069 [Verbose] > │ let v7 : UH1 = v1 v6 │
00:00:41 #5070 [Verbose] > │ let v8 : UH0 = UH0_1 │
00:00:41 #5071 [Verbose] > │ let v9 : UH0 = method1(v4, v8, v7, v2) │
00:00:41 #5072 [Verbose] > │ let v10 : UH1 = v1 v9 │
00:00:41 #5073 [Verbose] > │ let v11 : UH0 = UH0_1 │
00:00:41 #5074 [Verbose] > │ let v12 : UH0 = method1(v0, v11, v10, v2) │
00:00:41 #5075 [Verbose] > │ let v13 : UH1 = v1 v12 │
00:00:41 #5076 [Verbose] > │ let v14 : float = v0 / 6.0 │
00:00:41 #5077 [Verbose] > │ let v15 : UH1 = UH1_1 │
00:00:41 #5078 [Verbose] > │ let v16 : UH1 = method17(v15, v3, v7) │
00:00:41 #5079 [Verbose] > │ let v17 : UH1 = UH1_1 │
00:00:41 #5080 [Verbose] > │ let v18 : UH1 = method17(v17, v16, v7) │
00:00:41 #5081 [Verbose] > │ let v19 : UH1 = UH1_1 │
00:00:41 #5082 [Verbose] > │ let v20 : UH1 = method17(v19, v18, v10) │
00:00:41 #5083 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:41 #5084 [Verbose] > │ let v22 : UH1 = method17(v21, v20, v10) │
00:00:41 #5085 [Verbose] > │ let v23 : UH1 = UH1_1 │
00:00:41 #5086 [Verbose] > │ let v24 : UH1 = method17(v23, v22, v13) │
00:00:41 #5087 [Verbose] > │ let v25 : UH0 = UH0_1 │
00:00:41 #5088 [Verbose] > │ let v26 : UH0 = method1(v14, v25, v24, v2) │
00:00:41 #5089 [Verbose] > │ v26 │
00:00:41 #5090 [Verbose] > │ and closure7 (v0 : float) (v1 : (UH0 -> UH1)) : (UH0 -> UH0) = │
00:00:41 #5091 [Verbose] > │ closure8(v0, v1) │
00:00:41 #5092 [Verbose] > │ and closure6 () (v0 : float) : ((UH0 -> UH1) -> (UH0 -> UH0)) = │
00:00:41 #5093 [Verbose] > │ closure7(v0) │
00:00:41 #5094 [Verbose] > │ and method19 (v0 : UH4, v1 : UH5) : UH5 = │
00:00:41 #5095 [Verbose] > │ match v0 with │
00:00:41 #5096 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:41 #5097 [Verbose] > │ let v4 : UH5 = method19(v3, v1) │
00:00:41 #5098 [Verbose] > │ let v18 : US0 = │
00:00:41 #5099 [Verbose] > │ match v2 with │
00:00:41 #5100 [Verbose] > │ | UH0_0(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> (* Cons │
00:00:41 #5101 [Verbose] > │ *) │
00:00:41 #5102 [Verbose] > │ US0_1(v5, v6, v7, v8, v9, v10, v11, v12, v13) │
00:00:41 #5103 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:41 #5104 [Verbose] > │ US0_0 │
00:00:41 #5105 [Verbose] > │ let struct (v46 : float, v47 : float, v48 : float, v49 : float, v50 │
00:00:41 #5106 [Verbose] > │ : float, v51 : float, v52 : float, v53 : float, v54 : float) = │
00:00:41 #5107 [Verbose] > │ match v18 with │
00:00:41 #5108 [Verbose] > │ | US0_0 -> (* None *) │
00:00:41 #5109 [Verbose] > │ failwith<struct (float * float * float * float * float * │
00:00:41 #5110 [Verbose] > │ float * float * float * float)> "Option does not have a value." │
00:00:41 #5111 [Verbose] > │ | US0_1(v19, v20, v21, v22, v23, v24, v25, v26, v27) -> (* Some │
00:00:41 #5112 [Verbose] > │ *) │
00:00:41 #5113 [Verbose] > │ struct (v19, v20, v21, v22, v23, v24, v25, v26, v27) │
00:00:41 #5114 [Verbose] > │ let v55 : UH6 = UH6_1 │
00:00:41 #5115 [Verbose] > │ let v56 : UH6 = method13(v2, v55) │
00:00:41 #5116 [Verbose] > │ let v57 : float = 0.0 │
00:00:41 #5117 [Verbose] > │ let v58 : float = method14(v56, v57) │
00:00:41 #5118 [Verbose] > │ UH5_0(v51, v58, v4) │
00:00:41 #5119 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:41 #5120 [Verbose] > │ v1 │
00:00:41 #5121 [Verbose] > │ and method21 (v0 : UH6, v1 : int32) : int32 = │
00:00:41 #5122 [Verbose] > │ match v0 with │
00:00:41 #5123 [Verbose] > │ | UH6_0(v2, v3) -> (* Cons *) │
00:00:41 #5124 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:41 #5125 [Verbose] > │ method21(v3, v4) │
00:00:41 #5126 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:41 #5127 [Verbose] > │ v1 │
00:00:41 #5128 [Verbose] > │ and method22 (v0 : (float []), v1 : UH6, v2 : int32) : int32 = │
00:00:41 #5129 [Verbose] > │ match v1 with │
00:00:41 #5130 [Verbose] > │ | UH6_0(v3, v4) -> (* Cons *) │
00:00:41 #5131 [Verbose] > │ v0.[int v2] <- v3 │
00:00:41 #5132 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:41 #5133 [Verbose] > │ method22(v0, v4, v5) │
00:00:41 #5134 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:41 #5135 [Verbose] > │ v2 │
00:00:41 #5136 [Verbose] > │ and method20 (v0 : UH6) : (float []) = │
00:00:41 #5137 [Verbose] > │ let v1 : int32 = 0 │
00:00:41 #5138 [Verbose] > │ let v2 : int32 = method21(v0, v1) │
00:00:41 #5139 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:41 #5140 [Verbose] > │ let v4 : int32 = 0 │
00:00:41 #5141 [Verbose] > │ let v5 : int32 = method22(v3, v0, v4) │
00:00:41 #5142 [Verbose] > │ v3 │
00:00:41 #5143 [Verbose] > │ and method23 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:41 #5144 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:41 #5145 [Verbose] > │ v0 │
00:00:41 #5146 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:41 #5147 [Verbose] > │ []) * (float [])) [])) = │
00:00:41 #5148 [Verbose] > │ let v0 : (float -> ((UH0 -> UH1) -> (UH0 -> UH0))) = closure0() │
00:00:41 #5149 [Verbose] > │ let v1 : ((UH0 -> UH1) -> (UH0 -> UH0)) = v0 0.03 │
00:00:41 #5150 [Verbose] > │ let v2 : (UH0 -> UH1) = closure3() │
00:00:41 #5151 [Verbose] > │ let v3 : (UH0 -> UH0) = v1 v2 │
00:00:41 #5152 [Verbose] > │ let v4 : UH4 = UH4_1 │
00:00:41 #5153 [Verbose] > │ let v5 : int32 = 0 │
00:00:41 #5154 [Verbose] > │ let v6 : UH4 = method9(v3, v4, v5) │
00:00:41 #5155 [Verbose] > │ let v7 : UH5 = UH5_1 │
00:00:41 #5156 [Verbose] > │ let v8 : UH5 = method12(v6, v7) │
00:00:41 #5157 [Verbose] > │ let v9 : UH6 = UH6_1 │
00:00:41 #5158 [Verbose] > │ let v10 : UH6 = UH6_1 │
00:00:41 #5159 [Verbose] > │ let struct (v11 : UH6, v12 : UH6) = method15(v8, v9, v10) │
00:00:41 #5160 [Verbose] > │ let v13 : UH6 = UH6_1 │
00:00:41 #5161 [Verbose] > │ let v14 : UH6 = method16(v11, v13) │
00:00:41 #5162 [Verbose] > │ let v15 : UH6 = UH6_1 │
00:00:41 #5163 [Verbose] > │ let v16 : UH6 = method16(v12, v15) │
00:00:41 #5164 [Verbose] > │ let v17 : (float -> ((UH0 -> UH1) -> (UH0 -> UH0))) = closure6() │
00:00:41 #5165 [Verbose] > │ let v18 : ((UH0 -> UH1) -> (UH0 -> UH0)) = v17 0.03 │
00:00:41 #5166 [Verbose] > │ let v19 : (UH0 -> UH0) = v18 v2 │
00:00:41 #5167 [Verbose] > │ let v20 : UH4 = UH4_1 │
00:00:41 #5168 [Verbose] > │ let v21 : int32 = 0 │
00:00:41 #5169 [Verbose] > │ let v22 : UH4 = method9(v19, v20, v21) │
00:00:41 #5170 [Verbose] > │ let v23 : UH5 = UH5_1 │
00:00:41 #5171 [Verbose] > │ let v24 : UH5 = method19(v22, v23) │
00:00:41 #5172 [Verbose] > │ let v25 : UH6 = UH6_1 │
00:00:41 #5173 [Verbose] > │ let v26 : UH6 = UH6_1 │
00:00:41 #5174 [Verbose] > │ let struct (v27 : UH6, v28 : UH6) = method15(v24, v25, v26) │
00:00:41 #5175 [Verbose] > │ let v29 : UH6 = UH6_1 │
00:00:41 #5176 [Verbose] > │ let v30 : UH6 = method16(v27, v29) │
00:00:41 #5177 [Verbose] > │ let v31 : UH6 = UH6_1 │
00:00:41 #5178 [Verbose] > │ let v32 : UH6 = method16(v28, v31) │
00:00:41 #5179 [Verbose] > │ let v33 : (float []) = method20(v14) │
00:00:41 #5180 [Verbose] > │ let v34 : (float []) = method20(v16) │
00:00:41 #5181 [Verbose] > │ let v35 : (float []) = method20(v30) │
00:00:41 #5182 [Verbose] > │ let v36 : (float []) = method20(v32) │
00:00:41 #5183 [Verbose] > │ let v37 : string = "euler-cromer" │
00:00:41 #5184 [Verbose] > │ let v38 : string = "runge-kutta 4" │
00:00:41 #5185 [Verbose] > │ let v39 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:41 #5186 [Verbose] > │ (v37, v33, v34); struct (v38, v35, v36)|] │
00:00:41 #5187 [Verbose] > │ let v40 : (struct (string * (float []) * (float [])) []) = method23(v39) │
00:00:41 #5188 [Verbose] > │ let v41 : string = "system kinetic energy versus time" │
00:00:41 #5189 [Verbose] > │ let v42 : string = "time (s)" │
00:00:41 #5190 [Verbose] > │ let v43 : string = "system kinetic energy (j)" │
00:00:41 #5191 [Verbose] > │ struct (v41, v42, v43, v40) │
00:00:41 #5192 [Verbose] > │ method0() │
00:00:41 #5193 [Verbose] > │ │
00:00:41 #5194 [Verbose] > │ │
00:00:41 #5195 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:41 #5196 [Verbose] >
00:00:41 #5197 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:41 #5198 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:41 #5199 [Verbose] > │ ### wave 1 │
00:00:41 #5200 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:41 #5201 [Verbose] >
00:00:41 #5202 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:41 #5203 [Verbose] > // // test
00:00:41 #5204 [Verbose] >
00:00:41 #5205 [Verbose] > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:00:41 #5206 [Verbose] > inl r1 = st1.pos_vec
00:00:41 #5207 [Verbose] > inl r2 = st2.pos_vec
00:00:41 #5208 [Verbose] > inl r21 = r2 ^-^ r1
00:00:41 #5209 [Verbose] > inl r21mag = magnitude r21
00:00:41 #5210 [Verbose] > -k * (r21mag - re) *^ r21 ^/ r21mag
00:00:41 #5211 [Verbose] >
00:00:41 #5212 [Verbose] > inl fixed_linear_spring k re r1 =
00:00:41 #5213 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:41 #5214 [Verbose] > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:00:41 #5215 [Verbose] > r1 })
00:00:41 #5216 [Verbose] >
00:00:41 #5217 [Verbose] > inl forces_string () =
00:00:41 #5218 [Verbose] > [[
00:00:41 #5219 [Verbose] > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ()))
00:00:41 #5220 [Verbose] > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:00:41 #5221 [Verbose] > ]] /@ (
00:00:41 #5222 [Verbose] > listm'.init_series 0 59 1
00:00:41 #5223 [Verbose] > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:00:41 #5224 [Verbose] > )
00:00:41 #5225 [Verbose] >
00:00:41 #5226 [Verbose] > inl string_update dt =
00:00:41 #5227 [Verbose] > update_mps (runge_kutta_4 dt) (forces_string ())
00:00:41 #5228 [Verbose] >
00:00:41 #5229 [Verbose] > inl string_initial_overtone n =
00:00:41 #5230 [Verbose] > inl ball_mass = 0.0008293 * 0.65 / 64
00:00:41 #5231 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:41 #5232 [Verbose] > listm'.init_series 0.01 0.64 0.01
00:00:41 #5233 [Verbose] > |> listm.map (fun x =>
00:00:41 #5234 [Verbose] > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:00:41 #5235 [Verbose] > particle_state {
00:00:41 #5236 [Verbose] > default_particle_state' with
00:00:41 #5237 [Verbose] > mass = ball_mass
00:00:41 #5238 [Verbose] > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:00:41 #5239 [Verbose] > velocity = zero_vec ()
00:00:41 #5240 [Verbose] > }
00:00:41 #5241 [Verbose] > )
00:00:41 #5242 [Verbose] > |> multi_particle_state
00:00:41 #5243 [Verbose] >
00:00:41 #5244 [Verbose] > inl string_initial_pluck () =
00:00:41 #5245 [Verbose] > inl ball_mass = 0.0008293 * 0.65 / 64
00:00:41 #5246 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:41 #5247 [Verbose] > listm'.init_series 0.01 0.64 0.01
00:00:41 #5248 [Verbose] > |> listm.map (fun x =>
00:00:41 #5249 [Verbose] > inl y =
00:00:41 #5250 [Verbose] > inl n = if x <= 0.51 then 0 else 0.65
00:00:41 #5251 [Verbose] > 0.005 / (0.51 - n) * (x - n)
00:00:41 #5252 [Verbose] > particle_state {
00:00:41 #5253 [Verbose] > default_particle_state' with
00:00:41 #5254 [Verbose] > mass = ball_mass
00:00:41 #5255 [Verbose] > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:00:41 #5256 [Verbose] > velocity = zero_vec ()
00:00:41 #5257 [Verbose] > }
00:00:41 #5258 [Verbose] > )
00:00:41 #5259 [Verbose] > |> multi_particle_state
00:00:41 #5260 [Verbose] >
00:00:41 #5261 [Verbose] > let main () =
00:00:41 #5262 [Verbose] > inl ~frames = listm'.init_series 0 9 1f64
00:00:41 #5263 [Verbose] > inl initial_state = string_initial_overtone 3i32
00:00:41 #5264 [Verbose] > inl frames =
00:00:41 #5265 [Verbose] > frames
00:00:41 #5266 [Verbose] > |> listm.map (fun n =>
00:00:41 #5267 [Verbose] > inl (multi_particle_state sts) =
00:00:41 #5268 [Verbose] > seq.iterate' (string_update 0.000025) initial_state |> fun f =>
00:00:41 #5269 [Verbose] > f 0f64
00:00:41 #5270 [Verbose] > inl rs =
00:00:41 #5271 [Verbose] > [[ zero_vec () ]]
00:00:41 #5272 [Verbose] > /@ (sts |> listm.map (fun (particle_state st) => st.pos_vec))
00:00:41 #5273 [Verbose] > /@ [[ 0.65 *^ i_hat () ]]
00:00:41 #5274 [Verbose] > inl x, y =
00:00:41 #5275 [Verbose] > rs
00:00:41 #5276 [Verbose] > |> listm.map (fun r => r.x, r.y)
00:00:41 #5277 [Verbose] > |> listm'.unzip
00:00:41 #5278 [Verbose] > inl x : a i32 _ = x |> listm.toArray
00:00:41 #5279 [Verbose] > inl y : a i32 _ = y |> listm.toArray
00:00:41 #5280 [Verbose] > x, y
00:00:41 #5281 [Verbose] > )
00:00:41 #5282 [Verbose] > |> listm.toArray : a i32 _
00:00:41 #5283 [Verbose] >
00:00:41 #5284 [Verbose] > inl n = 0i32
00:00:41 #5285 [Verbose] >
00:00:41 #5286 [Verbose] > inl x, y = index frames n
00:00:41 #5287 [Verbose] >
00:00:41 #5288 [Verbose] > "wave",
00:00:41 #5289 [Verbose] > "position (m)",
00:00:41 #5290 [Verbose] > "displacement (m)",
00:00:41 #5291 [Verbose] > ;[[
00:00:41 #5292 [Verbose] > ($"$\"{!n}\"" : string), x, y
00:00:41 #5293 [Verbose] > ]]
00:00:42 #5294 [Verbose] >
00:00:42 #5295 [Verbose] > ╭─[ 650.09ms - return value ]──────────────────────────────────────────────────╮
00:00:42 #5296 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:42 #5297 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:42 #5298 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:42 #5299 [Verbose] > │ stroke="none"/> │
00:00:42 #5300 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:42 #5301 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:42 #5302 [Verbose] > │ fill="#FFFFFF"> │
00:00:42 #5303 [Verbose] > │ wave │
00:00:42 #5304 [Verbose] > │ </text> │
00:00:42 #5305 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:00:42 #5306 [Verbose] > │ y2="75"/> │
00:00:42 #5307 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:42 #5308 [Verbose] > │ y2="75"/> │
00:00:42 #5309 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:00:42 #5310 [Verbose] > │ y2="75"/> │
00:00:42 #5311 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │
00:00:42 #5312 [Verbose] > │ y2="75"/> │
00:00:42 #5313 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:00:42 #5314 [Verbose] > │ y2... │
00:00:42 #5315 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 #5316 [Verbose] >
00:00:42 #5317 [Verbose] > ╭─[ 661.61ms - stdout ]────────────────────────────────────────────────────────╮
00:00:42 #5318 [Verbose] > │ type UH0 = │
00:00:42 #5319 [Verbose] > │ | UH0_0 of float * UH0 │
00:00:42 #5320 [Verbose] > │ | UH0_1 │
00:00:42 #5321 [Verbose] > │ and UH1 = │
00:00:42 #5322 [Verbose] > │ | UH1_0 of (float []) * (float []) * UH1 │
00:00:42 #5323 [Verbose] > │ | UH1_1 │
00:00:42 #5324 [Verbose] > │ let rec method3 (v0 : UH0, v1 : int32) : int32 = │
00:00:42 #5325 [Verbose] > │ match v0 with │
00:00:42 #5326 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:42 #5327 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:42 #5328 [Verbose] > │ method3(v3, v4) │
00:00:42 #5329 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:42 #5330 [Verbose] > │ v1 │
00:00:42 #5331 [Verbose] > │ and method4 (v0 : (float []), v1 : UH0, v2 : int32) : int32 = │
00:00:42 #5332 [Verbose] > │ match v1 with │
00:00:42 #5333 [Verbose] > │ | UH0_0(v3, v4) -> (* Cons *) │
00:00:42 #5334 [Verbose] > │ v0.[int v2] <- v3 │
00:00:42 #5335 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:42 #5336 [Verbose] > │ method4(v0, v4, v5) │
00:00:42 #5337 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:42 #5338 [Verbose] > │ v2 │
00:00:42 #5339 [Verbose] > │ and method2 (v0 : UH0) : (float []) = │
00:00:42 #5340 [Verbose] > │ let v1 : int32 = 0 │
00:00:42 #5341 [Verbose] > │ let v2 : int32 = method3(v0, v1) │
00:00:42 #5342 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:42 #5343 [Verbose] > │ let v4 : int32 = 0 │
00:00:42 #5344 [Verbose] > │ let v5 : int32 = method4(v3, v0, v4) │
00:00:42 #5345 [Verbose] > │ v3 │
00:00:42 #5346 [Verbose] > │ and method1 (v0 : UH0, v1 : UH1) : UH1 = │
00:00:42 #5347 [Verbose] > │ match v0 with │
00:00:42 #5348 [Verbose] > │ | UH0_0(v2, v3) -> (* Cons *) │
00:00:42 #5349 [Verbose] > │ let v4 : UH1 = method1(v3, v1) │
00:00:42 #5350 [Verbose] > │ let v5 : float = 0.0 │
00:00:42 #5351 [Verbose] > │ let v6 : float = 0.01 │
00:00:42 #5352 [Verbose] > │ let v7 : float = 0.02 │
00:00:42 #5353 [Verbose] > │ let v8 : float = 0.03 │
00:00:42 #5354 [Verbose] > │ let v9 : float = 0.04 │
00:00:42 #5355 [Verbose] > │ let v10 : float = 0.05 │
00:00:42 #5356 [Verbose] > │ let v11 : float = 0.060000000000000005 │
00:00:42 #5357 [Verbose] > │ let v12 : float = 0.06999999999999999 │
00:00:42 #5358 [Verbose] > │ let v13 : float = 0.08 │
00:00:42 #5359 [Verbose] > │ let v14 : float = 0.09 │
00:00:42 #5360 [Verbose] > │ let v15 : float = 0.09999999999999999 │
00:00:42 #5361 [Verbose] > │ let v16 : float = 0.11 │
00:00:42 #5362 [Verbose] > │ let v17 : float = 0.12 │
00:00:42 #5363 [Verbose] > │ let v18 : float = 0.13 │
00:00:42 #5364 [Verbose] > │ let v19 : float = 0.14 │
00:00:42 #5365 [Verbose] > │ let v20 : float = 0.15000000000000002 │
00:00:42 #5366 [Verbose] > │ let v21 : float = 0.16 │
00:00:42 #5367 [Verbose] > │ let v22 : float = 0.17 │
00:00:42 #5368 [Verbose] > │ let v23 : float = 0.18000000000000002 │
00:00:42 #5369 [Verbose] > │ let v24 : float = 0.19 │
00:00:42 #5370 [Verbose] > │ let v25 : float = 0.2 │
00:00:42 #5371 [Verbose] > │ let v26 : float = 0.21000000000000002 │
00:00:42 #5372 [Verbose] > │ let v27 : float = 0.22 │
00:00:42 #5373 [Verbose] > │ let v28 : float = 0.23 │
00:00:42 #5374 [Verbose] > │ let v29 : float = 0.24000000000000002 │
00:00:42 #5375 [Verbose] > │ let v30 : float = 0.25 │
00:00:42 #5376 [Verbose] > │ let v31 : float = 0.26 │
00:00:42 #5377 [Verbose] > │ let v32 : float = 0.27 │
00:00:42 #5378 [Verbose] > │ let v33 : float = 0.28 │
00:00:42 #5379 [Verbose] > │ let v34 : float = 0.29000000000000004 │
00:00:42 #5380 [Verbose] > │ let v35 : float = 0.3 │
00:00:42 #5381 [Verbose] > │ let v36 : float = 0.31 │
00:00:42 #5382 [Verbose] > │ let v37 : float = 0.32 │
00:00:42 #5383 [Verbose] > │ let v38 : float = 0.33 │
00:00:42 #5384 [Verbose] > │ let v39 : float = 0.34 │
00:00:42 #5385 [Verbose] > │ let v40 : float = 0.35000000000000003 │
00:00:42 #5386 [Verbose] > │ let v41 : float = 0.36000000000000004 │
00:00:42 #5387 [Verbose] > │ let v42 : float = 0.37 │
00:00:42 #5388 [Verbose] > │ let v43 : float = 0.38 │
00:00:42 #5389 [Verbose] > │ let v44 : float = 0.39 │
00:00:42 #5390 [Verbose] > │ let v45 : float = 0.4 │
00:00:42 #5391 [Verbose] > │ let v46 : float = 0.41000000000000003 │
00:00:42 #5392 [Verbose] > │ let v47 : float = 0.42000000000000004 │
00:00:42 #5393 [Verbose] > │ let v48 : float = 0.43 │
00:00:42 #5394 [Verbose] > │ let v49 : float = 0.44 │
00:00:42 #5395 [Verbose] > │ let v50 : float = 0.45 │
00:00:42 #5396 [Verbose] > │ let v51 : float = 0.46 │
00:00:42 #5397 [Verbose] > │ let v52 : float = 0.47000000000000003 │
00:00:42 #5398 [Verbose] > │ let v53 : float = 0.48000000000000004 │
00:00:42 #5399 [Verbose] > │ let v54 : float = 0.49 │
00:00:42 #5400 [Verbose] > │ let v55 : float = 0.5 │
00:00:42 #5401 [Verbose] > │ let v56 : float = 0.51 │
00:00:42 #5402 [Verbose] > │ let v57 : float = 0.52 │
00:00:42 #5403 [Verbose] > │ let v58 : float = 0.53 │
00:00:42 #5404 [Verbose] > │ let v59 : float = 0.54 │
00:00:42 #5405 [Verbose] > │ let v60 : float = 0.55 │
00:00:42 #5406 [Verbose] > │ let v61 : float = 0.56 │
00:00:42 #5407 [Verbose] > │ let v62 : float = 0.5700000000000001 │
00:00:42 #5408 [Verbose] > │ let v63 : float = 0.5800000000000001 │
00:00:42 #5409 [Verbose] > │ let v64 : float = 0.59 │
00:00:42 #5410 [Verbose] > │ let v65 : float = 0.6 │
00:00:42 #5411 [Verbose] > │ let v66 : float = 0.61 │
00:00:42 #5412 [Verbose] > │ let v67 : float = 0.62 │
00:00:42 #5413 [Verbose] > │ let v68 : float = 0.63 │
00:00:42 #5414 [Verbose] > │ let v69 : float = 0.64 │
00:00:42 #5415 [Verbose] > │ let v70 : float = 0.65 │
00:00:42 #5416 [Verbose] > │ let v71 : UH0 = UH0_1 │
00:00:42 #5417 [Verbose] > │ let v72 : UH0 = UH0_0(v70, v71) │
00:00:42 #5418 [Verbose] > │ let v73 : UH0 = UH0_0(v69, v72) │
00:00:42 #5419 [Verbose] > │ let v74 : UH0 = UH0_0(v68, v73) │
00:00:42 #5420 [Verbose] > │ let v75 : UH0 = UH0_0(v67, v74) │
00:00:42 #5421 [Verbose] > │ let v76 : UH0 = UH0_0(v66, v75) │
00:00:42 #5422 [Verbose] > │ let v77 : UH0 = UH0_0(v65, v76) │
00:00:42 #5423 [Verbose] > │ let v78 : UH0 = UH0_0(v64, v77) │
00:00:42 #5424 [Verbose] > │ let v79 : UH0 = UH0_0(v63, v78) │
00:00:42 #5425 [Verbose] > │ let v80 : UH0 = UH0_0(v62, v79) │
00:00:42 #5426 [Verbose] > │ let v81 : UH0 = UH0_0(v61, v80) │
00:00:42 #5427 [Verbose] > │ let v82 : UH0 = UH0_0(v60, v81) │
00:00:42 #5428 [Verbose] > │ let v83 : UH0 = UH0_0(v59, v82) │
00:00:42 #5429 [Verbose] > │ let v84 : UH0 = UH0_0(v58, v83) │
00:00:42 #5430 [Verbose] > │ let v85 : UH0 = UH0_0(v57, v84) │
00:00:42 #5431 [Verbose] > │ let v86 : UH0 = UH0_0(v56, v85) │
00:00:42 #5432 [Verbose] > │ let v87 : UH0 = UH0_0(v55, v86) │
00:00:42 #5433 [Verbose] > │ let v88 : UH0 = UH0_0(v54, v87) │
00:00:42 #5434 [Verbose] > │ let v89 : UH0 = UH0_0(v53, v88) │
00:00:42 #5435 [Verbose] > │ let v90 : UH0 = UH0_0(v52, v89) │
00:00:42 #5436 [Verbose] > │ let v91 : UH0 = UH0_0(v51, v90) │
00:00:42 #5437 [Verbose] > │ let v92 : UH0 = UH0_0(v50, v91) │
00:00:42 #5438 [Verbose] > │ let v93 : UH0 = UH0_0(v49, v92) │
00:00:42 #5439 [Verbose] > │ let v94 : UH0 = UH0_0(v48, v93) │
00:00:42 #5440 [Verbose] > │ let v95 : UH0 = UH0_0(v47, v94) │
00:00:42 #5441 [Verbose] > │ let v96 : UH0 = UH0_0(v46, v95) │
00:00:42 #5442 [Verbose] > │ let v97 : UH0 = UH0_0(v45, v96) │
00:00:42 #5443 [Verbose] > │ let v98 : UH0 = UH0_0(v44, v97) │
00:00:42 #5444 [Verbose] > │ let v99 : UH0 = UH0_0(v43, v98) │
00:00:42 #5445 [Verbose] > │ let v100 : UH0 = UH0_0(v42, v99) │
00:00:42 #5446 [Verbose] > │ let v101 : UH0 = UH0_0(v41, v100) │
00:00:42 #5447 [Verbose] > │ let v102 : UH0 = UH0_0(v40, v101) │
00:00:42 #5448 [Verbose] > │ let v103 : UH0 = UH0_0(v39, v102) │
00:00:42 #5449 [Verbose] > │ let v104 : UH0 = UH0_0(v38, v103) │
00:00:42 #5450 [Verbose] > │ let v105 : UH0 = UH0_0(v37, v104) │
00:00:42 #5451 [Verbose] > │ let v106 : UH0 = UH0_0(v36, v105) │
00:00:42 #5452 [Verbose] > │ let v107 : UH0 = UH0_0(v35, v106) │
00:00:42 #5453 [Verbose] > │ let v108 : UH0 = UH0_0(v34, v107) │
00:00:42 #5454 [Verbose] > │ let v109 : UH0 = UH0_0(v33, v108) │
00:00:42 #5455 [Verbose] > │ let v110 : UH0 = UH0_0(v32, v109) │
00:00:42 #5456 [Verbose] > │ let v111 : UH0 = UH0_0(v31, v110) │
00:00:42 #5457 [Verbose] > │ let v112 : UH0 = UH0_0(v30, v111) │
00:00:42 #5458 [Verbose] > │ let v113 : UH0 = UH0_0(v29, v112) │
00:00:42 #5459 [Verbose] > │ let v114 : UH0 = UH0_0(v28, v113) │
00:00:42 #5460 [Verbose] > │ let v115 : UH0 = UH0_0(v27, v114) │
00:00:42 #5461 [Verbose] > │ let v116 : UH0 = UH0_0(v26, v115) │
00:00:42 #5462 [Verbose] > │ let v117 : UH0 = UH0_0(v25, v116) │
00:00:42 #5463 [Verbose] > │ let v118 : UH0 = UH0_0(v24, v117) │
00:00:42 #5464 [Verbose] > │ let v119 : UH0 = UH0_0(v23, v118) │
00:00:42 #5465 [Verbose] > │ let v120 : UH0 = UH0_0(v22, v119) │
00:00:42 #5466 [Verbose] > │ let v121 : UH0 = UH0_0(v21, v120) │
00:00:42 #5467 [Verbose] > │ let v122 : UH0 = UH0_0(v20, v121) │
00:00:42 #5468 [Verbose] > │ let v123 : UH0 = UH0_0(v19, v122) │
00:00:42 #5469 [Verbose] > │ let v124 : UH0 = UH0_0(v18, v123) │
00:00:42 #5470 [Verbose] > │ let v125 : UH0 = UH0_0(v17, v124) │
00:00:42 #5471 [Verbose] > │ let v126 : UH0 = UH0_0(v16, v125) │
00:00:42 #5472 [Verbose] > │ let v127 : UH0 = UH0_0(v15, v126) │
00:00:42 #5473 [Verbose] > │ let v128 : UH0 = UH0_0(v14, v127) │
00:00:42 #5474 [Verbose] > │ let v129 : UH0 = UH0_0(v13, v128) │
00:00:42 #5475 [Verbose] > │ let v130 : UH0 = UH0_0(v12, v129) │
00:00:42 #5476 [Verbose] > │ let v131 : UH0 = UH0_0(v11, v130) │
00:00:42 #5477 [Verbose] > │ let v132 : UH0 = UH0_0(v10, v131) │
00:00:42 #5478 [Verbose] > │ let v133 : UH0 = UH0_0(v9, v132) │
00:00:42 #5479 [Verbose] > │ let v134 : UH0 = UH0_0(v8, v133) │
00:00:42 #5480 [Verbose] > │ let v135 : UH0 = UH0_0(v7, v134) │
00:00:42 #5481 [Verbose] > │ let v136 : UH0 = UH0_0(v6, v135) │
00:00:42 #5482 [Verbose] > │ let v137 : UH0 = UH0_0(v5, v136) │
00:00:42 #5483 [Verbose] > │ let v138 : (float []) = method2(v137) │
00:00:42 #5484 [Verbose] > │ let v139 : float = 0.0 │
00:00:42 #5485 [Verbose] > │ let v140 : float = 0.0007224452478461068 │
00:00:42 #5486 [Verbose] > │ let v141 : float = 0.0014297283919934465 │
00:00:42 #5487 [Verbose] > │ let v142 : float = 0.0021070055388626454 │
00:00:42 #5488 [Verbose] > │ let v143 : float = 0.00274006253677335 │
00:00:42 #5489 [Verbose] > │ let v144 : float = 0.0033156132912039757 │
00:00:42 #5490 [Verbose] > │ let v145 : float = 0.0038215786027292415 │
00:00:42 #5491 [Verbose] > │ let v146 : float = 0.004247339675607605 │
00:00:42 #5492 [Verbose] > │ let v147 : float = 0.004583960976582912 │
00:00:42 #5493 [Verbose] > │ let v148 : float = 0.004824377766717757 │
00:00:42 #5494 [Verbose] > │ let v149 : float = 0.00496354437049027 │
00:00:42 #5495 [Verbose] > │ let v150 : float = 0.004998540070400965 │
00:00:42 #5496 [Verbose] > │ let v151 : float = 0.004928630404658255 │
00:00:42 #5497 [Verbose] > │ let v152 : float = 0.004755282581475768 │
00:00:42 #5498 [Verbose] > │ let v153 : float = 0.004482134686478519 │
00:00:42 #5499 [Verbose] > │ let v154 : float = 0.0041149193294682815 │
00:00:42 #5500 [Verbose] > │ let v155 : float = 0.0036613433329888666 │
00:00:42 #5501 [Verbose] > │ let v156 : float = 0.0031309259876915697 │
00:00:42 #5502 [Verbose] > │ let v157 : float = 0.002534799269067951 │
00:00:42 #5503 [Verbose] > │ let v158 : float = 0.0018854742084416015 │
00:00:42 #5504 [Verbose] > │ let v159 : float = 0.0011965783214377905 │
00:00:42 #5505 [Verbose] > │ let v160 : float = 0.00048256960457257535 │
00:00:42 #5506 [Verbose] > │ let v161 : float = -0.00024156689762753317 │
00:00:42 #5507 [Verbose] > │ let v162 : float = -0.0009606335867685418 │
00:00:42 #5508 [Verbose] > │ let v163 : float = -0.001659539265642642 │
00:00:42 #5509 [Verbose] > │ let v164 : float = -0.002323615860218842 │
00:00:42 #5510 [Verbose] > │ let v165 : float = -0.0029389262614623636 │
00:00:42 #5511 [Verbose] > │ let v166 : float = -0.003492556826244686 │
00:00:42 #5512 [Verbose] > │ let v167 : float = -0.003972888398568771 │
00:00:42 #5513 [Verbose] > │ let v168 : float = -0.00436984016313259 │
00:00:42 #5514 [Verbose] > │ let v169 : float = -0.004675081213427074 │
00:00:42 #5515 [Verbose] > │ let v170 : float = -0.004882205394146359 │
00:00:42 #5516 [Verbose] > │ let v171 : float = -0.004986865748457456 │
00:00:42 #5517 [Verbose] > │ let v172 : float = -0.004986865748457456 │
00:00:42 #5518 [Verbose] > │ let v173 : float = -0.004882205394146361 │
00:00:42 #5519 [Verbose] > │ let v174 : float = -0.004675081213427074 │
00:00:42 #5520 [Verbose] > │ let v175 : float = -0.004369840163132589 │
00:00:42 #5521 [Verbose] > │ let v176 : float = -0.003972888398568774 │
00:00:42 #5522 [Verbose] > │ let v177 : float = -0.0034925568262446837 │
00:00:42 #5523 [Verbose] > │ let v178 : float = -0.002938926261462367 │
00:00:42 #5524 [Verbose] > │ let v179 : float = -0.002323615860218846 │
00:00:42 #5525 [Verbose] > │ let v180 : float = -0.0016595392656426435 │
00:00:42 #5526 [Verbose] > │ let v181 : float = -0.0009606335867685414 │
00:00:42 #5527 [Verbose] > │ let v182 : float = -0.00024156689762753724 │
00:00:42 #5528 [Verbose] > │ let v183 : float = 0.0004825696045725713 │
00:00:42 #5529 [Verbose] > │ let v184 : float = 0.0011965783214377866 │
00:00:42 #5530 [Verbose] > │ let v185 : float = 0.0018854742084416021 │
00:00:42 #5531 [Verbose] > │ let v186 : float = 0.002534799269067953 │
00:00:42 #5532 [Verbose] > │ let v187 : float = 0.003130925987691568 │
00:00:42 #5533 [Verbose] > │ let v188 : float = 0.0036613433329888622 │
00:00:42 #5534 [Verbose] > │ let v189 : float = 0.0041149193294682815 │
00:00:42 #5535 [Verbose] > │ let v190 : float = 0.0044821346864785195 │
00:00:42 #5536 [Verbose] > │ let v191 : float = 0.004755282581475766 │
00:00:42 #5537 [Verbose] > │ let v192 : float = 0.004928630404658255 │
00:00:42 #5538 [Verbose] > │ let v193 : float = 0.004998540070400965 │
00:00:42 #5539 [Verbose] > │ let v194 : float = 0.004963544370490271 │
00:00:42 #5540 [Verbose] > │ let v195 : float = 0.004824377766717758 │
00:00:42 #5541 [Verbose] > │ let v196 : float = 0.004583960976582912 │
00:00:42 #5542 [Verbose] > │ let v197 : float = 0.004247339675607605 │
00:00:42 #5543 [Verbose] > │ let v198 : float = 0.003821578602729245 │
00:00:42 #5544 [Verbose] > │ let v199 : float = 0.0033156132912039783 │
00:00:42 #5545 [Verbose] > │ let v200 : float = 0.0027400625367733585 │
00:00:42 #5546 [Verbose] > │ let v201 : float = 0.0021070055388626528 │
00:00:42 #5547 [Verbose] > │ let v202 : float = 0.001429728391993452 │
00:00:42 #5548 [Verbose] > │ let v203 : float = 0.0007224452478461016 │
00:00:42 #5549 [Verbose] > │ let v204 : float = 0.0 │
00:00:42 #5550 [Verbose] > │ let v205 : UH0 = UH0_1 │
00:00:42 #5551 [Verbose] > │ let v206 : UH0 = UH0_0(v204, v205) │
00:00:42 #5552 [Verbose] > │ let v207 : UH0 = UH0_0(v203, v206) │
00:00:42 #5553 [Verbose] > │ let v208 : UH0 = UH0_0(v202, v207) │
00:00:42 #5554 [Verbose] > │ let v209 : UH0 = UH0_0(v201, v208) │
00:00:42 #5555 [Verbose] > │ let v210 : UH0 = UH0_0(v200, v209) │
00:00:42 #5556 [Verbose] > │ let v211 : UH0 = UH0_0(v199, v210) │
00:00:42 #5557 [Verbose] > │ let v212 : UH0 = UH0_0(v198, v211) │
00:00:42 #5558 [Verbose] > │ let v213 : UH0 = UH0_0(v197, v212) │
00:00:42 #5559 [Verbose] > │ let v214 : UH0 = UH0_0(v196, v213) │
00:00:42 #5560 [Verbose] > │ let v215 : UH0 = UH0_0(v195, v214) │
00:00:42 #5561 [Verbose] > │ let v216 : UH0 = UH0_0(v194, v215) │
00:00:42 #5562 [Verbose] > │ let v217 : UH0 = UH0_0(v193, v216) │
00:00:42 #5563 [Verbose] > │ let v218 : UH0 = UH0_0(v192, v217) │
00:00:42 #5564 [Verbose] > │ let v219 : UH0 = UH0_0(v191, v218) │
00:00:42 #5565 [Verbose] > │ let v220 : UH0 = UH0_0(v190, v219) │
00:00:42 #5566 [Verbose] > │ let v221 : UH0 = UH0_0(v189, v220) │
00:00:42 #5567 [Verbose] > │ let v222 : UH0 = UH0_0(v188, v221) │
00:00:42 #5568 [Verbose] > │ let v223 : UH0 = UH0_0(v187, v222) │
00:00:42 #5569 [Verbose] > │ let v224 : UH0 = UH0_0(v186, v223) │
00:00:42 #5570 [Verbose] > │ let v225 : UH0 = UH0_0(v185, v224) │
00:00:42 #5571 [Verbose] > │ let v226 : UH0 = UH0_0(v184, v225) │
00:00:42 #5572 [Verbose] > │ let v227 : UH0 = UH0_0(v183, v226) │
00:00:42 #5573 [Verbose] > │ let v228 : UH0 = UH0_0(v182, v227) │
00:00:42 #5574 [Verbose] > │ let v229 : UH0 = UH0_0(v181, v228) │
00:00:42 #5575 [Verbose] > │ let v230 : UH0 = UH0_0(v180, v229) │
00:00:42 #5576 [Verbose] > │ let v231 : UH0 = UH0_0(v179, v230) │
00:00:42 #5577 [Verbose] > │ let v232 : UH0 = UH0_0(v178, v231) │
00:00:42 #5578 [Verbose] > │ let v233 : UH0 = UH0_0(v177, v232) │
00:00:42 #5579 [Verbose] > │ let v234 : UH0 = UH0_0(v176, v233) │
00:00:42 #5580 [Verbose] > │ let v235 : UH0 = UH0_0(v175, v234) │
00:00:42 #5581 [Verbose] > │ let v236 : UH0 = UH0_0(v174, v235) │
00:00:42 #5582 [Verbose] > │ let v237 : UH0 = UH0_0(v173, v236) │
00:00:42 #5583 [Verbose] > │ let v238 : UH0 = UH0_0(v172, v237) │
00:00:42 #5584 [Verbose] > │ let v239 : UH0 = UH0_0(v171, v238) │
00:00:42 #5585 [Verbose] > │ let v240 : UH0 = UH0_0(v170, v239) │
00:00:42 #5586 [Verbose] > │ let v241 : UH0 = UH0_0(v169, v240) │
00:00:42 #5587 [Verbose] > │ let v242 : UH0 = UH0_0(v168, v241) │
00:00:42 #5588 [Verbose] > │ let v243 : UH0 = UH0_0(v167, v242) │
00:00:42 #5589 [Verbose] > │ let v244 : UH0 = UH0_0(v166, v243) │
00:00:42 #5590 [Verbose] > │ let v245 : UH0 = UH0_0(v165, v244) │
00:00:42 #5591 [Verbose] > │ let v246 : UH0 = UH0_0(v164, v245) │
00:00:42 #5592 [Verbose] > │ let v247 : UH0 = UH0_0(v163, v246) │
00:00:42 #5593 [Verbose] > │ let v248 : UH0 = UH0_0(v162, v247) │
00:00:42 #5594 [Verbose] > │ let v249 : UH0 = UH0_0(v161, v248) │
00:00:42 #5595 [Verbose] > │ let v250 : UH0 = UH0_0(v160, v249) │
00:00:42 #5596 [Verbose] > │ let v251 : UH0 = UH0_0(v159, v250) │
00:00:42 #5597 [Verbose] > │ let v252 : UH0 = UH0_0(v158, v251) │
00:00:42 #5598 [Verbose] > │ let v253 : UH0 = UH0_0(v157, v252) │
00:00:42 #5599 [Verbose] > │ let v254 : UH0 = UH0_0(v156, v253) │
00:00:42 #5600 [Verbose] > │ let v255 : UH0 = UH0_0(v155, v254) │
00:00:42 #5601 [Verbose] > │ let v256 : UH0 = UH0_0(v154, v255) │
00:00:42 #5602 [Verbose] > │ let v257 : UH0 = UH0_0(v153, v256) │
00:00:42 #5603 [Verbose] > │ let v258 : UH0 = UH0_0(v152, v257) │
00:00:42 #5604 [Verbose] > │ let v259 : UH0 = UH0_0(v151, v258) │
00:00:42 #5605 [Verbose] > │ let v260 : UH0 = UH0_0(v150, v259) │
00:00:42 #5606 [Verbose] > │ let v261 : UH0 = UH0_0(v149, v260) │
00:00:42 #5607 [Verbose] > │ let v262 : UH0 = UH0_0(v148, v261) │
00:00:42 #5608 [Verbose] > │ let v263 : UH0 = UH0_0(v147, v262) │
00:00:42 #5609 [Verbose] > │ let v264 : UH0 = UH0_0(v146, v263) │
00:00:42 #5610 [Verbose] > │ let v265 : UH0 = UH0_0(v145, v264) │
00:00:42 #5611 [Verbose] > │ let v266 : UH0 = UH0_0(v144, v265) │
00:00:42 #5612 [Verbose] > │ let v267 : UH0 = UH0_0(v143, v266) │
00:00:42 #5613 [Verbose] > │ let v268 : UH0 = UH0_0(v142, v267) │
00:00:42 #5614 [Verbose] > │ let v269 : UH0 = UH0_0(v141, v268) │
00:00:42 #5615 [Verbose] > │ let v270 : UH0 = UH0_0(v140, v269) │
00:00:42 #5616 [Verbose] > │ let v271 : UH0 = UH0_0(v139, v270) │
00:00:42 #5617 [Verbose] > │ let v272 : (float []) = method2(v271) │
00:00:42 #5618 [Verbose] > │ UH1_0(v138, v272, v4) │
00:00:42 #5619 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:00:42 #5620 [Verbose] > │ v1 │
00:00:42 #5621 [Verbose] > │ and method6 (v0 : UH1, v1 : int32) : int32 = │
00:00:42 #5622 [Verbose] > │ match v0 with │
00:00:42 #5623 [Verbose] > │ | UH1_0(v2, v3, v4) -> (* Cons *) │
00:00:42 #5624 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:00:42 #5625 [Verbose] > │ method6(v4, v5) │
00:00:42 #5626 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:42 #5627 [Verbose] > │ v1 │
00:00:42 #5628 [Verbose] > │ and method7 (v0 : (struct ((float []) * (float [])) []), v1 : UH1, v2 : │
00:00:42 #5629 [Verbose] > │ int32) : int32 = │
00:00:42 #5630 [Verbose] > │ match v1 with │
00:00:42 #5631 [Verbose] > │ | UH1_0(v3, v4, v5) -> (* Cons *) │
00:00:42 #5632 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:00:42 #5633 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:42 #5634 [Verbose] > │ method7(v0, v5, v6) │
00:00:42 #5635 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:00:42 #5636 [Verbose] > │ v2 │
00:00:42 #5637 [Verbose] > │ and method5 (v0 : UH1) : (struct ((float []) * (float [])) []) = │
00:00:42 #5638 [Verbose] > │ let v1 : int32 = 0 │
00:00:42 #5639 [Verbose] > │ let v2 : int32 = method6(v0, v1) │
00:00:42 #5640 [Verbose] > │ let v3 : (struct ((float []) * (float [])) []) = Array.zeroCreate<struct │
00:00:42 #5641 [Verbose] > │ ((float []) * (float []))> (v2) │
00:00:42 #5642 [Verbose] > │ let v4 : int32 = 0 │
00:00:42 #5643 [Verbose] > │ let v5 : int32 = method7(v3, v0, v4) │
00:00:42 #5644 [Verbose] > │ v3 │
00:00:42 #5645 [Verbose] > │ and method8 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:42 #5646 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:42 #5647 [Verbose] > │ v0 │
00:00:42 #5648 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:42 #5649 [Verbose] > │ []) * (float [])) [])) = │
00:00:42 #5650 [Verbose] > │ let v0 : float = 0.0 │
00:00:42 #5651 [Verbose] > │ let v1 : float = 1.0 │
00:00:42 #5652 [Verbose] > │ let v2 : float = 2.0 │
00:00:42 #5653 [Verbose] > │ let v3 : float = 3.0 │
00:00:42 #5654 [Verbose] > │ let v4 : float = 4.0 │
00:00:42 #5655 [Verbose] > │ let v5 : float = 5.0 │
00:00:42 #5656 [Verbose] > │ let v6 : float = 6.0 │
00:00:42 #5657 [Verbose] > │ let v7 : float = 7.0 │
00:00:42 #5658 [Verbose] > │ let v8 : float = 8.0 │
00:00:42 #5659 [Verbose] > │ let v9 : float = 9.0 │
00:00:42 #5660 [Verbose] > │ let v10 : UH0 = UH0_1 │
00:00:42 #5661 [Verbose] > │ let v11 : UH0 = UH0_0(v9, v10) │
00:00:42 #5662 [Verbose] > │ let v12 : UH0 = UH0_0(v8, v11) │
00:00:42 #5663 [Verbose] > │ let v13 : UH0 = UH0_0(v7, v12) │
00:00:42 #5664 [Verbose] > │ let v14 : UH0 = UH0_0(v6, v13) │
00:00:42 #5665 [Verbose] > │ let v15 : UH0 = UH0_0(v5, v14) │
00:00:42 #5666 [Verbose] > │ let v16 : UH0 = UH0_0(v4, v15) │
00:00:42 #5667 [Verbose] > │ let v17 : UH0 = UH0_0(v3, v16) │
00:00:42 #5668 [Verbose] > │ let v18 : UH0 = UH0_0(v2, v17) │
00:00:42 #5669 [Verbose] > │ let v19 : UH0 = UH0_0(v1, v18) │
00:00:42 #5670 [Verbose] > │ let v20 : UH0 = UH0_0(v0, v19) │
00:00:42 #5671 [Verbose] > │ let v21 : UH1 = UH1_1 │
00:00:42 #5672 [Verbose] > │ let v22 : UH1 = method1(v20, v21) │
00:00:42 #5673 [Verbose] > │ let v23 : (struct ((float []) * (float [])) []) = method5(v22) │
00:00:42 #5674 [Verbose] > │ let struct (v24 : (float []), v25 : (float [])) = v23.[int 0] │
00:00:42 #5675 [Verbose] > │ let v26 : string = $"{0}" │
00:00:42 #5676 [Verbose] > │ let v27 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:42 #5677 [Verbose] > │ (v26, v24, v25)|] │
00:00:42 #5678 [Verbose] > │ let v28 : (struct (string * (float []) * (float [])) []) = method8(v27) │
00:00:42 #5679 [Verbose] > │ let v29 : string = "wave" │
00:00:42 #5680 [Verbose] > │ let v30 : string = "position (m)" │
00:00:42 #5681 [Verbose] > │ let v31 : string = "displacement (m)" │
00:00:42 #5682 [Verbose] > │ struct (v29, v30, v31, v28) │
00:00:42 #5683 [Verbose] > │ method0() │
00:00:42 #5684 [Verbose] > │ │
00:00:42 #5685 [Verbose] > │ │
00:00:42 #5686 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 #5687 [Verbose] >
00:00:42 #5688 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:42 #5689 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:42 #5690 [Verbose] > │ ### system kinetic energy versus time 2 │
00:00:42 #5691 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 #5692 [Verbose] >
00:00:42 #5693 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:42 #5694 [Verbose] > // // test
00:00:42 #5695 [Verbose] >
00:00:42 #5696 [Verbose] > inl central_force f (particle_state st1) (particle_state st2) =
00:00:42 #5697 [Verbose] > inl r1 = st1.pos_vec
00:00:42 #5698 [Verbose] > inl r2 = st2.pos_vec
00:00:42 #5699 [Verbose] > inl r21 = r2 ^-^ r1
00:00:42 #5700 [Verbose] > inl r21mag = magnitude r21
00:00:42 #5701 [Verbose] > f r21mag *^ r21 ^/ r21mag
00:00:42 #5702 [Verbose] >
00:00:42 #5703 [Verbose] > inl billiard_force k re =
00:00:42 #5704 [Verbose] > inl f r =
00:00:42 #5705 [Verbose] > if r >= re
00:00:42 #5706 [Verbose] > then 0
00:00:42 #5707 [Verbose] > else -k * (r - re)
00:00:42 #5708 [Verbose] > central_force f
00:00:42 #5709 [Verbose] >
00:00:42 #5710 [Verbose] > type force_vector = vec
00:00:42 #5711 [Verbose] > type two_body_force = particle_state -> particle_state -> force_vector
00:00:42 #5712 [Verbose] >
00:00:42 #5713 [Verbose] > union force t =
00:00:42 #5714 [Verbose] > | ExternalForce : t * one_body_force
00:00:42 #5715 [Verbose] > | InternalForce : t * t * two_body_force
00:00:42 #5716 [Verbose] >
00:00:42 #5717 [Verbose] > nominal multi_particle_state = stream.stream particle_state
00:00:42 #5718 [Verbose] >
00:00:42 #5719 [Verbose] > nominal d_multi_particle_state = stream.stream d_particle_state
00:00:42 #5720 [Verbose] >
00:00:42 #5721 [Verbose] > inl force_on n s force =
00:00:42 #5722 [Verbose] > match force with
00:00:42 #5723 [Verbose] > | ExternalForce (n0, f_one_body) =>
00:00:42 #5724 [Verbose] > if n = n0
00:00:42 #5725 [Verbose] > then f_one_body
00:00:42 #5726 [Verbose] > else fun _ => zero_vec ()
00:00:42 #5727 [Verbose] > | InternalForce (n0, n1, f_two_body) =>
00:00:42 #5728 [Verbose] > if n = n0
00:00:42 #5729 [Verbose] > then s |> stream.try_item n1 |> optionm.map f_two_body
00:00:42 #5730 [Verbose] > elif n = n1
00:00:42 #5731 [Verbose] > then s |> stream.try_item n0 |> optionm.map f_two_body
00:00:42 #5732 [Verbose] > else None
00:00:42 #5733 [Verbose] > |> optionm'.default_value (fun _ => zero_vec ())
00:00:42 #5734 [Verbose] >
00:00:42 #5735 [Verbose] > inl forces_on n (multi_particle_state sts) fs =
00:00:42 #5736 [Verbose] > fs
00:00:42 #5737 [Verbose] > |> listm.map (force_on n sts)
00:00:42 #5738 [Verbose] >
00:00:42 #5739 [Verbose] > inl newton_second_mps fs ((multi_particle_state sts) as mpst) =
00:00:42 #5740 [Verbose] > inl deriv (n, st) =
00:00:42 #5741 [Verbose] > newton_second_ps (forces_on n mpst fs) st
00:00:42 #5742 [Verbose] > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state
00:00:42 #5743 [Verbose] >
00:00:42 #5744 [Verbose] > instance (+++) d_multi_particle_state =
00:00:42 #5745 [Verbose] > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) =>
00:00:42 #5746 [Verbose] > (dsts1, dsts2)
00:00:42 #5747 [Verbose] > ||> stream.zip_with (+++)
00:00:42 #5748 [Verbose] > |> d_multi_particle_state
00:00:42 #5749 [Verbose] >
00:00:42 #5750 [Verbose] > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:00:42 #5751 [Verbose] > dsts
00:00:42 #5752 [Verbose] > |> stream.map (scale w)
00:00:42 #5753 [Verbose] > |> d_multi_particle_state
00:00:42 #5754 [Verbose] >
00:00:42 #5755 [Verbose] > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:00:42 #5756 [Verbose] > inl (d_multi_particle_state dsts) =
00:00:42 #5757 [Verbose] > real
00:00:42 #5758 [Verbose] > match dsts with
00:00:42 #5759 [Verbose] > | d_multi_particle_state _ => dsts
00:00:42 #5760 [Verbose] > (dsts, sts)
00:00:42 #5761 [Verbose] > ||> stream.zip_with (shift dt)
00:00:42 #5762 [Verbose] > |> stream.memoize
00:00:42 #5763 [Verbose] > |> fun x => x ()
00:00:42 #5764 [Verbose] > |> multi_particle_state
00:00:42 #5765 [Verbose] >
00:00:42 #5766 [Verbose] > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:00:42 #5767 [Verbose] > d_multi_particle_state =
00:00:42 #5768 [Verbose] > fun deriv ((multi_particle_state sts0) as mpst0) =>
00:00:42 #5769 [Verbose] > inl (multi_particle_state sts1) = euler dt deriv mpst0
00:00:42 #5770 [Verbose] > (sts0, sts1)
00:00:42 #5771 [Verbose] > ||> stream.zip
00:00:42 #5772 [Verbose] > |> stream.map (fun ((particle_state st0), (particle_state st1)) =>
00:00:42 #5773 [Verbose] > particle_state {
00:00:42 #5774 [Verbose] > st1 with
00:00:42 #5775 [Verbose] > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:00:42 #5776 [Verbose] > }
00:00:42 #5777 [Verbose] > )
00:00:42 #5778 [Verbose] > |> multi_particle_state
00:00:42 #5779 [Verbose] >
00:00:42 #5780 [Verbose] > inl update_mps (method : numerical_method multi_particle_state
00:00:42 #5781 [Verbose] > d_multi_particle_state) =
00:00:42 #5782 [Verbose] > newton_second_mps >> method
00:00:42 #5783 [Verbose] >
00:00:42 #5784 [Verbose] > inl states_mps (method : numerical_method multi_particle_state
00:00:42 #5785 [Verbose] > d_multi_particle_state) =
00:00:42 #5786 [Verbose] > newton_second_mps
00:00:42 #5787 [Verbose] > >> method
00:00:42 #5788 [Verbose] > >> (fun x (multi_particle_state y) =>
00:00:42 #5789 [Verbose] > y
00:00:42 #5790 [Verbose] > |> stream.memoize
00:00:42 #5791 [Verbose] > |> (fun x => x ())
00:00:42 #5792 [Verbose] > |> multi_particle_state |> x
00:00:42 #5793 [Verbose] > )
00:00:42 #5794 [Verbose] > // >> stream.iterate
00:00:42 #5795 [Verbose] > >> seq.iterate'
00:00:42 #5796 [Verbose] >
00:00:42 #5797 [Verbose] > inl kinetic_energy (particle_state st) =
00:00:42 #5798 [Verbose] > inl m = st.mass
00:00:42 #5799 [Verbose] > inl v = magnitude st.velocity
00:00:42 #5800 [Verbose] > 0.5 * m * v ** 2
00:00:42 #5801 [Verbose] >
00:00:42 #5802 [Verbose] > inl system_ke (multi_particle_state sts) =
00:00:42 #5803 [Verbose] > sts
00:00:42 #5804 [Verbose] > |> stream.map kinetic_energy
00:00:42 #5805 [Verbose] > |> stream.sum
00:00:42 #5806 [Verbose] >
00:00:42 #5807 [Verbose] > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:00:42 #5808 [Verbose] > inl r1 = st1.pos_vec
00:00:42 #5809 [Verbose] > inl r2 = st2.pos_vec
00:00:42 #5810 [Verbose] > inl r21 = r2 ^-^ r1
00:00:42 #5811 [Verbose] > inl r21mag = magnitude r21
00:00:42 #5812 [Verbose] > k * (r21mag - re) ** 2 / 2
00:00:42 #5813 [Verbose] >
00:00:42 #5814 [Verbose] > inl earth_surface_gravity_pe (particle_state st) =
00:00:42 #5815 [Verbose] > inl g = 9.80665
00:00:42 #5816 [Verbose] > inl m = st.mass
00:00:42 #5817 [Verbose] > inl z = st.pos_vec.z
00:00:42 #5818 [Verbose] > m * g * z
00:00:42 #5819 [Verbose] >
00:00:42 #5820 [Verbose] > inl ball_radius () = 0.03
00:00:42 #5821 [Verbose] >
00:00:42 #5822 [Verbose] > inl billiard_forces k =
00:00:42 #5823 [Verbose] > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]]
00:00:42 #5824 [Verbose] >
00:00:42 #5825 [Verbose] > inl billiard_initial () =
00:00:42 #5826 [Verbose] > inl ball_mass = 0.160
00:00:42 #5827 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:42 #5828 [Verbose] > [[
00:00:42 #5829 [Verbose] > particle_state {
00:00:42 #5830 [Verbose] > default_particle_state' with
00:00:42 #5831 [Verbose] > mass = ball_mass
00:00:42 #5832 [Verbose] > pos_vec = zero_vec ()
00:00:42 #5833 [Verbose] > velocity = 0.2 *^ i_hat ()
00:00:42 #5834 [Verbose] > }
00:00:42 #5835 [Verbose] > particle_state {
00:00:42 #5836 [Verbose] > default_particle_state' with
00:00:42 #5837 [Verbose] > mass = ball_mass
00:00:42 #5838 [Verbose] > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:00:42 #5839 [Verbose] > velocity = zero_vec ()
00:00:42 #5840 [Verbose] > }
00:00:42 #5841 [Verbose] > ]]
00:00:42 #5842 [Verbose] > |> stream.from_list
00:00:42 #5843 [Verbose] > |> multi_particle_state
00:00:42 #5844 [Verbose] >
00:00:42 #5845 [Verbose] > inl billiard_states ~n_method k dt =
00:00:42 #5846 [Verbose] > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:00:42 #5847 [Verbose] >
00:00:42 #5848 [Verbose] > inl billiard_states_finite n_method k dt =
00:00:42 #5849 [Verbose] > billiard_states n_method k dt
00:00:42 #5850 [Verbose] > >> Some
00:00:42 #5851 [Verbose] > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:00:42 #5852 [Verbose] > match mpst |> stream.try_item 0i32 with
00:00:42 #5853 [Verbose] > | Some st =>
00:00:42 #5854 [Verbose] > st.time <= 10
00:00:42 #5855 [Verbose] > | None => false
00:00:42 #5856 [Verbose] > )
00:00:42 #5857 [Verbose] >
00:00:42 #5858 [Verbose] > inl momentum (particle_state st) =
00:00:42 #5859 [Verbose] > inl m = st.mass
00:00:42 #5860 [Verbose] > inl v = st.velocity
00:00:42 #5861 [Verbose] > m *^ v
00:00:42 #5862 [Verbose] >
00:00:42 #5863 [Verbose] > inl system_p (multi_particle_state sts) =
00:00:42 #5864 [Verbose] > sts
00:00:42 #5865 [Verbose] > |> stream.map momentum
00:00:42 #5866 [Verbose] > |> stream.fold (^+^) (zero_vec ())
00:00:42 #5867 [Verbose] >
00:00:42 #5868 [Verbose] > inl time_ke_ec_x, time_ke_ec_y =
00:00:42 #5869 [Verbose] > billiard_states_finite euler_cromer_mps 30 0.03
00:00:42 #5870 [Verbose] > |> listm.map (fun (multi_particle_state mpst) =>
00:00:42 #5871 [Verbose] > mpst |> stream.try_item 0i32
00:00:42 #5872 [Verbose] > |> optionm.map (fun st =>
00:00:42 #5873 [Verbose] > st.time, system_ke (multi_particle_state mpst)
00:00:42 #5874 [Verbose] > )
00:00:42 #5875 [Verbose] > )
00:00:42 #5876 [Verbose] > // |> stream.to_list
00:00:42 #5877 [Verbose] > |> listm'.choose id
00:00:42 #5878 [Verbose] > |> listm'.unzip
00:00:42 #5879 [Verbose] >
00:00:42 #5880 [Verbose] > inl time_ke_rk4_x, time_ke_rk4_y =
00:00:42 #5881 [Verbose] > billiard_states_finite runge_kutta_4 30 0.03
00:00:42 #5882 [Verbose] > |> listm.map (fun (multi_particle_state mpst) =>
00:00:42 #5883 [Verbose] > mpst |> stream.try_item 0i32
00:00:42 #5884 [Verbose] > |> optionm.map (fun st =>
00:00:42 #5885 [Verbose] > st.time, system_ke (multi_particle_state mpst)
00:00:42 #5886 [Verbose] > )
00:00:42 #5887 [Verbose] > )
00:00:42 #5888 [Verbose] > // |> stream.to_list
00:00:42 #5889 [Verbose] > |> listm'.choose id
00:00:42 #5890 [Verbose] > |> listm'.unzip
00:00:42 #5891 [Verbose] >
00:00:42 #5892 [Verbose] > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:00:42 #5893 [Verbose] > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:00:42 #5894 [Verbose] >
00:00:42 #5895 [Verbose] > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:00:42 #5896 [Verbose] > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:00:42 #5897 [Verbose] >
00:00:42 #5898 [Verbose] > "system kinetic energy versus time",
00:00:42 #5899 [Verbose] > "time (s)",
00:00:42 #5900 [Verbose] > "system kinetic energy (j)",
00:00:42 #5901 [Verbose] > ;[[
00:00:42 #5902 [Verbose] > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:00:42 #5903 [Verbose] > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:00:42 #5904 [Verbose] > ]]
00:00:44 #5905 [Verbose] >
00:00:44 #5906 [Verbose] > ╭─[ 2.57s - return value ]─────────────────────────────────────────────────────╮
00:00:44 #5907 [Verbose] > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:00:44 #5908 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:44 #5909 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:44 #5910 [Verbose] > │ stroke="none"/> │
00:00:44 #5911 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:44 #5912 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:44 #5913 [Verbose] > │ fill="#FFFFFF"> │
00:00:44 #5914 [Verbose] > │ system kinetic energy versus time │
00:00:44 #5915 [Verbose] > │ </text> │
00:00:44 #5916 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:00:44 #5917 [Verbose] > │ y2="75"/> │
00:00:44 #5918 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:44 #5919 [Verbose] > │ y2="75"/> │
00:00:44 #5920 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:00:44 #5921 [Verbose] > │ y2="75"/> │
00:00:44 #5922 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:00:44 #5923 [Verbose] > │ y2="75"/> │
00:00:44 #5924 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1... │
00:00:44 #5925 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 #5926 [Verbose] >
00:00:44 #5927 [Verbose] > ╭─[ 2.59s - stdout ]───────────────────────────────────────────────────────────╮
00:00:44 #5928 [Verbose] > │ type UH0 = │
00:00:44 #5929 [Verbose] > │ | UH0_0 of float * float * float * float * float * float * float * float │
00:00:44 #5930 [Verbose] > │ * float * (unit -> UH0) │
00:00:44 #5931 [Verbose] > │ | UH0_1 │
00:00:44 #5932 [Verbose] > │ and UH1 = │
00:00:44 #5933 [Verbose] > │ | UH1_0 of float * float * float * float * float * float * float * float │
00:00:44 #5934 [Verbose] > │ * float * (unit -> UH1) │
00:00:44 #5935 [Verbose] > │ | UH1_1 │
00:00:44 #5936 [Verbose] > │ and [<Struct>] US0 = │
00:00:44 #5937 [Verbose] > │ | US0_0 of f0_0 : UH0 │
00:00:44 #5938 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH0) │
00:00:44 #5939 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:44 #5940 [Verbose] > │ and UH2 = │
00:00:44 #5941 [Verbose] > │ | UH2_0 of float * float * float * float * float * float * float * float │
00:00:44 #5942 [Verbose] > │ * float * float * float * float * float * float * float * float * float * │
00:00:44 #5943 [Verbose] > │ float * (unit -> UH2) │
00:00:44 #5944 [Verbose] > │ | UH2_1 │
00:00:44 #5945 [Verbose] > │ and UH3 = │
00:00:44 #5946 [Verbose] > │ | UH3_0 of int32 * float * float * float * float * float * float * float │
00:00:44 #5947 [Verbose] > │ * float * float * (unit -> UH3) │
00:00:44 #5948 [Verbose] > │ | UH3_1 │
00:00:44 #5949 [Verbose] > │ and [<Struct>] US1 = │
00:00:44 #5950 [Verbose] > │ | US1_0 │
00:00:44 #5951 [Verbose] > │ | US1_1 of f1_0 : (struct (float * float * float * float * float * float │
00:00:44 #5952 [Verbose] > │ * float * float * float) -> struct (float * float * float)) │
00:00:44 #5953 [Verbose] > │ and [<Struct>] US2 = │
00:00:44 #5954 [Verbose] > │ | US2_0 │
00:00:44 #5955 [Verbose] > │ | US2_1 of f1_0 : float * f1_1 : float * f1_2 : float * f1_3 : float * │
00:00:44 #5956 [Verbose] > │ f1_4 : float * f1_5 : float * f1_6 : float * f1_7 : float * f1_8 : float │
00:00:44 #5957 [Verbose] > │ and UH4 = │
00:00:44 #5958 [Verbose] > │ | UH4_0 of UH0 * UH4 │
00:00:44 #5959 [Verbose] > │ | UH4_1 │
00:00:44 #5960 [Verbose] > │ and UH5 = │
00:00:44 #5961 [Verbose] > │ | UH5_0 of int32 * UH5 │
00:00:44 #5962 [Verbose] > │ | UH5_1 │
00:00:44 #5963 [Verbose] > │ and [<Struct>] US3 = │
00:00:44 #5964 [Verbose] > │ | US3_0 │
00:00:44 #5965 [Verbose] > │ | US3_1 of f1_0 : float * f1_1 : float │
00:00:44 #5966 [Verbose] > │ and UH6 = │
00:00:44 #5967 [Verbose] > │ | UH6_0 of US3 * UH6 │
00:00:44 #5968 [Verbose] > │ | UH6_1 │
00:00:44 #5969 [Verbose] > │ and UH7 = │
00:00:44 #5970 [Verbose] > │ | UH7_0 of float * (unit -> UH7) │
00:00:44 #5971 [Verbose] > │ | UH7_1 │
00:00:44 #5972 [Verbose] > │ and UH8 = │
00:00:44 #5973 [Verbose] > │ | UH8_0 of float * float * UH8 │
00:00:44 #5974 [Verbose] > │ | UH8_1 │
00:00:44 #5975 [Verbose] > │ and UH9 = │
00:00:44 #5976 [Verbose] > │ | UH9_0 of float * UH9 │
00:00:44 #5977 [Verbose] > │ | UH9_1 │
00:00:44 #5978 [Verbose] > │ let rec closure3 (v0 : float, v1 : (unit -> UH0), v2 : (unit -> UH1)) () : │
00:00:44 #5979 [Verbose] > │ UH0 = │
00:00:44 #5980 [Verbose] > │ let v3 : UH1 = v2 () │
00:00:44 #5981 [Verbose] > │ let v4 : UH0 = v1 () │
00:00:44 #5982 [Verbose] > │ match v3 with │
00:00:44 #5983 [Verbose] > │ | UH1_0(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> (* StreamCons *) │
00:00:44 #5984 [Verbose] > │ match v4 with │
00:00:44 #5985 [Verbose] > │ | UH0_0(v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) -> (* │
00:00:44 #5986 [Verbose] > │ StreamCons *) │
00:00:44 #5987 [Verbose] > │ let v25 : float = v10 * v0 │
00:00:44 #5988 [Verbose] > │ let v26 : float = v20 + v25 │
00:00:44 #5989 [Verbose] > │ let v27 : float = v0 * v7 │
00:00:44 #5990 [Verbose] > │ let v28 : float = v0 * v8 │
00:00:44 #5991 [Verbose] > │ let v29 : float = v0 * v9 │
00:00:44 #5992 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:44 #5993 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:44 #5994 [Verbose] > │ let v32 : float = v19 + v29 │
00:00:44 #5995 [Verbose] > │ let v33 : float = v0 * v11 │
00:00:44 #5996 [Verbose] > │ let v34 : float = v0 * v12 │
00:00:44 #5997 [Verbose] > │ let v35 : float = v0 * v13 │
00:00:44 #5998 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:44 #5999 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:44 #6000 [Verbose] > │ let v38 : float = v23 + v35 │
00:00:44 #6001 [Verbose] > │ let v39 : (unit -> UH0) = closure3(v0, v24, v14) │
00:00:44 #6002 [Verbose] > │ UH0_0(v15, v16, v30, v31, v32, v26, v36, v37, v38, v39) │
00:00:44 #6003 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:44 #6004 [Verbose] > │ UH0_1 │
00:00:44 #6005 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:44 #6006 [Verbose] > │ UH0_1 │
00:00:44 #6007 [Verbose] > │ and closure4 (v0 : UH0) () : UH0 = │
00:00:44 #6008 [Verbose] > │ v0 │
00:00:44 #6009 [Verbose] > │ and closure5 (v0 : UH0, v1 : Mut0) () : UH0 = │
00:00:44 #6010 [Verbose] > │ let v2 : US0 = v1.l0 │
00:00:44 #6011 [Verbose] > │ match v2 with │
00:00:44 #6012 [Verbose] > │ | US0_0(v3) -> (* Computed *) │
00:00:44 #6013 [Verbose] > │ v3 │
00:00:44 #6014 [Verbose] > │ | US0_1(v4) -> (* NotComputed *) │
00:00:44 #6015 [Verbose] > │ let v5 : UH0 = v4 () │
00:00:44 #6016 [Verbose] > │ let v20 : UH0 = │
00:00:44 #6017 [Verbose] > │ match v5 with │
00:00:44 #6018 [Verbose] > │ | UH0_0(v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> (* │
00:00:44 #6019 [Verbose] > │ StreamCons *) │
00:00:44 #6020 [Verbose] > │ let v17 : (unit -> UH0) = method1(v0, v16) │
00:00:44 #6021 [Verbose] > │ UH0_0(v7, v8, v9, v10, v11, v12, v13, v14, v15, v17) │
00:00:44 #6022 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:44 #6023 [Verbose] > │ UH0_1 │
00:00:44 #6024 [Verbose] > │ let v21 : US0 = US0_0(v20) │
00:00:44 #6025 [Verbose] > │ v1.l0 <- v21 │
00:00:44 #6026 [Verbose] > │ v20 │
00:00:44 #6027 [Verbose] > │ and method1 (v0 : UH0, v1 : (unit -> UH0)) : (unit -> UH0) = │
00:00:44 #6028 [Verbose] > │ let v2 : US0 = US0_1(v1) │
00:00:44 #6029 [Verbose] > │ let v3 : Mut0 = {l0 = v2} : Mut0 │
00:00:44 #6030 [Verbose] > │ closure5(v0, v3) │
00:00:44 #6031 [Verbose] > │ and closure6 (v0 : (unit -> UH0), v1 : (unit -> UH0)) () : UH2 = │
00:00:44 #6032 [Verbose] > │ let v2 : UH0 = v1 () │
00:00:44 #6033 [Verbose] > │ let v3 : UH0 = v0 () │
00:00:44 #6034 [Verbose] > │ match v2 with │
00:00:44 #6035 [Verbose] > │ | UH0_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:44 #6036 [Verbose] > │ match v3 with │
00:00:44 #6037 [Verbose] > │ | UH0_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:44 #6038 [Verbose] > │ StreamCons *) │
00:00:44 #6039 [Verbose] > │ let v24 : (unit -> UH2) = closure6(v23, v13) │
00:00:44 #6040 [Verbose] > │ UH2_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v14, v15, v16, v17, │
00:00:44 #6041 [Verbose] > │ v18, v19, v20, v21, v22, v24) │
00:00:44 #6042 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:44 #6043 [Verbose] > │ UH2_1 │
00:00:44 #6044 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:44 #6045 [Verbose] > │ UH2_1 │
00:00:44 #6046 [Verbose] > │ and closure7 (v0 : UH0) () : UH0 = │
00:00:44 #6047 [Verbose] > │ v0 │
00:00:44 #6048 [Verbose] > │ and method2 (v0 : float, v1 : UH2, v2 : UH0) : UH0 = │
00:00:44 #6049 [Verbose] > │ match v1 with │
00:00:44 #6050 [Verbose] > │ | UH2_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, │
00:00:44 #6051 [Verbose] > │ v17, v18, v19, v20, v21) -> (* StreamCons *) │
00:00:44 #6052 [Verbose] > │ let v22 : UH2 = v21 () │
00:00:44 #6053 [Verbose] > │ let v23 : UH0 = method2(v0, v22, v2) │
00:00:44 #6054 [Verbose] > │ let v24 : float = v0 * v18 │
00:00:44 #6055 [Verbose] > │ let v25 : float = v0 * v19 │
00:00:44 #6056 [Verbose] > │ let v26 : float = v0 * v20 │
00:00:44 #6057 [Verbose] > │ let v27 : float = v5 + v24 │
00:00:44 #6058 [Verbose] > │ let v28 : float = v6 + v25 │
00:00:44 #6059 [Verbose] > │ let v29 : float = v7 + v26 │
00:00:44 #6060 [Verbose] > │ let v30 : (unit -> UH0) = closure7(v23) │
00:00:44 #6061 [Verbose] > │ UH0_0(v12, v13, v27, v28, v29, v17, v18, v19, v20, v30) │
00:00:44 #6062 [Verbose] > │ | UH2_1 -> (* StreamNil *) │
00:00:44 #6063 [Verbose] > │ v2 │
00:00:44 #6064 [Verbose] > │ and closure2 (v0 : float, v1 : (UH0 -> UH1)) (v2 : UH0) : UH0 = │
00:00:44 #6065 [Verbose] > │ let v3 : UH1 = v1 v2 │
00:00:44 #6066 [Verbose] > │ let v45 : UH0 = │
00:00:44 #6067 [Verbose] > │ match v3 with │
00:00:44 #6068 [Verbose] > │ | UH1_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons │
00:00:44 #6069 [Verbose] > │ *) │
00:00:44 #6070 [Verbose] > │ match v2 with │
00:00:44 #6071 [Verbose] > │ | UH0_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:44 #6072 [Verbose] > │ StreamCons *) │
00:00:44 #6073 [Verbose] > │ let v24 : float = v9 * v0 │
00:00:44 #6074 [Verbose] > │ let v25 : float = v19 + v24 │
00:00:44 #6075 [Verbose] > │ let v26 : float = v0 * v6 │
00:00:44 #6076 [Verbose] > │ let v27 : float = v0 * v7 │
00:00:44 #6077 [Verbose] > │ let v28 : float = v0 * v8 │
00:00:44 #6078 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:44 #6079 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:44 #6080 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:44 #6081 [Verbose] > │ let v32 : float = v0 * v10 │
00:00:44 #6082 [Verbose] > │ let v33 : float = v0 * v11 │
00:00:45 #6083 [Verbose] > │ let v34 : float = v0 * v12 │
00:00:45 #6084 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:45 #6085 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:45 #6086 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:45 #6087 [Verbose] > │ let v38 : (unit -> UH0) = closure3(v0, v23, v13) │
00:00:45 #6088 [Verbose] > │ UH0_0(v14, v15, v29, v30, v31, v25, v35, v36, v37, v38) │
00:00:45 #6089 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6090 [Verbose] > │ UH0_1 │
00:00:45 #6091 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6092 [Verbose] > │ UH0_1 │
00:00:45 #6093 [Verbose] > │ let v46 : (unit -> UH0) = closure4(v45) │
00:00:45 #6094 [Verbose] > │ let v47 : (unit -> UH0) = method1(v45, v46) │
00:00:45 #6095 [Verbose] > │ let v48 : UH0 = v47 () │
00:00:45 #6096 [Verbose] > │ let v76 : UH2 = │
00:00:45 #6097 [Verbose] > │ match v2 with │
00:00:45 #6098 [Verbose] > │ | UH0_0(v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) -> (* │
00:00:45 #6099 [Verbose] > │ StreamCons *) │
00:00:45 #6100 [Verbose] > │ match v48 with │
00:00:45 #6101 [Verbose] > │ | UH0_0(v59, v60, v61, v62, v63, v64, v65, v66, v67, v68) -> (* │
00:00:45 #6102 [Verbose] > │ StreamCons *) │
00:00:45 #6103 [Verbose] > │ let v69 : (unit -> UH2) = closure6(v68, v58) │
00:00:45 #6104 [Verbose] > │ UH2_0(v49, v50, v51, v52, v53, v54, v55, v56, v57, v59, v60, │
00:00:45 #6105 [Verbose] > │ v61, v62, v63, v64, v65, v66, v67, v69) │
00:00:45 #6106 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6107 [Verbose] > │ UH2_1 │
00:00:45 #6108 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6109 [Verbose] > │ UH2_1 │
00:00:45 #6110 [Verbose] > │ let v77 : UH0 = UH0_1 │
00:00:45 #6111 [Verbose] > │ let v78 : UH0 = method2(v0, v76, v77) │
00:00:45 #6112 [Verbose] > │ v78 │
00:00:45 #6113 [Verbose] > │ and closure1 (v0 : float) (v1 : (UH0 -> UH1)) : (UH0 -> UH0) = │
00:00:45 #6114 [Verbose] > │ closure2(v0, v1) │
00:00:45 #6115 [Verbose] > │ and closure0 () (v0 : float) : ((UH0 -> UH1) -> (UH0 -> UH0)) = │
00:00:45 #6116 [Verbose] > │ closure1(v0) │
00:00:45 #6117 [Verbose] > │ and closure9 (v0 : UH3) () : UH3 = │
00:00:45 #6118 [Verbose] > │ v0 │
00:00:45 #6119 [Verbose] > │ and method3 (v0 : UH0, v1 : UH3, v2 : int32) : struct (UH3 * int32) = │
00:00:45 #6120 [Verbose] > │ match v0 with │
00:00:45 #6121 [Verbose] > │ | UH0_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* StreamCons *) │
00:00:45 #6122 [Verbose] > │ let v13 : int32 = v2 + 1 │
00:00:45 #6123 [Verbose] > │ let v14 : UH0 = v12 () │
00:00:45 #6124 [Verbose] > │ let v15 : (unit -> UH3) = closure9(v1) │
00:00:45 #6125 [Verbose] > │ let v16 : UH3 = UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v15) │
00:00:45 #6126 [Verbose] > │ method3(v14, v16, v13) │
00:00:45 #6127 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6128 [Verbose] > │ struct (v1, v2) │
00:00:45 #6129 [Verbose] > │ and closure10 (v0 : UH3) () : UH3 = │
00:00:45 #6130 [Verbose] > │ v0 │
00:00:45 #6131 [Verbose] > │ and method4 (v0 : UH3, v1 : UH3) : UH3 = │
00:00:45 #6132 [Verbose] > │ match v0 with │
00:00:45 #6133 [Verbose] > │ | UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* StreamCons │
00:00:45 #6134 [Verbose] > │ *) │
00:00:45 #6135 [Verbose] > │ let v13 : UH3 = v12 () │
00:00:45 #6136 [Verbose] > │ let v14 : (unit -> UH3) = closure10(v1) │
00:00:45 #6137 [Verbose] > │ let v15 : UH3 = UH3_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v14) │
00:00:45 #6138 [Verbose] > │ method4(v13, v15) │
00:00:45 #6139 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:45 #6140 [Verbose] > │ v1 │
00:00:45 #6141 [Verbose] > │ and method6 (v0 : int32, v1 : UH0) : US2 = │
00:00:45 #6142 [Verbose] > │ match v1 with │
00:00:45 #6143 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* StreamCons *) │
00:00:45 #6144 [Verbose] > │ let v12 : bool = v0 <= 0 │
00:00:45 #6145 [Verbose] > │ if v12 then │
00:00:45 #6146 [Verbose] > │ US2_1(v2, v3, v4, v5, v6, v7, v8, v9, v10) │
00:00:45 #6147 [Verbose] > │ else │
00:00:45 #6148 [Verbose] > │ let v14 : int32 = v0 - 1 │
00:00:45 #6149 [Verbose] > │ let v15 : UH0 = v11 () │
00:00:45 #6150 [Verbose] > │ method6(v14, v15) │
00:00:45 #6151 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6152 [Verbose] > │ US2_0 │
00:00:45 #6153 [Verbose] > │ and closure11 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, │
00:00:45 #6154 [Verbose] > │ v5 : float, v6 : float, v7 : float, v8 : float) struct (v9 : float, v10 : │
00:00:45 #6155 [Verbose] > │ float, v11 : float, v12 : float, v13 : float, v14 : float, v15 : float, v16 │
00:00:45 #6156 [Verbose] > │ : float, v17 : float) : struct (float * float * float) = │
00:00:45 #6157 [Verbose] > │ let v18 : float = -1.0 * v2 │
00:00:45 #6158 [Verbose] > │ let v19 : float = -1.0 * v3 │
00:00:45 #6159 [Verbose] > │ let v20 : float = -1.0 * v4 │
00:00:45 #6160 [Verbose] > │ let v21 : float = v11 + v18 │
00:00:45 #6161 [Verbose] > │ let v22 : float = v12 + v19 │
00:00:45 #6162 [Verbose] > │ let v23 : float = v13 + v20 │
00:00:45 #6163 [Verbose] > │ let v24 : float = v21 * v21 │
00:00:45 #6164 [Verbose] > │ let v25 : float = v22 * v22 │
00:00:45 #6165 [Verbose] > │ let v26 : float = v24 + v25 │
00:00:45 #6166 [Verbose] > │ let v27 : float = v23 * v23 │
00:00:45 #6167 [Verbose] > │ let v28 : float = v26 + v27 │
00:00:45 #6168 [Verbose] > │ let v29 : float = sqrt v28 │
00:00:45 #6169 [Verbose] > │ let v30 : bool = v29 >= 0.06 │
00:00:45 #6170 [Verbose] > │ let v33 : float = │
00:00:45 #6171 [Verbose] > │ if v30 then │
00:00:45 #6172 [Verbose] > │ 0.0 │
00:00:45 #6173 [Verbose] > │ else │
00:00:45 #6174 [Verbose] > │ let v31 : float = v29 - 0.06 │
00:00:45 #6175 [Verbose] > │ let v32 : float = -30.0 * v31 │
00:00:45 #6176 [Verbose] > │ v32 │
00:00:45 #6177 [Verbose] > │ let v34 : float = v33 * v21 │
00:00:45 #6178 [Verbose] > │ let v35 : float = v33 * v22 │
00:00:45 #6179 [Verbose] > │ let v36 : float = v33 * v23 │
00:00:45 #6180 [Verbose] > │ let v37 : float = v34 / v29 │
00:00:45 #6181 [Verbose] > │ let v38 : float = v35 / v29 │
00:00:45 #6182 [Verbose] > │ let v39 : float = v36 / v29 │
00:00:45 #6183 [Verbose] > │ struct (v37, v38, v39) │
00:00:45 #6184 [Verbose] > │ and closure12 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:45 #6185 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:45 #6186 [Verbose] > │ float * float) = │
00:00:45 #6187 [Verbose] > │ struct (0.0, 0.0, 0.0) │
00:00:45 #6188 [Verbose] > │ and closure13 (v0 : UH1) () : UH1 = │
00:00:45 #6189 [Verbose] > │ v0 │
00:00:45 #6190 [Verbose] > │ and method5 (v0 : UH0, v1 : UH3, v2 : UH1) : UH1 = │
00:00:45 #6191 [Verbose] > │ match v1 with │
00:00:45 #6192 [Verbose] > │ | UH3_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons │
00:00:45 #6193 [Verbose] > │ *) │
00:00:45 #6194 [Verbose] > │ let v14 : UH3 = v13 () │
00:00:45 #6195 [Verbose] > │ let v15 : UH1 = method5(v0, v14, v2) │
00:00:45 #6196 [Verbose] > │ let v16 : bool = v3 = 0 │
00:00:45 #6197 [Verbose] > │ let v52 : US1 = │
00:00:45 #6198 [Verbose] > │ if v16 then │
00:00:45 #6199 [Verbose] > │ let v17 : int32 = 1 │
00:00:45 #6200 [Verbose] > │ let v18 : US2 = method6(v17, v0) │
00:00:45 #6201 [Verbose] > │ match v18 with │
00:00:45 #6202 [Verbose] > │ | US2_0 -> (* None *) │
00:00:45 #6203 [Verbose] > │ US1_0 │
00:00:45 #6204 [Verbose] > │ | US2_1(v19, v20, v21, v22, v23, v24, v25, v26, v27) -> (* │
00:00:45 #6205 [Verbose] > │ Some *) │
00:00:45 #6206 [Verbose] > │ let v28 : (struct (float * float * float * float * float │
00:00:45 #6207 [Verbose] > │ * float * float * float * float) -> struct (float * float * float)) = │
00:00:45 #6208 [Verbose] > │ closure11(v19, v20, v21, v22, v23, v24, v25, v26, v27) │
00:00:45 #6209 [Verbose] > │ US1_1(v28) │
00:00:45 #6210 [Verbose] > │ else │
00:00:45 #6211 [Verbose] > │ let v33 : bool = v3 = 1 │
00:00:45 #6212 [Verbose] > │ if v33 then │
00:00:45 #6213 [Verbose] > │ let v34 : int32 = 0 │
00:00:45 #6214 [Verbose] > │ let v35 : US2 = method6(v34, v0) │
00:00:45 #6215 [Verbose] > │ match v35 with │
00:00:45 #6216 [Verbose] > │ | US2_0 -> (* None *) │
00:00:45 #6217 [Verbose] > │ US1_0 │
00:00:45 #6218 [Verbose] > │ | US2_1(v36, v37, v38, v39, v40, v41, v42, v43, v44) -> │
00:00:45 #6219 [Verbose] > │ (* Some *) │
00:00:45 #6220 [Verbose] > │ let v45 : (struct (float * float * float * float * │
00:00:45 #6221 [Verbose] > │ float * float * float * float * float) -> struct (float * float * float)) = │
00:00:45 #6222 [Verbose] > │ closure11(v36, v37, v38, v39, v40, v41, v42, v43, v44) │
00:00:45 #6223 [Verbose] > │ US1_1(v45) │
00:00:45 #6224 [Verbose] > │ else │
00:00:45 #6225 [Verbose] > │ US1_0 │
00:00:45 #6226 [Verbose] > │ let v56 : (struct (float * float * float * float * float * float * │
00:00:45 #6227 [Verbose] > │ float * float * float) -> struct (float * float * float)) = │
00:00:45 #6228 [Verbose] > │ match v52 with │
00:00:45 #6229 [Verbose] > │ | US1_0 -> (* None *) │
00:00:45 #6230 [Verbose] > │ closure12() │
00:00:45 #6231 [Verbose] > │ | US1_1(v53) -> (* Some *) │
00:00:45 #6232 [Verbose] > │ v53 │
00:00:45 #6233 [Verbose] > │ let struct (v57 : float, v58 : float, v59 : float) = v56 struct (v4, │
00:00:45 #6234 [Verbose] > │ v5, v6, v7, v8, v9, v10, v11, v12) │
00:00:45 #6235 [Verbose] > │ let v60 : float = v57 / v5 │
00:00:45 #6236 [Verbose] > │ let v61 : float = v58 / v5 │
00:00:45 #6237 [Verbose] > │ let v62 : float = v59 / v5 │
00:00:45 #6238 [Verbose] > │ let v63 : (unit -> UH1) = closure13(v15) │
00:00:45 #6239 [Verbose] > │ UH1_0(0.0, 0.0, v10, v11, v12, 1.0, v60, v61, v62, v63) │
00:00:45 #6240 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:45 #6241 [Verbose] > │ v2 │
00:00:45 #6242 [Verbose] > │ and closure8 () (v0 : UH0) : UH1 = │
00:00:45 #6243 [Verbose] > │ let v1 : UH3 = UH3_1 │
00:00:45 #6244 [Verbose] > │ let v2 : int32 = 0 │
00:00:45 #6245 [Verbose] > │ let struct (v3 : UH3, v4 : int32) = method3(v0, v1, v2) │
00:00:45 #6246 [Verbose] > │ let v5 : UH3 = UH3_1 │
00:00:45 #6247 [Verbose] > │ let v6 : UH3 = method4(v3, v5) │
00:00:45 #6248 [Verbose] > │ let v7 : UH1 = UH1_1 │
00:00:45 #6249 [Verbose] > │ let v8 : UH1 = method5(v0, v6, v7) │
00:00:45 #6250 [Verbose] > │ v8 │
00:00:45 #6251 [Verbose] > │ and method8 (v0 : int32, v1 : int32) : UH5 = │
00:00:45 #6252 [Verbose] > │ let v2 : bool = v1 < v0 │
00:00:45 #6253 [Verbose] > │ if v2 then │
00:00:45 #6254 [Verbose] > │ let v3 : int32 = v1 + 1 │
00:00:45 #6255 [Verbose] > │ let v4 : UH5 = method8(v0, v3) │
00:00:45 #6256 [Verbose] > │ UH5_0(v1, v4) │
00:00:45 #6257 [Verbose] > │ else │
00:00:45 #6258 [Verbose] > │ UH5_1 │
00:00:45 #6259 [Verbose] > │ and closure15 () () : UH0 = │
00:00:45 #6260 [Verbose] > │ UH0_1 │
00:00:45 #6261 [Verbose] > │ and closure14 () () : UH0 = │
00:00:45 #6262 [Verbose] > │ let v0 : (unit -> UH0) = closure15() │
00:00:45 #6263 [Verbose] > │ UH0_0(0.0, 0.16, 1.0, 0.02, 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:45 #6264 [Verbose] > │ and method9 (v0 : (UH0 -> UH0), v1 : UH5, v2 : UH0) : UH0 = │
00:00:45 #6265 [Verbose] > │ match v1 with │
00:00:45 #6266 [Verbose] > │ | UH5_0(v3, v4) -> (* Cons *) │
00:00:45 #6267 [Verbose] > │ let v5 : (unit -> UH0) = closure4(v2) │
00:00:45 #6268 [Verbose] > │ let v6 : (unit -> UH0) = method1(v2, v5) │
00:00:45 #6269 [Verbose] > │ let v7 : UH0 = v6 () │
00:00:45 #6270 [Verbose] > │ let v8 : UH0 = v0 v7 │
00:00:45 #6271 [Verbose] > │ method9(v0, v4, v8) │
00:00:45 #6272 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:00:45 #6273 [Verbose] > │ v2 │
00:00:45 #6274 [Verbose] > │ and method10 (v0 : UH4, v1 : UH4) : UH4 = │
00:00:45 #6275 [Verbose] > │ match v0 with │
00:00:45 #6276 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:45 #6277 [Verbose] > │ let v4 : UH4 = UH4_0(v2, v1) │
00:00:45 #6278 [Verbose] > │ method10(v3, v4) │
00:00:45 #6279 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:45 #6280 [Verbose] > │ v1 │
00:00:45 #6281 [Verbose] > │ and method7 (v0 : (UH0 -> UH0), v1 : UH4, v2 : int32) : UH4 = │
00:00:45 #6282 [Verbose] > │ let v3 : int32 = 0 │
00:00:45 #6283 [Verbose] > │ let v4 : UH5 = method8(v2, v3) │
00:00:45 #6284 [Verbose] > │ let v5 : float = 0.0 │
00:00:45 #6285 [Verbose] > │ let v6 : float = 0.16 │
00:00:45 #6286 [Verbose] > │ let v7 : float = 0.0 │
00:00:45 #6287 [Verbose] > │ let v8 : float = 0.0 │
00:00:45 #6288 [Verbose] > │ let v9 : float = 0.0 │
00:00:45 #6289 [Verbose] > │ let v10 : float = 0.0 │
00:00:45 #6290 [Verbose] > │ let v11 : float = 0.2 │
00:00:45 #6291 [Verbose] > │ let v12 : float = 0.0 │
00:00:45 #6292 [Verbose] > │ let v13 : float = 0.0 │
00:00:45 #6293 [Verbose] > │ let v14 : (unit -> UH0) = closure14() │
00:00:45 #6294 [Verbose] > │ let v15 : UH0 = UH0_0(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) │
00:00:45 #6295 [Verbose] > │ let v16 : UH0 = method9(v0, v4, v15) │
00:00:45 #6296 [Verbose] > │ let v17 : int32 = 0 │
00:00:45 #6297 [Verbose] > │ let v18 : US2 = method6(v17, v16) │
00:00:45 #6298 [Verbose] > │ let v30 : bool = │
00:00:45 #6299 [Verbose] > │ match v18 with │
00:00:45 #6300 [Verbose] > │ | US2_0 -> (* None *) │
00:00:45 #6301 [Verbose] > │ false │
00:00:45 #6302 [Verbose] > │ | US2_1(v19, v20, v21, v22, v23, v24, v25, v26, v27) -> (* Some *) │
00:00:45 #6303 [Verbose] > │ let v28 : bool = v24 <= 10.0 │
00:00:45 #6304 [Verbose] > │ v28 │
00:00:45 #6305 [Verbose] > │ if v30 then │
00:00:45 #6306 [Verbose] > │ let v31 : UH4 = UH4_0(v16, v1) │
00:00:45 #6307 [Verbose] > │ let v32 : int32 = v2 + 1 │
00:00:45 #6308 [Verbose] > │ method7(v0, v31, v32) │
00:00:45 #6309 [Verbose] > │ else │
00:00:45 #6310 [Verbose] > │ let v34 : UH4 = UH4_1 │
00:00:45 #6311 [Verbose] > │ method10(v1, v34) │
00:00:45 #6312 [Verbose] > │ and closure16 (v0 : UH7) () : UH7 = │
00:00:45 #6313 [Verbose] > │ v0 │
00:00:45 #6314 [Verbose] > │ and method12 (v0 : UH0, v1 : UH7) : UH7 = │
00:00:45 #6315 [Verbose] > │ match v0 with │
00:00:45 #6316 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* StreamCons *) │
00:00:45 #6317 [Verbose] > │ let v12 : UH0 = v11 () │
00:00:45 #6318 [Verbose] > │ let v13 : UH7 = method12(v12, v1) │
00:00:45 #6319 [Verbose] > │ let v14 : float = v8 * v8 │
00:00:45 #6320 [Verbose] > │ let v15 : float = v9 * v9 │
00:00:45 #6321 [Verbose] > │ let v16 : float = v14 + v15 │
00:00:45 #6322 [Verbose] > │ let v17 : float = v10 * v10 │
00:00:45 #6323 [Verbose] > │ let v18 : float = v16 + v17 │
00:00:45 #6324 [Verbose] > │ let v19 : float = sqrt v18 │
00:00:45 #6325 [Verbose] > │ let v20 : float = 0.5 * v3 │
00:00:45 #6326 [Verbose] > │ let v21 : float = v19 ** 2.0 │
00:00:45 #6327 [Verbose] > │ let v22 : float = v20 * v21 │
00:00:45 #6328 [Verbose] > │ let v23 : (unit -> UH7) = closure16(v13) │
00:00:45 #6329 [Verbose] > │ UH7_0(v22, v23) │
00:00:45 #6330 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6331 [Verbose] > │ v1 │
00:00:45 #6332 [Verbose] > │ and method13 (v0 : UH7, v1 : float) : float = │
00:00:45 #6333 [Verbose] > │ match v0 with │
00:00:45 #6334 [Verbose] > │ | UH7_0(v2, v3) -> (* StreamCons *) │
00:00:45 #6335 [Verbose] > │ let v4 : float = v1 + v2 │
00:00:45 #6336 [Verbose] > │ let v5 : UH7 = v3 () │
00:00:45 #6337 [Verbose] > │ method13(v5, v4) │
00:00:45 #6338 [Verbose] > │ | UH7_1 -> (* StreamNil *) │
00:00:45 #6339 [Verbose] > │ v1 │
00:00:45 #6340 [Verbose] > │ and method11 (v0 : UH4, v1 : UH6) : UH6 = │
00:00:45 #6341 [Verbose] > │ match v0 with │
00:00:45 #6342 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:45 #6343 [Verbose] > │ let v4 : UH6 = method11(v3, v1) │
00:00:45 #6344 [Verbose] > │ let v5 : int32 = 0 │
00:00:45 #6345 [Verbose] > │ let v6 : US2 = method6(v5, v2) │
00:00:45 #6346 [Verbose] > │ let v23 : US3 = │
00:00:45 #6347 [Verbose] > │ match v6 with │
00:00:45 #6348 [Verbose] > │ | US2_0 -> (* None *) │
00:00:45 #6349 [Verbose] > │ US3_0 │
00:00:45 #6350 [Verbose] > │ | US2_1(v7, v8, v9, v10, v11, v12, v13, v14, v15) -> (* Some *) │
00:00:45 #6351 [Verbose] > │ let v16 : UH7 = UH7_1 │
00:00:45 #6352 [Verbose] > │ let v17 : UH7 = method12(v2, v16) │
00:00:45 #6353 [Verbose] > │ let v18 : float = 0.0 │
00:00:45 #6354 [Verbose] > │ let v19 : float = method13(v17, v18) │
00:00:45 #6355 [Verbose] > │ US3_1(v12, v19) │
00:00:45 #6356 [Verbose] > │ UH6_0(v23, v4) │
00:00:45 #6357 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:45 #6358 [Verbose] > │ v1 │
00:00:45 #6359 [Verbose] > │ and method14 (v0 : UH6, v1 : UH8) : UH8 = │
00:00:45 #6360 [Verbose] > │ match v0 with │
00:00:45 #6361 [Verbose] > │ | UH6_0(v2, v3) -> (* Cons *) │
00:00:45 #6362 [Verbose] > │ let v4 : UH8 = method14(v3, v1) │
00:00:45 #6363 [Verbose] > │ match v2 with │
00:00:45 #6364 [Verbose] > │ | US3_0 -> (* None *) │
00:00:45 #6365 [Verbose] > │ v4 │
00:00:45 #6366 [Verbose] > │ | US3_1(v5, v6) -> (* Some *) │
00:00:45 #6367 [Verbose] > │ UH8_0(v5, v6, v4) │
00:00:45 #6368 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:45 #6369 [Verbose] > │ v1 │
00:00:45 #6370 [Verbose] > │ and method15 (v0 : UH8, v1 : UH9, v2 : UH9) : struct (UH9 * UH9) = │
00:00:45 #6371 [Verbose] > │ match v0 with │
00:00:45 #6372 [Verbose] > │ | UH8_0(v3, v4, v5) -> (* Cons *) │
00:00:45 #6373 [Verbose] > │ let v6 : UH9 = UH9_0(v3, v1) │
00:00:45 #6374 [Verbose] > │ let v7 : UH9 = UH9_0(v4, v2) │
00:00:45 #6375 [Verbose] > │ method15(v5, v6, v7) │
00:00:45 #6376 [Verbose] > │ | UH8_1 -> (* Nil *) │
00:00:45 #6377 [Verbose] > │ struct (v1, v2) │
00:00:45 #6378 [Verbose] > │ and method16 (v0 : UH9, v1 : UH9) : UH9 = │
00:00:45 #6379 [Verbose] > │ match v0 with │
00:00:45 #6380 [Verbose] > │ | UH9_0(v2, v3) -> (* Cons *) │
00:00:45 #6381 [Verbose] > │ let v4 : UH9 = UH9_0(v2, v1) │
00:00:45 #6382 [Verbose] > │ method16(v3, v4) │
00:00:45 #6383 [Verbose] > │ | UH9_1 -> (* Nil *) │
00:00:45 #6384 [Verbose] > │ v1 │
00:00:45 #6385 [Verbose] > │ and closure20 (v0 : (unit -> UH1), v1 : (unit -> UH1)) () : UH1 = │
00:00:45 #6386 [Verbose] > │ let v2 : UH1 = v1 () │
00:00:45 #6387 [Verbose] > │ let v3 : UH1 = v0 () │
00:00:45 #6388 [Verbose] > │ match v2 with │
00:00:45 #6389 [Verbose] > │ | UH1_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:45 #6390 [Verbose] > │ match v3 with │
00:00:45 #6391 [Verbose] > │ | UH1_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:45 #6392 [Verbose] > │ StreamCons *) │
00:00:45 #6393 [Verbose] > │ let v24 : float = v4 + v14 │
00:00:45 #6394 [Verbose] > │ let v25 : float = v5 + v15 │
00:00:45 #6395 [Verbose] > │ let v26 : float = v9 + v19 │
00:00:45 #6396 [Verbose] > │ let v27 : float = v6 + v16 │
00:00:45 #6397 [Verbose] > │ let v28 : float = v7 + v17 │
00:00:45 #6398 [Verbose] > │ let v29 : float = v8 + v18 │
00:00:45 #6399 [Verbose] > │ let v30 : float = v10 + v20 │
00:00:45 #6400 [Verbose] > │ let v31 : float = v11 + v21 │
00:00:45 #6401 [Verbose] > │ let v32 : float = v12 + v22 │
00:00:45 #6402 [Verbose] > │ let v33 : (unit -> UH1) = closure20(v23, v13) │
00:00:45 #6403 [Verbose] > │ UH1_0(v24, v25, v27, v28, v29, v26, v30, v31, v32, v33) │
00:00:45 #6404 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6405 [Verbose] > │ UH1_1 │
00:00:45 #6406 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6407 [Verbose] > │ UH1_1 │
00:00:45 #6408 [Verbose] > │ and closure19 (v0 : float, v1 : (UH0 -> UH1)) (v2 : UH0) : UH0 = │
00:00:45 #6409 [Verbose] > │ let v3 : UH1 = v1 v2 │
00:00:45 #6410 [Verbose] > │ let v4 : float = v0 / 2.0 │
00:00:45 #6411 [Verbose] > │ let v46 : UH0 = │
00:00:45 #6412 [Verbose] > │ match v3 with │
00:00:45 #6413 [Verbose] > │ | UH1_0(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> (* │
00:00:45 #6414 [Verbose] > │ StreamCons *) │
00:00:45 #6415 [Verbose] > │ match v2 with │
00:00:45 #6416 [Verbose] > │ | UH0_0(v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) -> (* │
00:00:45 #6417 [Verbose] > │ StreamCons *) │
00:00:45 #6418 [Verbose] > │ let v25 : float = v10 * v4 │
00:00:45 #6419 [Verbose] > │ let v26 : float = v20 + v25 │
00:00:45 #6420 [Verbose] > │ let v27 : float = v4 * v7 │
00:00:45 #6421 [Verbose] > │ let v28 : float = v4 * v8 │
00:00:45 #6422 [Verbose] > │ let v29 : float = v4 * v9 │
00:00:45 #6423 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:45 #6424 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:45 #6425 [Verbose] > │ let v32 : float = v19 + v29 │
00:00:45 #6426 [Verbose] > │ let v33 : float = v4 * v11 │
00:00:45 #6427 [Verbose] > │ let v34 : float = v4 * v12 │
00:00:45 #6428 [Verbose] > │ let v35 : float = v4 * v13 │
00:00:45 #6429 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:45 #6430 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:45 #6431 [Verbose] > │ let v38 : float = v23 + v35 │
00:00:45 #6432 [Verbose] > │ let v39 : (unit -> UH0) = closure3(v4, v24, v14) │
00:00:45 #6433 [Verbose] > │ UH0_0(v15, v16, v30, v31, v32, v26, v36, v37, v38, v39) │
00:00:45 #6434 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6435 [Verbose] > │ UH0_1 │
00:00:45 #6436 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6437 [Verbose] > │ UH0_1 │
00:00:45 #6438 [Verbose] > │ let v47 : (unit -> UH0) = closure4(v46) │
00:00:45 #6439 [Verbose] > │ let v48 : (unit -> UH0) = method1(v46, v47) │
00:00:45 #6440 [Verbose] > │ let v49 : UH0 = v48 () │
00:00:45 #6441 [Verbose] > │ let v50 : UH1 = v1 v49 │
00:00:45 #6442 [Verbose] > │ let v92 : UH0 = │
00:00:45 #6443 [Verbose] > │ match v50 with │
00:00:45 #6444 [Verbose] > │ | UH1_0(v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) -> (* │
00:00:45 #6445 [Verbose] > │ StreamCons *) │
00:00:45 #6446 [Verbose] > │ match v2 with │
00:00:45 #6447 [Verbose] > │ | UH0_0(v61, v62, v63, v64, v65, v66, v67, v68, v69, v70) -> (* │
00:00:45 #6448 [Verbose] > │ StreamCons *) │
00:00:45 #6449 [Verbose] > │ let v71 : float = v56 * v4 │
00:00:45 #6450 [Verbose] > │ let v72 : float = v66 + v71 │
00:00:45 #6451 [Verbose] > │ let v73 : float = v4 * v53 │
00:00:45 #6452 [Verbose] > │ let v74 : float = v4 * v54 │
00:00:45 #6453 [Verbose] > │ let v75 : float = v4 * v55 │
00:00:45 #6454 [Verbose] > │ let v76 : float = v63 + v73 │
00:00:45 #6455 [Verbose] > │ let v77 : float = v64 + v74 │
00:00:45 #6456 [Verbose] > │ let v78 : float = v65 + v75 │
00:00:45 #6457 [Verbose] > │ let v79 : float = v4 * v57 │
00:00:45 #6458 [Verbose] > │ let v80 : float = v4 * v58 │
00:00:45 #6459 [Verbose] > │ let v81 : float = v4 * v59 │
00:00:45 #6460 [Verbose] > │ let v82 : float = v67 + v79 │
00:00:45 #6461 [Verbose] > │ let v83 : float = v68 + v80 │
00:00:45 #6462 [Verbose] > │ let v84 : float = v69 + v81 │
00:00:45 #6463 [Verbose] > │ let v85 : (unit -> UH0) = closure3(v4, v70, v60) │
00:00:45 #6464 [Verbose] > │ UH0_0(v61, v62, v76, v77, v78, v72, v82, v83, v84, v85) │
00:00:45 #6465 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6466 [Verbose] > │ UH0_1 │
00:00:45 #6467 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6468 [Verbose] > │ UH0_1 │
00:00:45 #6469 [Verbose] > │ let v93 : (unit -> UH0) = closure4(v92) │
00:00:45 #6470 [Verbose] > │ let v94 : (unit -> UH0) = method1(v92, v93) │
00:00:45 #6471 [Verbose] > │ let v95 : UH0 = v94 () │
00:00:45 #6472 [Verbose] > │ let v96 : UH1 = v1 v95 │
00:00:45 #6473 [Verbose] > │ let v138 : UH0 = │
00:00:45 #6474 [Verbose] > │ match v96 with │
00:00:45 #6475 [Verbose] > │ | UH1_0(v97, v98, v99, v100, v101, v102, v103, v104, v105, v106) -> │
00:00:45 #6476 [Verbose] > │ (* StreamCons *) │
00:00:45 #6477 [Verbose] > │ match v2 with │
00:00:45 #6478 [Verbose] > │ | UH0_0(v107, v108, v109, v110, v111, v112, v113, v114, v115, │
00:00:45 #6479 [Verbose] > │ v116) -> (* StreamCons *) │
00:00:45 #6480 [Verbose] > │ let v117 : float = v102 * v0 │
00:00:45 #6481 [Verbose] > │ let v118 : float = v112 + v117 │
00:00:45 #6482 [Verbose] > │ let v119 : float = v0 * v99 │
00:00:45 #6483 [Verbose] > │ let v120 : float = v0 * v100 │
00:00:45 #6484 [Verbose] > │ let v121 : float = v0 * v101 │
00:00:45 #6485 [Verbose] > │ let v122 : float = v109 + v119 │
00:00:45 #6486 [Verbose] > │ let v123 : float = v110 + v120 │
00:00:45 #6487 [Verbose] > │ let v124 : float = v111 + v121 │
00:00:45 #6488 [Verbose] > │ let v125 : float = v0 * v103 │
00:00:45 #6489 [Verbose] > │ let v126 : float = v0 * v104 │
00:00:45 #6490 [Verbose] > │ let v127 : float = v0 * v105 │
00:00:45 #6491 [Verbose] > │ let v128 : float = v113 + v125 │
00:00:45 #6492 [Verbose] > │ let v129 : float = v114 + v126 │
00:00:45 #6493 [Verbose] > │ let v130 : float = v115 + v127 │
00:00:45 #6494 [Verbose] > │ let v131 : (unit -> UH0) = closure3(v0, v116, v106) │
00:00:45 #6495 [Verbose] > │ UH0_0(v107, v108, v122, v123, v124, v118, v128, v129, v130, │
00:00:45 #6496 [Verbose] > │ v131) │
00:00:45 #6497 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6498 [Verbose] > │ UH0_1 │
00:00:45 #6499 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6500 [Verbose] > │ UH0_1 │
00:00:45 #6501 [Verbose] > │ let v139 : (unit -> UH0) = closure4(v138) │
00:00:45 #6502 [Verbose] > │ let v140 : (unit -> UH0) = method1(v138, v139) │
00:00:45 #6503 [Verbose] > │ let v141 : UH0 = v140 () │
00:00:45 #6504 [Verbose] > │ let v142 : UH1 = v1 v141 │
00:00:45 #6505 [Verbose] > │ let v143 : float = v0 / 6.0 │
00:00:45 #6506 [Verbose] > │ let v180 : UH1 = │
00:00:45 #6507 [Verbose] > │ match v3 with │
00:00:45 #6508 [Verbose] > │ | UH1_0(v144, v145, v146, v147, v148, v149, v150, v151, v152, v153) │
00:00:45 #6509 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6510 [Verbose] > │ match v50 with │
00:00:45 #6511 [Verbose] > │ | UH1_0(v154, v155, v156, v157, v158, v159, v160, v161, v162, │
00:00:45 #6512 [Verbose] > │ v163) -> (* StreamCons *) │
00:00:45 #6513 [Verbose] > │ let v164 : float = v144 + v154 │
00:00:45 #6514 [Verbose] > │ let v165 : float = v145 + v155 │
00:00:45 #6515 [Verbose] > │ let v166 : float = v149 + v159 │
00:00:45 #6516 [Verbose] > │ let v167 : float = v146 + v156 │
00:00:45 #6517 [Verbose] > │ let v168 : float = v147 + v157 │
00:00:45 #6518 [Verbose] > │ let v169 : float = v148 + v158 │
00:00:45 #6519 [Verbose] > │ let v170 : float = v150 + v160 │
00:00:45 #6520 [Verbose] > │ let v171 : float = v151 + v161 │
00:00:45 #6521 [Verbose] > │ let v172 : float = v152 + v162 │
00:00:45 #6522 [Verbose] > │ let v173 : (unit -> UH1) = closure20(v163, v153) │
00:00:45 #6523 [Verbose] > │ UH1_0(v164, v165, v167, v168, v169, v166, v170, v171, v172, │
00:00:45 #6524 [Verbose] > │ v173) │
00:00:45 #6525 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6526 [Verbose] > │ UH1_1 │
00:00:45 #6527 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6528 [Verbose] > │ UH1_1 │
00:00:45 #6529 [Verbose] > │ let v217 : UH1 = │
00:00:45 #6530 [Verbose] > │ match v180 with │
00:00:45 #6531 [Verbose] > │ | UH1_0(v181, v182, v183, v184, v185, v186, v187, v188, v189, v190) │
00:00:45 #6532 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6533 [Verbose] > │ match v50 with │
00:00:45 #6534 [Verbose] > │ | UH1_0(v191, v192, v193, v194, v195, v196, v197, v198, v199, │
00:00:45 #6535 [Verbose] > │ v200) -> (* StreamCons *) │
00:00:45 #6536 [Verbose] > │ let v201 : float = v181 + v191 │
00:00:45 #6537 [Verbose] > │ let v202 : float = v182 + v192 │
00:00:45 #6538 [Verbose] > │ let v203 : float = v186 + v196 │
00:00:45 #6539 [Verbose] > │ let v204 : float = v183 + v193 │
00:00:45 #6540 [Verbose] > │ let v205 : float = v184 + v194 │
00:00:45 #6541 [Verbose] > │ let v206 : float = v185 + v195 │
00:00:45 #6542 [Verbose] > │ let v207 : float = v187 + v197 │
00:00:45 #6543 [Verbose] > │ let v208 : float = v188 + v198 │
00:00:45 #6544 [Verbose] > │ let v209 : float = v189 + v199 │
00:00:45 #6545 [Verbose] > │ let v210 : (unit -> UH1) = closure20(v200, v190) │
00:00:45 #6546 [Verbose] > │ UH1_0(v201, v202, v204, v205, v206, v203, v207, v208, v209, │
00:00:45 #6547 [Verbose] > │ v210) │
00:00:45 #6548 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6549 [Verbose] > │ UH1_1 │
00:00:45 #6550 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6551 [Verbose] > │ UH1_1 │
00:00:45 #6552 [Verbose] > │ let v254 : UH1 = │
00:00:45 #6553 [Verbose] > │ match v217 with │
00:00:45 #6554 [Verbose] > │ | UH1_0(v218, v219, v220, v221, v222, v223, v224, v225, v226, v227) │
00:00:45 #6555 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6556 [Verbose] > │ match v96 with │
00:00:45 #6557 [Verbose] > │ | UH1_0(v228, v229, v230, v231, v232, v233, v234, v235, v236, │
00:00:45 #6558 [Verbose] > │ v237) -> (* StreamCons *) │
00:00:45 #6559 [Verbose] > │ let v238 : float = v218 + v228 │
00:00:45 #6560 [Verbose] > │ let v239 : float = v219 + v229 │
00:00:45 #6561 [Verbose] > │ let v240 : float = v223 + v233 │
00:00:45 #6562 [Verbose] > │ let v241 : float = v220 + v230 │
00:00:45 #6563 [Verbose] > │ let v242 : float = v221 + v231 │
00:00:45 #6564 [Verbose] > │ let v243 : float = v222 + v232 │
00:00:45 #6565 [Verbose] > │ let v244 : float = v224 + v234 │
00:00:45 #6566 [Verbose] > │ let v245 : float = v225 + v235 │
00:00:45 #6567 [Verbose] > │ let v246 : float = v226 + v236 │
00:00:45 #6568 [Verbose] > │ let v247 : (unit -> UH1) = closure20(v237, v227) │
00:00:45 #6569 [Verbose] > │ UH1_0(v238, v239, v241, v242, v243, v240, v244, v245, v246, │
00:00:45 #6570 [Verbose] > │ v247) │
00:00:45 #6571 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6572 [Verbose] > │ UH1_1 │
00:00:45 #6573 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6574 [Verbose] > │ UH1_1 │
00:00:45 #6575 [Verbose] > │ let v291 : UH1 = │
00:00:45 #6576 [Verbose] > │ match v254 with │
00:00:45 #6577 [Verbose] > │ | UH1_0(v255, v256, v257, v258, v259, v260, v261, v262, v263, v264) │
00:00:45 #6578 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6579 [Verbose] > │ match v96 with │
00:00:45 #6580 [Verbose] > │ | UH1_0(v265, v266, v267, v268, v269, v270, v271, v272, v273, │
00:00:45 #6581 [Verbose] > │ v274) -> (* StreamCons *) │
00:00:45 #6582 [Verbose] > │ let v275 : float = v255 + v265 │
00:00:45 #6583 [Verbose] > │ let v276 : float = v256 + v266 │
00:00:45 #6584 [Verbose] > │ let v277 : float = v260 + v270 │
00:00:45 #6585 [Verbose] > │ let v278 : float = v257 + v267 │
00:00:45 #6586 [Verbose] > │ let v279 : float = v258 + v268 │
00:00:45 #6587 [Verbose] > │ let v280 : float = v259 + v269 │
00:00:45 #6588 [Verbose] > │ let v281 : float = v261 + v271 │
00:00:45 #6589 [Verbose] > │ let v282 : float = v262 + v272 │
00:00:45 #6590 [Verbose] > │ let v283 : float = v263 + v273 │
00:00:45 #6591 [Verbose] > │ let v284 : (unit -> UH1) = closure20(v274, v264) │
00:00:45 #6592 [Verbose] > │ UH1_0(v275, v276, v278, v279, v280, v277, v281, v282, v283, │
00:00:45 #6593 [Verbose] > │ v284) │
00:00:45 #6594 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6595 [Verbose] > │ UH1_1 │
00:00:45 #6596 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6597 [Verbose] > │ UH1_1 │
00:00:45 #6598 [Verbose] > │ let v328 : UH1 = │
00:00:45 #6599 [Verbose] > │ match v291 with │
00:00:45 #6600 [Verbose] > │ | UH1_0(v292, v293, v294, v295, v296, v297, v298, v299, v300, v301) │
00:00:45 #6601 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6602 [Verbose] > │ match v142 with │
00:00:45 #6603 [Verbose] > │ | UH1_0(v302, v303, v304, v305, v306, v307, v308, v309, v310, │
00:00:45 #6604 [Verbose] > │ v311) -> (* StreamCons *) │
00:00:45 #6605 [Verbose] > │ let v312 : float = v292 + v302 │
00:00:45 #6606 [Verbose] > │ let v313 : float = v293 + v303 │
00:00:45 #6607 [Verbose] > │ let v314 : float = v297 + v307 │
00:00:45 #6608 [Verbose] > │ let v315 : float = v294 + v304 │
00:00:45 #6609 [Verbose] > │ let v316 : float = v295 + v305 │
00:00:45 #6610 [Verbose] > │ let v317 : float = v296 + v306 │
00:00:45 #6611 [Verbose] > │ let v318 : float = v298 + v308 │
00:00:45 #6612 [Verbose] > │ let v319 : float = v299 + v309 │
00:00:45 #6613 [Verbose] > │ let v320 : float = v300 + v310 │
00:00:45 #6614 [Verbose] > │ let v321 : (unit -> UH1) = closure20(v311, v301) │
00:00:45 #6615 [Verbose] > │ UH1_0(v312, v313, v315, v316, v317, v314, v318, v319, v320, │
00:00:45 #6616 [Verbose] > │ v321) │
00:00:45 #6617 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6618 [Verbose] > │ UH1_1 │
00:00:45 #6619 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6620 [Verbose] > │ UH1_1 │
00:00:45 #6621 [Verbose] > │ let v370 : UH0 = │
00:00:45 #6622 [Verbose] > │ match v328 with │
00:00:45 #6623 [Verbose] > │ | UH1_0(v329, v330, v331, v332, v333, v334, v335, v336, v337, v338) │
00:00:45 #6624 [Verbose] > │ -> (* StreamCons *) │
00:00:45 #6625 [Verbose] > │ match v2 with │
00:00:45 #6626 [Verbose] > │ | UH0_0(v339, v340, v341, v342, v343, v344, v345, v346, v347, │
00:00:45 #6627 [Verbose] > │ v348) -> (* StreamCons *) │
00:00:45 #6628 [Verbose] > │ let v349 : float = v334 * v143 │
00:00:45 #6629 [Verbose] > │ let v350 : float = v344 + v349 │
00:00:45 #6630 [Verbose] > │ let v351 : float = v143 * v331 │
00:00:45 #6631 [Verbose] > │ let v352 : float = v143 * v332 │
00:00:45 #6632 [Verbose] > │ let v353 : float = v143 * v333 │
00:00:45 #6633 [Verbose] > │ let v354 : float = v341 + v351 │
00:00:45 #6634 [Verbose] > │ let v355 : float = v342 + v352 │
00:00:45 #6635 [Verbose] > │ let v356 : float = v343 + v353 │
00:00:45 #6636 [Verbose] > │ let v357 : float = v143 * v335 │
00:00:45 #6637 [Verbose] > │ let v358 : float = v143 * v336 │
00:00:45 #6638 [Verbose] > │ let v359 : float = v143 * v337 │
00:00:45 #6639 [Verbose] > │ let v360 : float = v345 + v357 │
00:00:45 #6640 [Verbose] > │ let v361 : float = v346 + v358 │
00:00:45 #6641 [Verbose] > │ let v362 : float = v347 + v359 │
00:00:45 #6642 [Verbose] > │ let v363 : (unit -> UH0) = closure3(v143, v348, v338) │
00:00:45 #6643 [Verbose] > │ UH0_0(v339, v340, v354, v355, v356, v350, v360, v361, v362, │
00:00:45 #6644 [Verbose] > │ v363) │
00:00:45 #6645 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:45 #6646 [Verbose] > │ UH0_1 │
00:00:45 #6647 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:45 #6648 [Verbose] > │ UH0_1 │
00:00:45 #6649 [Verbose] > │ let v371 : (unit -> UH0) = closure4(v370) │
00:00:45 #6650 [Verbose] > │ let v372 : (unit -> UH0) = method1(v370, v371) │
00:00:45 #6651 [Verbose] > │ let v373 : UH0 = v372 () │
00:00:45 #6652 [Verbose] > │ v373 │
00:00:45 #6653 [Verbose] > │ and closure18 (v0 : float) (v1 : (UH0 -> UH1)) : (UH0 -> UH0) = │
00:00:45 #6654 [Verbose] > │ closure19(v0, v1) │
00:00:45 #6655 [Verbose] > │ and closure17 () (v0 : float) : ((UH0 -> UH1) -> (UH0 -> UH0)) = │
00:00:45 #6656 [Verbose] > │ closure18(v0) │
00:00:45 #6657 [Verbose] > │ and method17 (v0 : UH4, v1 : UH6) : UH6 = │
00:00:45 #6658 [Verbose] > │ match v0 with │
00:00:45 #6659 [Verbose] > │ | UH4_0(v2, v3) -> (* Cons *) │
00:00:45 #6660 [Verbose] > │ let v4 : UH6 = method17(v3, v1) │
00:00:45 #6661 [Verbose] > │ let v5 : int32 = 0 │
00:00:45 #6662 [Verbose] > │ let v6 : US2 = method6(v5, v2) │
00:00:45 #6663 [Verbose] > │ let v23 : US3 = │
00:00:45 #6664 [Verbose] > │ match v6 with │
00:00:45 #6665 [Verbose] > │ | US2_0 -> (* None *) │
00:00:45 #6666 [Verbose] > │ US3_0 │
00:00:45 #6667 [Verbose] > │ | US2_1(v7, v8, v9, v10, v11, v12, v13, v14, v15) -> (* Some *) │
00:00:45 #6668 [Verbose] > │ let v16 : UH7 = UH7_1 │
00:00:45 #6669 [Verbose] > │ let v17 : UH7 = method12(v2, v16) │
00:00:45 #6670 [Verbose] > │ let v18 : float = 0.0 │
00:00:45 #6671 [Verbose] > │ let v19 : float = method13(v17, v18) │
00:00:45 #6672 [Verbose] > │ US3_1(v12, v19) │
00:00:45 #6673 [Verbose] > │ UH6_0(v23, v4) │
00:00:45 #6674 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:45 #6675 [Verbose] > │ v1 │
00:00:45 #6676 [Verbose] > │ and method19 (v0 : UH9, v1 : int32) : int32 = │
00:00:45 #6677 [Verbose] > │ match v0 with │
00:00:45 #6678 [Verbose] > │ | UH9_0(v2, v3) -> (* Cons *) │
00:00:45 #6679 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:45 #6680 [Verbose] > │ method19(v3, v4) │
00:00:45 #6681 [Verbose] > │ | UH9_1 -> (* Nil *) │
00:00:45 #6682 [Verbose] > │ v1 │
00:00:45 #6683 [Verbose] > │ and method20 (v0 : (float []), v1 : UH9, v2 : int32) : int32 = │
00:00:45 #6684 [Verbose] > │ match v1 with │
00:00:45 #6685 [Verbose] > │ | UH9_0(v3, v4) -> (* Cons *) │
00:00:45 #6686 [Verbose] > │ v0.[int v2] <- v3 │
00:00:45 #6687 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:45 #6688 [Verbose] > │ method20(v0, v4, v5) │
00:00:45 #6689 [Verbose] > │ | UH9_1 -> (* Nil *) │
00:00:45 #6690 [Verbose] > │ v2 │
00:00:45 #6691 [Verbose] > │ and method18 (v0 : UH9) : (float []) = │
00:00:45 #6692 [Verbose] > │ let v1 : int32 = 0 │
00:00:45 #6693 [Verbose] > │ let v2 : int32 = method19(v0, v1) │
00:00:45 #6694 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:45 #6695 [Verbose] > │ let v4 : int32 = 0 │
00:00:45 #6696 [Verbose] > │ let v5 : int32 = method20(v3, v0, v4) │
00:00:45 #6697 [Verbose] > │ v3 │
00:00:45 #6698 [Verbose] > │ and method21 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:45 #6699 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:45 #6700 [Verbose] > │ v0 │
00:00:45 #6701 [Verbose] > │ and method0 () : struct (string * string * string * (struct (string * (float │
00:00:45 #6702 [Verbose] > │ []) * (float [])) [])) = │
00:00:45 #6703 [Verbose] > │ let v0 : (float -> ((UH0 -> UH1) -> (UH0 -> UH0))) = closure0() │
00:00:45 #6704 [Verbose] > │ let v1 : ((UH0 -> UH1) -> (UH0 -> UH0)) = v0 0.03 │
00:00:45 #6705 [Verbose] > │ let v2 : (UH0 -> UH1) = closure8() │
00:00:45 #6706 [Verbose] > │ let v3 : (UH0 -> UH0) = v1 v2 │
00:00:45 #6707 [Verbose] > │ let v4 : UH4 = UH4_1 │
00:00:45 #6708 [Verbose] > │ let v5 : int32 = 0 │
00:00:45 #6709 [Verbose] > │ let v6 : UH4 = method7(v3, v4, v5) │
00:00:45 #6710 [Verbose] > │ let v7 : UH6 = UH6_1 │
00:00:45 #6711 [Verbose] > │ let v8 : UH6 = method11(v6, v7) │
00:00:45 #6712 [Verbose] > │ let v9 : UH8 = UH8_1 │
00:00:45 #6713 [Verbose] > │ let v10 : UH8 = method14(v8, v9) │
00:00:45 #6714 [Verbose] > │ let v11 : UH9 = UH9_1 │
00:00:45 #6715 [Verbose] > │ let v12 : UH9 = UH9_1 │
00:00:45 #6716 [Verbose] > │ let struct (v13 : UH9, v14 : UH9) = method15(v10, v11, v12) │
00:00:45 #6717 [Verbose] > │ let v15 : UH9 = UH9_1 │
00:00:45 #6718 [Verbose] > │ let v16 : UH9 = method16(v13, v15) │
00:00:45 #6719 [Verbose] > │ let v17 : UH9 = UH9_1 │
00:00:45 #6720 [Verbose] > │ let v18 : UH9 = method16(v14, v17) │
00:00:45 #6721 [Verbose] > │ let v19 : (float -> ((UH0 -> UH1) -> (UH0 -> UH0))) = closure17() │
00:00:45 #6722 [Verbose] > │ let v20 : ((UH0 -> UH1) -> (UH0 -> UH0)) = v19 0.03 │
00:00:45 #6723 [Verbose] > │ let v21 : (UH0 -> UH0) = v20 v2 │
00:00:45 #6724 [Verbose] > │ let v22 : UH4 = UH4_1 │
00:00:45 #6725 [Verbose] > │ let v23 : int32 = 0 │
00:00:45 #6726 [Verbose] > │ let v24 : UH4 = method7(v21, v22, v23) │
00:00:45 #6727 [Verbose] > │ let v25 : UH6 = UH6_1 │
00:00:45 #6728 [Verbose] > │ let v26 : UH6 = method17(v24, v25) │
00:00:45 #6729 [Verbose] > │ let v27 : UH8 = UH8_1 │
00:00:45 #6730 [Verbose] > │ let v28 : UH8 = method14(v26, v27) │
00:00:45 #6731 [Verbose] > │ let v29 : UH9 = UH9_1 │
00:00:45 #6732 [Verbose] > │ let v30 : UH9 = UH9_1 │
00:00:45 #6733 [Verbose] > │ let struct (v31 : UH9, v32 : UH9) = method15(v28, v29, v30) │
00:00:45 #6734 [Verbose] > │ let v33 : UH9 = UH9_1 │
00:00:45 #6735 [Verbose] > │ let v34 : UH9 = method16(v31, v33) │
00:00:45 #6736 [Verbose] > │ let v35 : UH9 = UH9_1 │
00:00:45 #6737 [Verbose] > │ let v36 : UH9 = method16(v32, v35) │
00:00:45 #6738 [Verbose] > │ let v37 : (float []) = method18(v16) │
00:00:45 #6739 [Verbose] > │ let v38 : (float []) = method18(v18) │
00:00:45 #6740 [Verbose] > │ let v39 : (float []) = method18(v34) │
00:00:45 #6741 [Verbose] > │ let v40 : (float []) = method18(v36) │
00:00:45 #6742 [Verbose] > │ let v41 : string = "euler-cromer" │
00:00:45 #6743 [Verbose] > │ let v42 : string = "runge-kutta 4" │
00:00:45 #6744 [Verbose] > │ let v43 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:45 #6745 [Verbose] > │ (v41, v37, v38); struct (v42, v39, v40)|] │
00:00:45 #6746 [Verbose] > │ let v44 : (struct (string * (float []) * (float [])) []) = method21(v43) │
00:00:45 #6747 [Verbose] > │ let v45 : string = "system kinetic energy versus time" │
00:00:45 #6748 [Verbose] > │ let v46 : string = "time (s)" │
00:00:45 #6749 [Verbose] > │ let v47 : string = "system kinetic energy (j)" │
00:00:45 #6750 [Verbose] > │ struct (v45, v46, v47, v44) │
00:00:45 #6751 [Verbose] > │ method0() │
00:00:45 #6752 [Verbose] > │ │
00:00:45 #6753 [Verbose] > │ │
00:00:45 #6754 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:45 #6755 [Verbose] >
00:00:45 #6756 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:45 #6757 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:45 #6758 [Verbose] > │ ### wave 2 │
00:00:45 #6759 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:45 #6760 [Verbose] >
00:00:45 #6761 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:45 #6762 [Verbose] > // // test
00:00:45 #6763 [Verbose] >
00:00:45 #6764 [Verbose] > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:00:45 #6765 [Verbose] > inl r1 = st1.pos_vec
00:00:45 #6766 [Verbose] > inl r2 = st2.pos_vec
00:00:45 #6767 [Verbose] > inl r21 = r2 ^-^ r1
00:00:45 #6768 [Verbose] > inl r21mag = magnitude r21
00:00:45 #6769 [Verbose] > -k * (r21mag - re) *^ r21 ^/ r21mag
00:00:45 #6770 [Verbose] >
00:00:45 #6771 [Verbose] > inl fixed_linear_spring k re r1 =
00:00:45 #6772 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:45 #6773 [Verbose] > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:00:45 #6774 [Verbose] > r1 })
00:00:45 #6775 [Verbose] >
00:00:45 #6776 [Verbose] > inl forces_string () =
00:00:45 #6777 [Verbose] > [[
00:00:45 #6778 [Verbose] > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ()))
00:00:45 #6779 [Verbose] > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:00:45 #6780 [Verbose] > ]] /@ (
00:00:45 #6781 [Verbose] > listm'.init_series 0 59 1
00:00:45 #6782 [Verbose] > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:00:45 #6783 [Verbose] > )
00:00:45 #6784 [Verbose] >
00:00:45 #6785 [Verbose] > inl string_update dt =
00:00:45 #6786 [Verbose] > update_mps (join runge_kutta_4 dt) (join forces_string ())
00:00:45 #6787 [Verbose] >
00:00:45 #6788 [Verbose] > inl string_initial_overtone n =
00:00:45 #6789 [Verbose] > inl ball_mass = 0.0008293 * 0.65 / 64
00:00:45 #6790 [Verbose] > inl (particle_state default_particle_state') = default_particle_state ()
00:00:45 #6791 [Verbose] > listm'.init_series 0.01 0.64 0.01
00:00:45 #6792 [Verbose] > |> listm.map (fun x =>
00:00:45 #6793 [Verbose] > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:00:45 #6794 [Verbose] > particle_state {
00:00:45 #6795 [Verbose] > default_particle_state' with
00:00:45 #6796 [Verbose] > mass = ball_mass
00:00:45 #6797 [Verbose] > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:00:45 #6798 [Verbose] > velocity = zero_vec ()
00:00:45 #6799 [Verbose] > }
00:00:45 #6800 [Verbose] > )
00:00:45 #6801 [Verbose] > |> stream.from_list
00:00:45 #6802 [Verbose] > |> multi_particle_state
00:00:45 #6803 [Verbose] >
00:00:45 #6804 [Verbose] > let main () =
00:00:45 #6805 [Verbose] > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list
00:00:45 #6806 [Verbose] > inl ~initial_state = string_initial_overtone 3i32
00:00:45 #6807 [Verbose] > inl frames =
00:00:45 #6808 [Verbose] > frames
00:00:45 #6809 [Verbose] > |> stream.map (fun n =>
00:00:45 #6810 [Verbose] > inl (multi_particle_state sts) =
00:00:45 #6811 [Verbose] > stream.iterate (string_update 0.000025) initial_state |>
00:00:45 #6812 [Verbose] > stream.item n
00:00:45 #6813 [Verbose] > inl x, y =
00:00:45 #6814 [Verbose] > [[ zero_vec () ]]
00:00:45 #6815 [Verbose] > /@ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |>
00:00:45 #6816 [Verbose] > stream.to_list)
00:00:45 #6817 [Verbose] > /@ [[ 0.65 *^ i_hat () ]]
00:00:45 #6818 [Verbose] > |> listm.map (fun r => r.x, r.y)
00:00:45 #6819 [Verbose] > |> stream.from_list
00:00:45 #6820 [Verbose] > |> stream.unzip
00:00:45 #6821 [Verbose] > inl x : a i32 _ = x |> stream.to_list |> listm.toArray
00:00:45 #6822 [Verbose] > inl y : a i32 _ = y |> stream.to_list |> listm.toArray
00:00:45 #6823 [Verbose] > x, y
00:00:45 #6824 [Verbose] > )
00:00:45 #6825 [Verbose] >
00:00:45 #6826 [Verbose] > inl plots =
00:00:45 #6827 [Verbose] > frames
00:00:45 #6828 [Verbose] > |> stream.indexed
00:00:45 #6829 [Verbose] > |> stream.map (fun ((n : i32), (x, y)) =>
00:00:45 #6830 [Verbose] > "wave",
00:00:45 #6831 [Verbose] > "position (m)",
00:00:45 #6832 [Verbose] > "displacement (m)",
00:00:45 #6833 [Verbose] > ;[[
00:00:45 #6834 [Verbose] > ($"$\"{!n}\"" : string), x, y
00:00:45 #6835 [Verbose] > ]]
00:00:45 #6836 [Verbose] > )
00:00:45 #6837 [Verbose] >
00:00:45 #6838 [Verbose] > plots |> stream.to_list |> listm.toArray : a i32 _
00:00:54 #6839 [Verbose] >
00:00:54 #6840 [Verbose] > ╭─[ 8.86s - return value ]─────────────────────────────────────────────────────╮
00:00:54 #6841 [Verbose] > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │
00:00:54 #6842 [Verbose] > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │
00:00:54 #6843 [Verbose] > │ xmlns="http://www.w3.org/2000/svg"> │
00:00:54 #6844 [Verbose] > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:00:54 #6845 [Verbose] > │ stroke="none"/> │
00:00:54 #6846 [Verbose] > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:00:54 #6847 [Verbose] > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:00:54 #6848 [Verbose] > │ fill="#FFFFFF"> │
00:00:54 #6849 [Verbose] > │ wave │
00:00:54 #6850 [Verbose] > │ </text> │
00:00:54 #6851 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:00:54 #6852 [Verbose] > │ y2="75"/> │
00:00:54 #6853 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:00:54 #6854 [Verbose] > │ y2="75"/> │
00:00:54 #6855 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:00:54 #6856 [Verbose] > │ y2="75"/> │
00:00:54 #6857 [Verbose] > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" │
00:00:54 #6858 [Verbose] > │ x2="85... │
00:00:54 #6859 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:54 #6860 [Verbose] >
00:00:54 #6861 [Verbose] > ╭─[ 8.90s - stdout ]───────────────────────────────────────────────────────────╮
00:00:54 #6862 [Verbose] > │ type UH0 = │
00:00:54 #6863 [Verbose] > │ | UH0_0 of float * (unit -> UH0) │
00:00:54 #6864 [Verbose] > │ | UH0_1 │
00:00:54 #6865 [Verbose] > │ and UH1 = │
00:00:54 #6866 [Verbose] > │ | UH1_0 of float * float * float * float * float * float * float * float │
00:00:54 #6867 [Verbose] > │ * float * (unit -> UH1) │
00:00:54 #6868 [Verbose] > │ | UH1_1 │
00:00:54 #6869 [Verbose] > │ and UH2 = │
00:00:54 #6870 [Verbose] > │ | UH2_0 of (float []) * (float []) * (unit -> UH2) │
00:00:54 #6871 [Verbose] > │ | UH2_1 │
00:00:54 #6872 [Verbose] > │ and UH3 = │
00:00:54 #6873 [Verbose] > │ | UH3_0 of float * float * float * float * float * float * float * float │
00:00:54 #6874 [Verbose] > │ * float * (unit -> UH3) │
00:00:54 #6875 [Verbose] > │ | UH3_1 │
00:00:54 #6876 [Verbose] > │ and [<Struct>] US0 = │
00:00:54 #6877 [Verbose] > │ | US0_0 of f0_0 : UH1 │
00:00:54 #6878 [Verbose] > │ | US0_1 of f1_0 : (unit -> UH1) │
00:00:54 #6879 [Verbose] > │ and Mut0 = {mutable l0 : US0} │
00:00:54 #6880 [Verbose] > │ and [<Struct>] US1 = │
00:00:54 #6881 [Verbose] > │ | US1_0 of f0_0 : int32 * f0_1 : (struct (float * float * float * float │
00:00:54 #6882 [Verbose] > │ * float * float * float * float * float) -> struct (float * float * float)) │
00:00:54 #6883 [Verbose] > │ | US1_1 of f1_0 : int32 * f1_1 : int32 * f1_2 : (struct (float * float * │
00:00:54 #6884 [Verbose] > │ float * float * float * float * float * float * float) -> (struct (float * │
00:00:54 #6885 [Verbose] > │ float * float * float * float * float * float * float * float) -> struct │
00:00:54 #6886 [Verbose] > │ (float * float * float))) │
00:00:54 #6887 [Verbose] > │ and UH4 = │
00:00:54 #6888 [Verbose] > │ | UH4_0 of US1 * UH4 │
00:00:54 #6889 [Verbose] > │ | UH4_1 │
00:00:54 #6890 [Verbose] > │ and UH5 = │
00:00:54 #6891 [Verbose] > │ | UH5_0 of int32 * float * float * float * float * float * float * float │
00:00:54 #6892 [Verbose] > │ * float * float * (unit -> UH5) │
00:00:54 #6893 [Verbose] > │ | UH5_1 │
00:00:54 #6894 [Verbose] > │ and UH6 = │
00:00:54 #6895 [Verbose] > │ | UH6_0 of (struct (float * float * float * float * float * float * │
00:00:54 #6896 [Verbose] > │ float * float * float) -> struct (float * float * float)) * UH6 │
00:00:54 #6897 [Verbose] > │ | UH6_1 │
00:00:54 #6898 [Verbose] > │ and [<Struct>] US2 = │
00:00:54 #6899 [Verbose] > │ | US2_0 │
00:00:54 #6900 [Verbose] > │ | US2_1 of f1_0 : (struct (float * float * float * float * float * float │
00:00:54 #6901 [Verbose] > │ * float * float * float) -> struct (float * float * float)) │
00:00:54 #6902 [Verbose] > │ and [<Struct>] US3 = │
00:00:54 #6903 [Verbose] > │ | US3_0 │
00:00:54 #6904 [Verbose] > │ | US3_1 of f1_0 : float * f1_1 : float * f1_2 : float * f1_3 : float * │
00:00:54 #6905 [Verbose] > │ f1_4 : float * f1_5 : float * f1_6 : float * f1_7 : float * f1_8 : float │
00:00:54 #6906 [Verbose] > │ and UH7 = │
00:00:54 #6907 [Verbose] > │ | UH7_0 of float * float * float * UH7 │
00:00:54 #6908 [Verbose] > │ | UH7_1 │
00:00:54 #6909 [Verbose] > │ and UH8 = │
00:00:54 #6910 [Verbose] > │ | UH8_0 of UH1 * (unit -> UH8) │
00:00:54 #6911 [Verbose] > │ | UH8_1 │
00:00:54 #6912 [Verbose] > │ and [<Struct>] US4 = │
00:00:54 #6913 [Verbose] > │ | US4_0 │
00:00:54 #6914 [Verbose] > │ | US4_1 of f1_0 : UH1 │
00:00:54 #6915 [Verbose] > │ and UH9 = │
00:00:54 #6916 [Verbose] > │ | UH9_0 of float * float * float * (unit -> UH9) │
00:00:54 #6917 [Verbose] > │ | UH9_1 │
00:00:54 #6918 [Verbose] > │ and UH10 = │
00:00:54 #6919 [Verbose] > │ | UH10_0 of float * float * UH10 │
00:00:54 #6920 [Verbose] > │ | UH10_1 │
00:00:54 #6921 [Verbose] > │ and UH11 = │
00:00:54 #6922 [Verbose] > │ | UH11_0 of float * float * (unit -> UH11) │
00:00:54 #6923 [Verbose] > │ | UH11_1 │
00:00:54 #6924 [Verbose] > │ and UH12 = │
00:00:54 #6925 [Verbose] > │ | UH12_0 of float * UH12 │
00:00:54 #6926 [Verbose] > │ | UH12_1 │
00:00:54 #6927 [Verbose] > │ and UH13 = │
00:00:54 #6928 [Verbose] > │ | UH13_0 of int32 * (float []) * (float []) * (unit -> UH13) │
00:00:54 #6929 [Verbose] > │ | UH13_1 │
00:00:54 #6930 [Verbose] > │ and UH14 = │
00:00:54 #6931 [Verbose] > │ | UH14_0 of string * string * string * (struct (string * (float []) * │
00:00:54 #6932 [Verbose] > │ (float [])) []) * (unit -> UH14) │
00:00:54 #6933 [Verbose] > │ | UH14_1 │
00:00:54 #6934 [Verbose] > │ and UH15 = │
00:00:54 #6935 [Verbose] > │ | UH15_0 of string * string * string * (struct (string * (float []) * │
00:00:54 #6936 [Verbose] > │ (float [])) []) * UH15 │
00:00:54 #6937 [Verbose] > │ | UH15_1 │
00:00:54 #6938 [Verbose] > │ let rec closure65 () () : UH0 = │
00:00:54 #6939 [Verbose] > │ UH0_1 │
00:00:54 #6940 [Verbose] > │ and closure64 () () : UH0 = │
00:00:54 #6941 [Verbose] > │ let v0 : (unit -> UH0) = closure65() │
00:00:54 #6942 [Verbose] > │ UH0_0(65.0, v0) │
00:00:54 #6943 [Verbose] > │ and closure63 () () : UH0 = │
00:00:54 #6944 [Verbose] > │ let v0 : (unit -> UH0) = closure64() │
00:00:54 #6945 [Verbose] > │ UH0_0(64.0, v0) │
00:00:54 #6946 [Verbose] > │ and closure62 () () : UH0 = │
00:00:54 #6947 [Verbose] > │ let v0 : (unit -> UH0) = closure63() │
00:00:54 #6948 [Verbose] > │ UH0_0(63.0, v0) │
00:00:54 #6949 [Verbose] > │ and closure61 () () : UH0 = │
00:00:54 #6950 [Verbose] > │ let v0 : (unit -> UH0) = closure62() │
00:00:54 #6951 [Verbose] > │ UH0_0(62.0, v0) │
00:00:54 #6952 [Verbose] > │ and closure60 () () : UH0 = │
00:00:54 #6953 [Verbose] > │ let v0 : (unit -> UH0) = closure61() │
00:00:54 #6954 [Verbose] > │ UH0_0(61.0, v0) │
00:00:54 #6955 [Verbose] > │ and closure59 () () : UH0 = │
00:00:54 #6956 [Verbose] > │ let v0 : (unit -> UH0) = closure60() │
00:00:54 #6957 [Verbose] > │ UH0_0(60.0, v0) │
00:00:54 #6958 [Verbose] > │ and closure58 () () : UH0 = │
00:00:54 #6959 [Verbose] > │ let v0 : (unit -> UH0) = closure59() │
00:00:54 #6960 [Verbose] > │ UH0_0(59.0, v0) │
00:00:54 #6961 [Verbose] > │ and closure57 () () : UH0 = │
00:00:54 #6962 [Verbose] > │ let v0 : (unit -> UH0) = closure58() │
00:00:54 #6963 [Verbose] > │ UH0_0(58.0, v0) │
00:00:54 #6964 [Verbose] > │ and closure56 () () : UH0 = │
00:00:54 #6965 [Verbose] > │ let v0 : (unit -> UH0) = closure57() │
00:00:54 #6966 [Verbose] > │ UH0_0(57.0, v0) │
00:00:54 #6967 [Verbose] > │ and closure55 () () : UH0 = │
00:00:54 #6968 [Verbose] > │ let v0 : (unit -> UH0) = closure56() │
00:00:54 #6969 [Verbose] > │ UH0_0(56.0, v0) │
00:00:54 #6970 [Verbose] > │ and closure54 () () : UH0 = │
00:00:54 #6971 [Verbose] > │ let v0 : (unit -> UH0) = closure55() │
00:00:54 #6972 [Verbose] > │ UH0_0(55.0, v0) │
00:00:54 #6973 [Verbose] > │ and closure53 () () : UH0 = │
00:00:54 #6974 [Verbose] > │ let v0 : (unit -> UH0) = closure54() │
00:00:54 #6975 [Verbose] > │ UH0_0(54.0, v0) │
00:00:54 #6976 [Verbose] > │ and closure52 () () : UH0 = │
00:00:54 #6977 [Verbose] > │ let v0 : (unit -> UH0) = closure53() │
00:00:54 #6978 [Verbose] > │ UH0_0(53.0, v0) │
00:00:54 #6979 [Verbose] > │ and closure51 () () : UH0 = │
00:00:54 #6980 [Verbose] > │ let v0 : (unit -> UH0) = closure52() │
00:00:54 #6981 [Verbose] > │ UH0_0(52.0, v0) │
00:00:54 #6982 [Verbose] > │ and closure50 () () : UH0 = │
00:00:54 #6983 [Verbose] > │ let v0 : (unit -> UH0) = closure51() │
00:00:54 #6984 [Verbose] > │ UH0_0(51.0, v0) │
00:00:54 #6985 [Verbose] > │ and closure49 () () : UH0 = │
00:00:54 #6986 [Verbose] > │ let v0 : (unit -> UH0) = closure50() │
00:00:54 #6987 [Verbose] > │ UH0_0(50.0, v0) │
00:00:54 #6988 [Verbose] > │ and closure48 () () : UH0 = │
00:00:54 #6989 [Verbose] > │ let v0 : (unit -> UH0) = closure49() │
00:00:54 #6990 [Verbose] > │ UH0_0(49.0, v0) │
00:00:54 #6991 [Verbose] > │ and closure47 () () : UH0 = │
00:00:54 #6992 [Verbose] > │ let v0 : (unit -> UH0) = closure48() │
00:00:54 #6993 [Verbose] > │ UH0_0(48.0, v0) │
00:00:54 #6994 [Verbose] > │ and closure46 () () : UH0 = │
00:00:54 #6995 [Verbose] > │ let v0 : (unit -> UH0) = closure47() │
00:00:54 #6996 [Verbose] > │ UH0_0(47.0, v0) │
00:00:54 #6997 [Verbose] > │ and closure45 () () : UH0 = │
00:00:54 #6998 [Verbose] > │ let v0 : (unit -> UH0) = closure46() │
00:00:54 #6999 [Verbose] > │ UH0_0(46.0, v0) │
00:00:54 #7000 [Verbose] > │ and closure44 () () : UH0 = │
00:00:54 #7001 [Verbose] > │ let v0 : (unit -> UH0) = closure45() │
00:00:54 #7002 [Verbose] > │ UH0_0(45.0, v0) │
00:00:54 #7003 [Verbose] > │ and closure43 () () : UH0 = │
00:00:54 #7004 [Verbose] > │ let v0 : (unit -> UH0) = closure44() │
00:00:54 #7005 [Verbose] > │ UH0_0(44.0, v0) │
00:00:54 #7006 [Verbose] > │ and closure42 () () : UH0 = │
00:00:54 #7007 [Verbose] > │ let v0 : (unit -> UH0) = closure43() │
00:00:54 #7008 [Verbose] > │ UH0_0(43.0, v0) │
00:00:54 #7009 [Verbose] > │ and closure41 () () : UH0 = │
00:00:54 #7010 [Verbose] > │ let v0 : (unit -> UH0) = closure42() │
00:00:54 #7011 [Verbose] > │ UH0_0(42.0, v0) │
00:00:54 #7012 [Verbose] > │ and closure40 () () : UH0 = │
00:00:54 #7013 [Verbose] > │ let v0 : (unit -> UH0) = closure41() │
00:00:54 #7014 [Verbose] > │ UH0_0(41.0, v0) │
00:00:54 #7015 [Verbose] > │ and closure39 () () : UH0 = │
00:00:54 #7016 [Verbose] > │ let v0 : (unit -> UH0) = closure40() │
00:00:54 #7017 [Verbose] > │ UH0_0(40.0, v0) │
00:00:54 #7018 [Verbose] > │ and closure38 () () : UH0 = │
00:00:54 #7019 [Verbose] > │ let v0 : (unit -> UH0) = closure39() │
00:00:54 #7020 [Verbose] > │ UH0_0(39.0, v0) │
00:00:54 #7021 [Verbose] > │ and closure37 () () : UH0 = │
00:00:54 #7022 [Verbose] > │ let v0 : (unit -> UH0) = closure38() │
00:00:54 #7023 [Verbose] > │ UH0_0(38.0, v0) │
00:00:54 #7024 [Verbose] > │ and closure36 () () : UH0 = │
00:00:54 #7025 [Verbose] > │ let v0 : (unit -> UH0) = closure37() │
00:00:54 #7026 [Verbose] > │ UH0_0(37.0, v0) │
00:00:54 #7027 [Verbose] > │ and closure35 () () : UH0 = │
00:00:54 #7028 [Verbose] > │ let v0 : (unit -> UH0) = closure36() │
00:00:54 #7029 [Verbose] > │ UH0_0(36.0, v0) │
00:00:54 #7030 [Verbose] > │ and closure34 () () : UH0 = │
00:00:54 #7031 [Verbose] > │ let v0 : (unit -> UH0) = closure35() │
00:00:54 #7032 [Verbose] > │ UH0_0(35.0, v0) │
00:00:54 #7033 [Verbose] > │ and closure33 () () : UH0 = │
00:00:54 #7034 [Verbose] > │ let v0 : (unit -> UH0) = closure34() │
00:00:54 #7035 [Verbose] > │ UH0_0(34.0, v0) │
00:00:54 #7036 [Verbose] > │ and closure32 () () : UH0 = │
00:00:54 #7037 [Verbose] > │ let v0 : (unit -> UH0) = closure33() │
00:00:54 #7038 [Verbose] > │ UH0_0(33.0, v0) │
00:00:54 #7039 [Verbose] > │ and closure31 () () : UH0 = │
00:00:54 #7040 [Verbose] > │ let v0 : (unit -> UH0) = closure32() │
00:00:54 #7041 [Verbose] > │ UH0_0(32.0, v0) │
00:00:54 #7042 [Verbose] > │ and closure30 () () : UH0 = │
00:00:54 #7043 [Verbose] > │ let v0 : (unit -> UH0) = closure31() │
00:00:54 #7044 [Verbose] > │ UH0_0(31.0, v0) │
00:00:54 #7045 [Verbose] > │ and closure29 () () : UH0 = │
00:00:54 #7046 [Verbose] > │ let v0 : (unit -> UH0) = closure30() │
00:00:54 #7047 [Verbose] > │ UH0_0(30.0, v0) │
00:00:54 #7048 [Verbose] > │ and closure28 () () : UH0 = │
00:00:54 #7049 [Verbose] > │ let v0 : (unit -> UH0) = closure29() │
00:00:54 #7050 [Verbose] > │ UH0_0(29.0, v0) │
00:00:54 #7051 [Verbose] > │ and closure27 () () : UH0 = │
00:00:54 #7052 [Verbose] > │ let v0 : (unit -> UH0) = closure28() │
00:00:54 #7053 [Verbose] > │ UH0_0(28.0, v0) │
00:00:54 #7054 [Verbose] > │ and closure26 () () : UH0 = │
00:00:54 #7055 [Verbose] > │ let v0 : (unit -> UH0) = closure27() │
00:00:54 #7056 [Verbose] > │ UH0_0(27.0, v0) │
00:00:54 #7057 [Verbose] > │ and closure25 () () : UH0 = │
00:00:54 #7058 [Verbose] > │ let v0 : (unit -> UH0) = closure26() │
00:00:54 #7059 [Verbose] > │ UH0_0(26.0, v0) │
00:00:54 #7060 [Verbose] > │ and closure24 () () : UH0 = │
00:00:54 #7061 [Verbose] > │ let v0 : (unit -> UH0) = closure25() │
00:00:54 #7062 [Verbose] > │ UH0_0(25.0, v0) │
00:00:54 #7063 [Verbose] > │ and closure23 () () : UH0 = │
00:00:54 #7064 [Verbose] > │ let v0 : (unit -> UH0) = closure24() │
00:00:54 #7065 [Verbose] > │ UH0_0(24.0, v0) │
00:00:54 #7066 [Verbose] > │ and closure22 () () : UH0 = │
00:00:54 #7067 [Verbose] > │ let v0 : (unit -> UH0) = closure23() │
00:00:54 #7068 [Verbose] > │ UH0_0(23.0, v0) │
00:00:54 #7069 [Verbose] > │ and closure21 () () : UH0 = │
00:00:54 #7070 [Verbose] > │ let v0 : (unit -> UH0) = closure22() │
00:00:54 #7071 [Verbose] > │ UH0_0(22.0, v0) │
00:00:54 #7072 [Verbose] > │ and closure20 () () : UH0 = │
00:00:54 #7073 [Verbose] > │ let v0 : (unit -> UH0) = closure21() │
00:00:54 #7074 [Verbose] > │ UH0_0(21.0, v0) │
00:00:54 #7075 [Verbose] > │ and closure19 () () : UH0 = │
00:00:54 #7076 [Verbose] > │ let v0 : (unit -> UH0) = closure20() │
00:00:54 #7077 [Verbose] > │ UH0_0(20.0, v0) │
00:00:54 #7078 [Verbose] > │ and closure18 () () : UH0 = │
00:00:54 #7079 [Verbose] > │ let v0 : (unit -> UH0) = closure19() │
00:00:54 #7080 [Verbose] > │ UH0_0(19.0, v0) │
00:00:54 #7081 [Verbose] > │ and closure17 () () : UH0 = │
00:00:54 #7082 [Verbose] > │ let v0 : (unit -> UH0) = closure18() │
00:00:54 #7083 [Verbose] > │ UH0_0(18.0, v0) │
00:00:54 #7084 [Verbose] > │ and closure16 () () : UH0 = │
00:00:54 #7085 [Verbose] > │ let v0 : (unit -> UH0) = closure17() │
00:00:54 #7086 [Verbose] > │ UH0_0(17.0, v0) │
00:00:54 #7087 [Verbose] > │ and closure15 () () : UH0 = │
00:00:54 #7088 [Verbose] > │ let v0 : (unit -> UH0) = closure16() │
00:00:54 #7089 [Verbose] > │ UH0_0(16.0, v0) │
00:00:54 #7090 [Verbose] > │ and closure14 () () : UH0 = │
00:00:54 #7091 [Verbose] > │ let v0 : (unit -> UH0) = closure15() │
00:00:54 #7092 [Verbose] > │ UH0_0(15.0, v0) │
00:00:54 #7093 [Verbose] > │ and closure13 () () : UH0 = │
00:00:54 #7094 [Verbose] > │ let v0 : (unit -> UH0) = closure14() │
00:00:54 #7095 [Verbose] > │ UH0_0(14.0, v0) │
00:00:54 #7096 [Verbose] > │ and closure12 () () : UH0 = │
00:00:54 #7097 [Verbose] > │ let v0 : (unit -> UH0) = closure13() │
00:00:54 #7098 [Verbose] > │ UH0_0(13.0, v0) │
00:00:54 #7099 [Verbose] > │ and closure11 () () : UH0 = │
00:00:54 #7100 [Verbose] > │ let v0 : (unit -> UH0) = closure12() │
00:00:54 #7101 [Verbose] > │ UH0_0(12.0, v0) │
00:00:54 #7102 [Verbose] > │ and closure10 () () : UH0 = │
00:00:54 #7103 [Verbose] > │ let v0 : (unit -> UH0) = closure11() │
00:00:54 #7104 [Verbose] > │ UH0_0(11.0, v0) │
00:00:54 #7105 [Verbose] > │ and closure9 () () : UH0 = │
00:00:54 #7106 [Verbose] > │ let v0 : (unit -> UH0) = closure10() │
00:00:54 #7107 [Verbose] > │ UH0_0(10.0, v0) │
00:00:54 #7108 [Verbose] > │ and closure8 () () : UH0 = │
00:00:54 #7109 [Verbose] > │ let v0 : (unit -> UH0) = closure9() │
00:00:54 #7110 [Verbose] > │ UH0_0(9.0, v0) │
00:00:54 #7111 [Verbose] > │ and closure7 () () : UH0 = │
00:00:54 #7112 [Verbose] > │ let v0 : (unit -> UH0) = closure8() │
00:00:54 #7113 [Verbose] > │ UH0_0(8.0, v0) │
00:00:54 #7114 [Verbose] > │ and closure6 () () : UH0 = │
00:00:54 #7115 [Verbose] > │ let v0 : (unit -> UH0) = closure7() │
00:00:54 #7116 [Verbose] > │ UH0_0(7.0, v0) │
00:00:54 #7117 [Verbose] > │ and closure5 () () : UH0 = │
00:00:54 #7118 [Verbose] > │ let v0 : (unit -> UH0) = closure6() │
00:00:54 #7119 [Verbose] > │ UH0_0(6.0, v0) │
00:00:54 #7120 [Verbose] > │ and closure4 () () : UH0 = │
00:00:54 #7121 [Verbose] > │ let v0 : (unit -> UH0) = closure5() │
00:00:54 #7122 [Verbose] > │ UH0_0(5.0, v0) │
00:00:54 #7123 [Verbose] > │ and closure3 () () : UH0 = │
00:00:54 #7124 [Verbose] > │ let v0 : (unit -> UH0) = closure4() │
00:00:54 #7125 [Verbose] > │ UH0_0(4.0, v0) │
00:00:54 #7126 [Verbose] > │ and closure2 () () : UH0 = │
00:00:54 #7127 [Verbose] > │ let v0 : (unit -> UH0) = closure3() │
00:00:54 #7128 [Verbose] > │ UH0_0(3.0, v0) │
00:00:54 #7129 [Verbose] > │ and closure1 () () : UH0 = │
00:00:54 #7130 [Verbose] > │ let v0 : (unit -> UH0) = closure2() │
00:00:54 #7131 [Verbose] > │ UH0_0(2.0, v0) │
00:00:54 #7132 [Verbose] > │ and closure0 () () : UH0 = │
00:00:54 #7133 [Verbose] > │ let v0 : (unit -> UH0) = closure1() │
00:00:54 #7134 [Verbose] > │ UH0_0(1.0, v0) │
00:00:54 #7135 [Verbose] > │ and closure129 () () : UH1 = │
00:00:54 #7136 [Verbose] > │ UH1_1 │
00:00:54 #7137 [Verbose] > │ and closure128 () () : UH1 = │
00:00:54 #7138 [Verbose] > │ let v0 : (unit -> UH1) = closure129() │
00:00:54 #7139 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.64, 0.0007224452478461016, 0.0, 0.0, 0.0, │
00:00:54 #7140 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7141 [Verbose] > │ and closure127 () () : UH1 = │
00:00:54 #7142 [Verbose] > │ let v0 : (unit -> UH1) = closure128() │
00:00:54 #7143 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.63, 0.001429728391993452, 0.0, 0.0, 0.0, │
00:00:54 #7144 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7145 [Verbose] > │ and closure126 () () : UH1 = │
00:00:54 #7146 [Verbose] > │ let v0 : (unit -> UH1) = closure127() │
00:00:54 #7147 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.62, 0.0021070055388626528, 0.0, 0.0, 0.0, │
00:00:54 #7148 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7149 [Verbose] > │ and closure125 () () : UH1 = │
00:00:54 #7150 [Verbose] > │ let v0 : (unit -> UH1) = closure126() │
00:00:54 #7151 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.61, 0.0027400625367733585, 0.0, 0.0, 0.0, │
00:00:54 #7152 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7153 [Verbose] > │ and closure124 () () : UH1 = │
00:00:54 #7154 [Verbose] > │ let v0 : (unit -> UH1) = closure125() │
00:00:54 #7155 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.6, 0.0033156132912039783, 0.0, 0.0, 0.0, │
00:00:54 #7156 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7157 [Verbose] > │ and closure123 () () : UH1 = │
00:00:54 #7158 [Verbose] > │ let v0 : (unit -> UH1) = closure124() │
00:00:54 #7159 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.59, 0.003821578602729245, 0.0, 0.0, 0.0, │
00:00:54 #7160 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7161 [Verbose] > │ and closure122 () () : UH1 = │
00:00:54 #7162 [Verbose] > │ let v0 : (unit -> UH1) = closure123() │
00:00:54 #7163 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.5800000000000001, 0.004247339675607605, │
00:00:54 #7164 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7165 [Verbose] > │ and closure121 () () : UH1 = │
00:00:54 #7166 [Verbose] > │ let v0 : (unit -> UH1) = closure122() │
00:00:54 #7167 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.5700000000000001, 0.004583960976582912, │
00:00:54 #7168 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7169 [Verbose] > │ and closure120 () () : UH1 = │
00:00:54 #7170 [Verbose] > │ let v0 : (unit -> UH1) = closure121() │
00:00:54 #7171 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.56, 0.004824377766717758, 0.0, 0.0, 0.0, │
00:00:54 #7172 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7173 [Verbose] > │ and closure119 () () : UH1 = │
00:00:54 #7174 [Verbose] > │ let v0 : (unit -> UH1) = closure120() │
00:00:54 #7175 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.55, 0.004963544370490271, 0.0, 0.0, 0.0, │
00:00:54 #7176 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7177 [Verbose] > │ and closure118 () () : UH1 = │
00:00:54 #7178 [Verbose] > │ let v0 : (unit -> UH1) = closure119() │
00:00:54 #7179 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.54, 0.004998540070400965, 0.0, 0.0, 0.0, │
00:00:54 #7180 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7181 [Verbose] > │ and closure117 () () : UH1 = │
00:00:54 #7182 [Verbose] > │ let v0 : (unit -> UH1) = closure118() │
00:00:54 #7183 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.53, 0.004928630404658255, 0.0, 0.0, 0.0, │
00:00:54 #7184 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7185 [Verbose] > │ and closure116 () () : UH1 = │
00:00:54 #7186 [Verbose] > │ let v0 : (unit -> UH1) = closure117() │
00:00:54 #7187 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.52, 0.004755282581475766, 0.0, 0.0, 0.0, │
00:00:54 #7188 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7189 [Verbose] > │ and closure115 () () : UH1 = │
00:00:54 #7190 [Verbose] > │ let v0 : (unit -> UH1) = closure116() │
00:00:54 #7191 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.51, 0.0044821346864785195, 0.0, 0.0, 0.0, │
00:00:54 #7192 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7193 [Verbose] > │ and closure114 () () : UH1 = │
00:00:54 #7194 [Verbose] > │ let v0 : (unit -> UH1) = closure115() │
00:00:54 #7195 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.5, 0.0041149193294682815, 0.0, 0.0, 0.0, │
00:00:54 #7196 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7197 [Verbose] > │ and closure113 () () : UH1 = │
00:00:54 #7198 [Verbose] > │ let v0 : (unit -> UH1) = closure114() │
00:00:54 #7199 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.49, 0.0036613433329888622, 0.0, 0.0, 0.0, │
00:00:54 #7200 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7201 [Verbose] > │ and closure112 () () : UH1 = │
00:00:54 #7202 [Verbose] > │ let v0 : (unit -> UH1) = closure113() │
00:00:54 #7203 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.48000000000000004, 0.003130925987691568, │
00:00:54 #7204 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7205 [Verbose] > │ and closure111 () () : UH1 = │
00:00:54 #7206 [Verbose] > │ let v0 : (unit -> UH1) = closure112() │
00:00:54 #7207 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.47000000000000003, 0.002534799269067953, │
00:00:54 #7208 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7209 [Verbose] > │ and closure110 () () : UH1 = │
00:00:54 #7210 [Verbose] > │ let v0 : (unit -> UH1) = closure111() │
00:00:54 #7211 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.46, 0.0018854742084416021, 0.0, 0.0, 0.0, │
00:00:54 #7212 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7213 [Verbose] > │ and closure109 () () : UH1 = │
00:00:54 #7214 [Verbose] > │ let v0 : (unit -> UH1) = closure110() │
00:00:54 #7215 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.45, 0.0011965783214377866, 0.0, 0.0, 0.0, │
00:00:54 #7216 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7217 [Verbose] > │ and closure108 () () : UH1 = │
00:00:54 #7218 [Verbose] > │ let v0 : (unit -> UH1) = closure109() │
00:00:54 #7219 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.44, 0.0004825696045725713, 0.0, 0.0, 0.0, │
00:00:54 #7220 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7221 [Verbose] > │ and closure107 () () : UH1 = │
00:00:54 #7222 [Verbose] > │ let v0 : (unit -> UH1) = closure108() │
00:00:54 #7223 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.43, -0.00024156689762753724, 0.0, 0.0, │
00:00:54 #7224 [Verbose] > │ 0.0, 0.0, 0.0, v0) │
00:00:54 #7225 [Verbose] > │ and closure106 () () : UH1 = │
00:00:54 #7226 [Verbose] > │ let v0 : (unit -> UH1) = closure107() │
00:00:54 #7227 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.42000000000000004, -0.0009606335867685414, │
00:00:54 #7228 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7229 [Verbose] > │ and closure105 () () : UH1 = │
00:00:54 #7230 [Verbose] > │ let v0 : (unit -> UH1) = closure106() │
00:00:54 #7231 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.41000000000000003, -0.0016595392656426435, │
00:00:54 #7232 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7233 [Verbose] > │ and closure104 () () : UH1 = │
00:00:54 #7234 [Verbose] > │ let v0 : (unit -> UH1) = closure105() │
00:00:54 #7235 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.4, -0.002323615860218846, 0.0, 0.0, 0.0, │
00:00:54 #7236 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7237 [Verbose] > │ and closure103 () () : UH1 = │
00:00:54 #7238 [Verbose] > │ let v0 : (unit -> UH1) = closure104() │
00:00:54 #7239 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.39, -0.002938926261462367, 0.0, 0.0, 0.0, │
00:00:54 #7240 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7241 [Verbose] > │ and closure102 () () : UH1 = │
00:00:54 #7242 [Verbose] > │ let v0 : (unit -> UH1) = closure103() │
00:00:54 #7243 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.38, -0.0034925568262446837, 0.0, 0.0, 0.0, │
00:00:54 #7244 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7245 [Verbose] > │ and closure101 () () : UH1 = │
00:00:54 #7246 [Verbose] > │ let v0 : (unit -> UH1) = closure102() │
00:00:54 #7247 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.37, -0.003972888398568774, 0.0, 0.0, 0.0, │
00:00:54 #7248 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7249 [Verbose] > │ and closure100 () () : UH1 = │
00:00:54 #7250 [Verbose] > │ let v0 : (unit -> UH1) = closure101() │
00:00:54 #7251 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.36000000000000004, -0.004369840163132589, │
00:00:54 #7252 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7253 [Verbose] > │ and closure99 () () : UH1 = │
00:00:54 #7254 [Verbose] > │ let v0 : (unit -> UH1) = closure100() │
00:00:54 #7255 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.35000000000000003, -0.004675081213427074, │
00:00:54 #7256 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7257 [Verbose] > │ and closure98 () () : UH1 = │
00:00:54 #7258 [Verbose] > │ let v0 : (unit -> UH1) = closure99() │
00:00:54 #7259 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.34, -0.004882205394146361, 0.0, 0.0, 0.0, │
00:00:54 #7260 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7261 [Verbose] > │ and closure97 () () : UH1 = │
00:00:54 #7262 [Verbose] > │ let v0 : (unit -> UH1) = closure98() │
00:00:54 #7263 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.33, -0.004986865748457456, 0.0, 0.0, 0.0, │
00:00:54 #7264 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7265 [Verbose] > │ and closure96 () () : UH1 = │
00:00:54 #7266 [Verbose] > │ let v0 : (unit -> UH1) = closure97() │
00:00:54 #7267 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.32, -0.004986865748457456, 0.0, 0.0, 0.0, │
00:00:54 #7268 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7269 [Verbose] > │ and closure95 () () : UH1 = │
00:00:54 #7270 [Verbose] > │ let v0 : (unit -> UH1) = closure96() │
00:00:54 #7271 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.31, -0.004882205394146359, 0.0, 0.0, 0.0, │
00:00:54 #7272 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7273 [Verbose] > │ and closure94 () () : UH1 = │
00:00:54 #7274 [Verbose] > │ let v0 : (unit -> UH1) = closure95() │
00:00:54 #7275 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.3, -0.004675081213427074, 0.0, 0.0, 0.0, │
00:00:54 #7276 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7277 [Verbose] > │ and closure93 () () : UH1 = │
00:00:54 #7278 [Verbose] > │ let v0 : (unit -> UH1) = closure94() │
00:00:54 #7279 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.29000000000000004, -0.00436984016313259, │
00:00:54 #7280 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7281 [Verbose] > │ and closure92 () () : UH1 = │
00:00:54 #7282 [Verbose] > │ let v0 : (unit -> UH1) = closure93() │
00:00:54 #7283 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.28, -0.003972888398568771, 0.0, 0.0, 0.0, │
00:00:54 #7284 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7285 [Verbose] > │ and closure91 () () : UH1 = │
00:00:54 #7286 [Verbose] > │ let v0 : (unit -> UH1) = closure92() │
00:00:54 #7287 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.27, -0.003492556826244686, 0.0, 0.0, 0.0, │
00:00:54 #7288 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7289 [Verbose] > │ and closure90 () () : UH1 = │
00:00:54 #7290 [Verbose] > │ let v0 : (unit -> UH1) = closure91() │
00:00:54 #7291 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.26, -0.0029389262614623636, 0.0, 0.0, 0.0, │
00:00:54 #7292 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7293 [Verbose] > │ and closure89 () () : UH1 = │
00:00:54 #7294 [Verbose] > │ let v0 : (unit -> UH1) = closure90() │
00:00:54 #7295 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.25, -0.002323615860218842, 0.0, 0.0, 0.0, │
00:00:54 #7296 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7297 [Verbose] > │ and closure88 () () : UH1 = │
00:00:54 #7298 [Verbose] > │ let v0 : (unit -> UH1) = closure89() │
00:00:54 #7299 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.24000000000000002, -0.001659539265642642, │
00:00:54 #7300 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7301 [Verbose] > │ and closure87 () () : UH1 = │
00:00:54 #7302 [Verbose] > │ let v0 : (unit -> UH1) = closure88() │
00:00:54 #7303 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.23, -0.0009606335867685418, 0.0, 0.0, 0.0, │
00:00:54 #7304 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7305 [Verbose] > │ and closure86 () () : UH1 = │
00:00:54 #7306 [Verbose] > │ let v0 : (unit -> UH1) = closure87() │
00:00:54 #7307 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.22, -0.00024156689762753317, 0.0, 0.0, │
00:00:54 #7308 [Verbose] > │ 0.0, 0.0, 0.0, v0) │
00:00:54 #7309 [Verbose] > │ and closure85 () () : UH1 = │
00:00:54 #7310 [Verbose] > │ let v0 : (unit -> UH1) = closure86() │
00:00:54 #7311 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.21000000000000002, 0.00048256960457257535, │
00:00:54 #7312 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7313 [Verbose] > │ and closure84 () () : UH1 = │
00:00:54 #7314 [Verbose] > │ let v0 : (unit -> UH1) = closure85() │
00:00:54 #7315 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.2, 0.0011965783214377905, 0.0, 0.0, 0.0, │
00:00:54 #7316 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7317 [Verbose] > │ and closure83 () () : UH1 = │
00:00:54 #7318 [Verbose] > │ let v0 : (unit -> UH1) = closure84() │
00:00:54 #7319 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.19, 0.0018854742084416015, 0.0, 0.0, 0.0, │
00:00:54 #7320 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7321 [Verbose] > │ and closure82 () () : UH1 = │
00:00:54 #7322 [Verbose] > │ let v0 : (unit -> UH1) = closure83() │
00:00:54 #7323 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.18000000000000002, 0.002534799269067951, │
00:00:54 #7324 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7325 [Verbose] > │ and closure81 () () : UH1 = │
00:00:54 #7326 [Verbose] > │ let v0 : (unit -> UH1) = closure82() │
00:00:54 #7327 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.17, 0.0031309259876915697, 0.0, 0.0, 0.0, │
00:00:54 #7328 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7329 [Verbose] > │ and closure80 () () : UH1 = │
00:00:54 #7330 [Verbose] > │ let v0 : (unit -> UH1) = closure81() │
00:00:54 #7331 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.16, 0.0036613433329888666, 0.0, 0.0, 0.0, │
00:00:54 #7332 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7333 [Verbose] > │ and closure79 () () : UH1 = │
00:00:54 #7334 [Verbose] > │ let v0 : (unit -> UH1) = closure80() │
00:00:54 #7335 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.15000000000000002, 0.0041149193294682815, │
00:00:54 #7336 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7337 [Verbose] > │ and closure78 () () : UH1 = │
00:00:54 #7338 [Verbose] > │ let v0 : (unit -> UH1) = closure79() │
00:00:54 #7339 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.14, 0.004482134686478519, 0.0, 0.0, 0.0, │
00:00:54 #7340 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7341 [Verbose] > │ and closure77 () () : UH1 = │
00:00:54 #7342 [Verbose] > │ let v0 : (unit -> UH1) = closure78() │
00:00:54 #7343 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.13, 0.004755282581475768, 0.0, 0.0, 0.0, │
00:00:54 #7344 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7345 [Verbose] > │ and closure76 () () : UH1 = │
00:00:54 #7346 [Verbose] > │ let v0 : (unit -> UH1) = closure77() │
00:00:54 #7347 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.12, 0.004928630404658255, 0.0, 0.0, 0.0, │
00:00:54 #7348 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7349 [Verbose] > │ and closure75 () () : UH1 = │
00:00:54 #7350 [Verbose] > │ let v0 : (unit -> UH1) = closure76() │
00:00:54 #7351 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.11, 0.004998540070400965, 0.0, 0.0, 0.0, │
00:00:54 #7352 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7353 [Verbose] > │ and closure74 () () : UH1 = │
00:00:54 #7354 [Verbose] > │ let v0 : (unit -> UH1) = closure75() │
00:00:54 #7355 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.09999999999999999, 0.00496354437049027, │
00:00:54 #7356 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7357 [Verbose] > │ and closure73 () () : UH1 = │
00:00:54 #7358 [Verbose] > │ let v0 : (unit -> UH1) = closure74() │
00:00:54 #7359 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.09, 0.004824377766717757, 0.0, 0.0, 0.0, │
00:00:54 #7360 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7361 [Verbose] > │ and closure72 () () : UH1 = │
00:00:54 #7362 [Verbose] > │ let v0 : (unit -> UH1) = closure73() │
00:00:54 #7363 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.08, 0.004583960976582912, 0.0, 0.0, 0.0, │
00:00:54 #7364 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7365 [Verbose] > │ and closure71 () () : UH1 = │
00:00:54 #7366 [Verbose] > │ let v0 : (unit -> UH1) = closure72() │
00:00:54 #7367 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.06999999999999999, 0.004247339675607605, │
00:00:54 #7368 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7369 [Verbose] > │ and closure70 () () : UH1 = │
00:00:54 #7370 [Verbose] > │ let v0 : (unit -> UH1) = closure71() │
00:00:54 #7371 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.060000000000000005, 0.0038215786027292415, │
00:00:54 #7372 [Verbose] > │ 0.0, 0.0, 0.0, 0.0, 0.0, v0) │
00:00:54 #7373 [Verbose] > │ and closure69 () () : UH1 = │
00:00:54 #7374 [Verbose] > │ let v0 : (unit -> UH1) = closure70() │
00:00:54 #7375 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.05, 0.0033156132912039757, 0.0, 0.0, 0.0, │
00:00:54 #7376 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7377 [Verbose] > │ and closure68 () () : UH1 = │
00:00:54 #7378 [Verbose] > │ let v0 : (unit -> UH1) = closure69() │
00:00:54 #7379 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.04, 0.00274006253677335, 0.0, 0.0, 0.0, │
00:00:54 #7380 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7381 [Verbose] > │ and closure67 () () : UH1 = │
00:00:54 #7382 [Verbose] > │ let v0 : (unit -> UH1) = closure68() │
00:00:54 #7383 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.03, 0.0021070055388626454, 0.0, 0.0, 0.0, │
00:00:54 #7384 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7385 [Verbose] > │ and closure66 () () : UH1 = │
00:00:54 #7386 [Verbose] > │ let v0 : (unit -> UH1) = closure67() │
00:00:54 #7387 [Verbose] > │ UH1_0(0.0, 8.422578125E-06, 0.02, 0.0014297283919934465, 0.0, 0.0, 0.0, │
00:00:54 #7388 [Verbose] > │ 0.0, 0.0, v0) │
00:00:54 #7389 [Verbose] > │ and closure132 (v0 : (unit -> UH1), v1 : (unit -> UH3)) () : UH1 = │
00:00:54 #7390 [Verbose] > │ let v2 : UH3 = v1 () │
00:00:54 #7391 [Verbose] > │ let v3 : UH1 = v0 () │
00:00:54 #7392 [Verbose] > │ match v2 with │
00:00:54 #7393 [Verbose] > │ | UH3_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:54 #7394 [Verbose] > │ match v3 with │
00:00:54 #7395 [Verbose] > │ | UH1_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:54 #7396 [Verbose] > │ StreamCons *) │
00:00:54 #7397 [Verbose] > │ let v24 : float = v9 * 1.25E-05 │
00:00:54 #7398 [Verbose] > │ let v25 : float = v19 + v24 │
00:00:54 #7399 [Verbose] > │ let v26 : float = 1.25E-05 * v6 │
00:00:54 #7400 [Verbose] > │ let v27 : float = 1.25E-05 * v7 │
00:00:54 #7401 [Verbose] > │ let v28 : float = 1.25E-05 * v8 │
00:00:54 #7402 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:54 #7403 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:54 #7404 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:54 #7405 [Verbose] > │ let v32 : float = 1.25E-05 * v10 │
00:00:54 #7406 [Verbose] > │ let v33 : float = 1.25E-05 * v11 │
00:00:54 #7407 [Verbose] > │ let v34 : float = 1.25E-05 * v12 │
00:00:54 #7408 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:54 #7409 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:54 #7410 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:54 #7411 [Verbose] > │ let v38 : (unit -> UH1) = closure132(v23, v13) │
00:00:54 #7412 [Verbose] > │ UH1_0(v14, v15, v29, v30, v31, v25, v35, v36, v37, v38) │
00:00:54 #7413 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7414 [Verbose] > │ UH1_1 │
00:00:54 #7415 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7416 [Verbose] > │ UH1_1 │
00:00:54 #7417 [Verbose] > │ and closure133 (v0 : UH1) () : UH1 = │
00:00:54 #7418 [Verbose] > │ v0 │
00:00:54 #7419 [Verbose] > │ and closure134 (v0 : UH1, v1 : Mut0) () : UH1 = │
00:00:54 #7420 [Verbose] > │ let v2 : US0 = v1.l0 │
00:00:54 #7421 [Verbose] > │ match v2 with │
00:00:54 #7422 [Verbose] > │ | US0_0(v3) -> (* Computed *) │
00:00:54 #7423 [Verbose] > │ v3 │
00:00:54 #7424 [Verbose] > │ | US0_1(v4) -> (* NotComputed *) │
00:00:54 #7425 [Verbose] > │ let v5 : UH1 = v4 () │
00:00:54 #7426 [Verbose] > │ let v20 : UH1 = │
00:00:54 #7427 [Verbose] > │ match v5 with │
00:00:54 #7428 [Verbose] > │ | UH1_0(v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> (* │
00:00:54 #7429 [Verbose] > │ StreamCons *) │
00:00:54 #7430 [Verbose] > │ let v17 : (unit -> UH1) = method3(v0, v16) │
00:00:54 #7431 [Verbose] > │ UH1_0(v7, v8, v9, v10, v11, v12, v13, v14, v15, v17) │
00:00:54 #7432 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7433 [Verbose] > │ UH1_1 │
00:00:54 #7434 [Verbose] > │ let v21 : US0 = US0_0(v20) │
00:00:54 #7435 [Verbose] > │ v1.l0 <- v21 │
00:00:54 #7436 [Verbose] > │ v20 │
00:00:54 #7437 [Verbose] > │ and method3 (v0 : UH1, v1 : (unit -> UH1)) : (unit -> UH1) = │
00:00:54 #7438 [Verbose] > │ let v2 : US0 = US0_1(v1) │
00:00:54 #7439 [Verbose] > │ let v3 : Mut0 = {l0 = v2} : Mut0 │
00:00:54 #7440 [Verbose] > │ closure134(v0, v3) │
00:00:54 #7441 [Verbose] > │ and closure135 (v0 : (unit -> UH1), v1 : (unit -> UH3)) () : UH1 = │
00:00:54 #7442 [Verbose] > │ let v2 : UH3 = v1 () │
00:00:54 #7443 [Verbose] > │ let v3 : UH1 = v0 () │
00:00:54 #7444 [Verbose] > │ match v2 with │
00:00:54 #7445 [Verbose] > │ | UH3_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:54 #7446 [Verbose] > │ match v3 with │
00:00:54 #7447 [Verbose] > │ | UH1_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:54 #7448 [Verbose] > │ StreamCons *) │
00:00:54 #7449 [Verbose] > │ let v24 : float = v9 * 2.5E-05 │
00:00:54 #7450 [Verbose] > │ let v25 : float = v19 + v24 │
00:00:54 #7451 [Verbose] > │ let v26 : float = 2.5E-05 * v6 │
00:00:54 #7452 [Verbose] > │ let v27 : float = 2.5E-05 * v7 │
00:00:54 #7453 [Verbose] > │ let v28 : float = 2.5E-05 * v8 │
00:00:54 #7454 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:54 #7455 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:54 #7456 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:54 #7457 [Verbose] > │ let v32 : float = 2.5E-05 * v10 │
00:00:54 #7458 [Verbose] > │ let v33 : float = 2.5E-05 * v11 │
00:00:54 #7459 [Verbose] > │ let v34 : float = 2.5E-05 * v12 │
00:00:54 #7460 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:54 #7461 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:54 #7462 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:54 #7463 [Verbose] > │ let v38 : (unit -> UH1) = closure135(v23, v13) │
00:00:54 #7464 [Verbose] > │ UH1_0(v14, v15, v29, v30, v31, v25, v35, v36, v37, v38) │
00:00:54 #7465 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7466 [Verbose] > │ UH1_1 │
00:00:54 #7467 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7468 [Verbose] > │ UH1_1 │
00:00:54 #7469 [Verbose] > │ and closure136 (v0 : (unit -> UH3), v1 : (unit -> UH3)) () : UH3 = │
00:00:54 #7470 [Verbose] > │ let v2 : UH3 = v1 () │
00:00:54 #7471 [Verbose] > │ let v3 : UH3 = v0 () │
00:00:54 #7472 [Verbose] > │ match v2 with │
00:00:54 #7473 [Verbose] > │ | UH3_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:54 #7474 [Verbose] > │ match v3 with │
00:00:54 #7475 [Verbose] > │ | UH3_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:54 #7476 [Verbose] > │ StreamCons *) │
00:00:54 #7477 [Verbose] > │ let v24 : float = v4 + v14 │
00:00:54 #7478 [Verbose] > │ let v25 : float = v5 + v15 │
00:00:54 #7479 [Verbose] > │ let v26 : float = v9 + v19 │
00:00:54 #7480 [Verbose] > │ let v27 : float = v6 + v16 │
00:00:54 #7481 [Verbose] > │ let v28 : float = v7 + v17 │
00:00:54 #7482 [Verbose] > │ let v29 : float = v8 + v18 │
00:00:54 #7483 [Verbose] > │ let v30 : float = v10 + v20 │
00:00:54 #7484 [Verbose] > │ let v31 : float = v11 + v21 │
00:00:54 #7485 [Verbose] > │ let v32 : float = v12 + v22 │
00:00:54 #7486 [Verbose] > │ let v33 : (unit -> UH3) = closure136(v23, v13) │
00:00:54 #7487 [Verbose] > │ UH3_0(v24, v25, v27, v28, v29, v26, v30, v31, v32, v33) │
00:00:54 #7488 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7489 [Verbose] > │ UH3_1 │
00:00:54 #7490 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7491 [Verbose] > │ UH3_1 │
00:00:54 #7492 [Verbose] > │ and closure137 (v0 : (unit -> UH1), v1 : (unit -> UH3)) () : UH1 = │
00:00:54 #7493 [Verbose] > │ let v2 : UH3 = v1 () │
00:00:54 #7494 [Verbose] > │ let v3 : UH1 = v0 () │
00:00:54 #7495 [Verbose] > │ match v2 with │
00:00:54 #7496 [Verbose] > │ | UH3_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> (* StreamCons *) │
00:00:54 #7497 [Verbose] > │ match v3 with │
00:00:54 #7498 [Verbose] > │ | UH1_0(v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -> (* │
00:00:54 #7499 [Verbose] > │ StreamCons *) │
00:00:54 #7500 [Verbose] > │ let v24 : float = v9 * 4.166666666666667E-06 │
00:00:54 #7501 [Verbose] > │ let v25 : float = v19 + v24 │
00:00:54 #7502 [Verbose] > │ let v26 : float = 4.166666666666667E-06 * v6 │
00:00:54 #7503 [Verbose] > │ let v27 : float = 4.166666666666667E-06 * v7 │
00:00:54 #7504 [Verbose] > │ let v28 : float = 4.166666666666667E-06 * v8 │
00:00:54 #7505 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:54 #7506 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:54 #7507 [Verbose] > │ let v31 : float = v18 + v28 │
00:00:54 #7508 [Verbose] > │ let v32 : float = 4.166666666666667E-06 * v10 │
00:00:54 #7509 [Verbose] > │ let v33 : float = 4.166666666666667E-06 * v11 │
00:00:54 #7510 [Verbose] > │ let v34 : float = 4.166666666666667E-06 * v12 │
00:00:54 #7511 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:54 #7512 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:54 #7513 [Verbose] > │ let v37 : float = v22 + v34 │
00:00:54 #7514 [Verbose] > │ let v38 : (unit -> UH1) = closure137(v23, v13) │
00:00:54 #7515 [Verbose] > │ UH1_0(v14, v15, v29, v30, v31, v25, v35, v36, v37, v38) │
00:00:54 #7516 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7517 [Verbose] > │ UH1_1 │
00:00:54 #7518 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7519 [Verbose] > │ UH1_1 │
00:00:54 #7520 [Verbose] > │ and closure131 (v0 : (UH1 -> UH3)) (v1 : UH1) : UH1 = │
00:00:54 #7521 [Verbose] > │ let v2 : UH3 = v0 v1 │
00:00:54 #7522 [Verbose] > │ let v44 : UH1 = │
00:00:54 #7523 [Verbose] > │ match v2 with │
00:00:54 #7524 [Verbose] > │ | UH3_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* StreamCons │
00:00:54 #7525 [Verbose] > │ *) │
00:00:54 #7526 [Verbose] > │ match v1 with │
00:00:54 #7527 [Verbose] > │ | UH1_0(v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -> (* │
00:00:54 #7528 [Verbose] > │ StreamCons *) │
00:00:54 #7529 [Verbose] > │ let v23 : float = v8 * 1.25E-05 │
00:00:54 #7530 [Verbose] > │ let v24 : float = v18 + v23 │
00:00:54 #7531 [Verbose] > │ let v25 : float = 1.25E-05 * v5 │
00:00:54 #7532 [Verbose] > │ let v26 : float = 1.25E-05 * v6 │
00:00:54 #7533 [Verbose] > │ let v27 : float = 1.25E-05 * v7 │
00:00:54 #7534 [Verbose] > │ let v28 : float = v15 + v25 │
00:00:54 #7535 [Verbose] > │ let v29 : float = v16 + v26 │
00:00:54 #7536 [Verbose] > │ let v30 : float = v17 + v27 │
00:00:54 #7537 [Verbose] > │ let v31 : float = 1.25E-05 * v9 │
00:00:54 #7538 [Verbose] > │ let v32 : float = 1.25E-05 * v10 │
00:00:54 #7539 [Verbose] > │ let v33 : float = 1.25E-05 * v11 │
00:00:54 #7540 [Verbose] > │ let v34 : float = v19 + v31 │
00:00:54 #7541 [Verbose] > │ let v35 : float = v20 + v32 │
00:00:54 #7542 [Verbose] > │ let v36 : float = v21 + v33 │
00:00:54 #7543 [Verbose] > │ let v37 : (unit -> UH1) = closure132(v22, v12) │
00:00:54 #7544 [Verbose] > │ UH1_0(v13, v14, v28, v29, v30, v24, v34, v35, v36, v37) │
00:00:54 #7545 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7546 [Verbose] > │ UH1_1 │
00:00:54 #7547 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7548 [Verbose] > │ UH1_1 │
00:00:54 #7549 [Verbose] > │ let v45 : (unit -> UH1) = closure133(v44) │
00:00:54 #7550 [Verbose] > │ let v46 : (unit -> UH1) = method3(v44, v45) │
00:00:54 #7551 [Verbose] > │ let v47 : UH1 = v46 () │
00:00:54 #7552 [Verbose] > │ let v48 : UH3 = v0 v47 │
00:00:54 #7553 [Verbose] > │ let v90 : UH1 = │
00:00:54 #7554 [Verbose] > │ match v48 with │
00:00:54 #7555 [Verbose] > │ | UH3_0(v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) -> (* │
00:00:54 #7556 [Verbose] > │ StreamCons *) │
00:00:54 #7557 [Verbose] > │ match v1 with │
00:00:54 #7558 [Verbose] > │ | UH1_0(v59, v60, v61, v62, v63, v64, v65, v66, v67, v68) -> (* │
00:00:54 #7559 [Verbose] > │ StreamCons *) │
00:00:54 #7560 [Verbose] > │ let v69 : float = v54 * 1.25E-05 │
00:00:54 #7561 [Verbose] > │ let v70 : float = v64 + v69 │
00:00:54 #7562 [Verbose] > │ let v71 : float = 1.25E-05 * v51 │
00:00:54 #7563 [Verbose] > │ let v72 : float = 1.25E-05 * v52 │
00:00:54 #7564 [Verbose] > │ let v73 : float = 1.25E-05 * v53 │
00:00:54 #7565 [Verbose] > │ let v74 : float = v61 + v71 │
00:00:54 #7566 [Verbose] > │ let v75 : float = v62 + v72 │
00:00:54 #7567 [Verbose] > │ let v76 : float = v63 + v73 │
00:00:54 #7568 [Verbose] > │ let v77 : float = 1.25E-05 * v55 │
00:00:54 #7569 [Verbose] > │ let v78 : float = 1.25E-05 * v56 │
00:00:54 #7570 [Verbose] > │ let v79 : float = 1.25E-05 * v57 │
00:00:54 #7571 [Verbose] > │ let v80 : float = v65 + v77 │
00:00:54 #7572 [Verbose] > │ let v81 : float = v66 + v78 │
00:00:54 #7573 [Verbose] > │ let v82 : float = v67 + v79 │
00:00:54 #7574 [Verbose] > │ let v83 : (unit -> UH1) = closure132(v68, v58) │
00:00:54 #7575 [Verbose] > │ UH1_0(v59, v60, v74, v75, v76, v70, v80, v81, v82, v83) │
00:00:54 #7576 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7577 [Verbose] > │ UH1_1 │
00:00:54 #7578 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7579 [Verbose] > │ UH1_1 │
00:00:54 #7580 [Verbose] > │ let v91 : (unit -> UH1) = closure133(v90) │
00:00:54 #7581 [Verbose] > │ let v92 : (unit -> UH1) = method3(v90, v91) │
00:00:54 #7582 [Verbose] > │ let v93 : UH1 = v92 () │
00:00:54 #7583 [Verbose] > │ let v94 : UH3 = v0 v93 │
00:00:54 #7584 [Verbose] > │ let v136 : UH1 = │
00:00:54 #7585 [Verbose] > │ match v94 with │
00:00:54 #7586 [Verbose] > │ | UH3_0(v95, v96, v97, v98, v99, v100, v101, v102, v103, v104) -> (* │
00:00:54 #7587 [Verbose] > │ StreamCons *) │
00:00:54 #7588 [Verbose] > │ match v1 with │
00:00:54 #7589 [Verbose] > │ | UH1_0(v105, v106, v107, v108, v109, v110, v111, v112, v113, │
00:00:54 #7590 [Verbose] > │ v114) -> (* StreamCons *) │
00:00:54 #7591 [Verbose] > │ let v115 : float = v100 * 2.5E-05 │
00:00:54 #7592 [Verbose] > │ let v116 : float = v110 + v115 │
00:00:54 #7593 [Verbose] > │ let v117 : float = 2.5E-05 * v97 │
00:00:54 #7594 [Verbose] > │ let v118 : float = 2.5E-05 * v98 │
00:00:54 #7595 [Verbose] > │ let v119 : float = 2.5E-05 * v99 │
00:00:54 #7596 [Verbose] > │ let v120 : float = v107 + v117 │
00:00:54 #7597 [Verbose] > │ let v121 : float = v108 + v118 │
00:00:54 #7598 [Verbose] > │ let v122 : float = v109 + v119 │
00:00:54 #7599 [Verbose] > │ let v123 : float = 2.5E-05 * v101 │
00:00:54 #7600 [Verbose] > │ let v124 : float = 2.5E-05 * v102 │
00:00:54 #7601 [Verbose] > │ let v125 : float = 2.5E-05 * v103 │
00:00:54 #7602 [Verbose] > │ let v126 : float = v111 + v123 │
00:00:54 #7603 [Verbose] > │ let v127 : float = v112 + v124 │
00:00:54 #7604 [Verbose] > │ let v128 : float = v113 + v125 │
00:00:54 #7605 [Verbose] > │ let v129 : (unit -> UH1) = closure135(v114, v104) │
00:00:54 #7606 [Verbose] > │ UH1_0(v105, v106, v120, v121, v122, v116, v126, v127, v128, │
00:00:54 #7607 [Verbose] > │ v129) │
00:00:54 #7608 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7609 [Verbose] > │ UH1_1 │
00:00:54 #7610 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7611 [Verbose] > │ UH1_1 │
00:00:54 #7612 [Verbose] > │ let v137 : (unit -> UH1) = closure133(v136) │
00:00:54 #7613 [Verbose] > │ let v138 : (unit -> UH1) = method3(v136, v137) │
00:00:54 #7614 [Verbose] > │ let v139 : UH1 = v138 () │
00:00:54 #7615 [Verbose] > │ let v140 : UH3 = v0 v139 │
00:00:54 #7616 [Verbose] > │ let v177 : UH3 = │
00:00:54 #7617 [Verbose] > │ match v2 with │
00:00:54 #7618 [Verbose] > │ | UH3_0(v141, v142, v143, v144, v145, v146, v147, v148, v149, v150) │
00:00:54 #7619 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7620 [Verbose] > │ match v48 with │
00:00:54 #7621 [Verbose] > │ | UH3_0(v151, v152, v153, v154, v155, v156, v157, v158, v159, │
00:00:54 #7622 [Verbose] > │ v160) -> (* StreamCons *) │
00:00:54 #7623 [Verbose] > │ let v161 : float = v141 + v151 │
00:00:54 #7624 [Verbose] > │ let v162 : float = v142 + v152 │
00:00:54 #7625 [Verbose] > │ let v163 : float = v146 + v156 │
00:00:54 #7626 [Verbose] > │ let v164 : float = v143 + v153 │
00:00:54 #7627 [Verbose] > │ let v165 : float = v144 + v154 │
00:00:54 #7628 [Verbose] > │ let v166 : float = v145 + v155 │
00:00:54 #7629 [Verbose] > │ let v167 : float = v147 + v157 │
00:00:54 #7630 [Verbose] > │ let v168 : float = v148 + v158 │
00:00:54 #7631 [Verbose] > │ let v169 : float = v149 + v159 │
00:00:54 #7632 [Verbose] > │ let v170 : (unit -> UH3) = closure136(v160, v150) │
00:00:54 #7633 [Verbose] > │ UH3_0(v161, v162, v164, v165, v166, v163, v167, v168, v169, │
00:00:54 #7634 [Verbose] > │ v170) │
00:00:54 #7635 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7636 [Verbose] > │ UH3_1 │
00:00:54 #7637 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7638 [Verbose] > │ UH3_1 │
00:00:54 #7639 [Verbose] > │ let v214 : UH3 = │
00:00:54 #7640 [Verbose] > │ match v177 with │
00:00:54 #7641 [Verbose] > │ | UH3_0(v178, v179, v180, v181, v182, v183, v184, v185, v186, v187) │
00:00:54 #7642 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7643 [Verbose] > │ match v48 with │
00:00:54 #7644 [Verbose] > │ | UH3_0(v188, v189, v190, v191, v192, v193, v194, v195, v196, │
00:00:54 #7645 [Verbose] > │ v197) -> (* StreamCons *) │
00:00:54 #7646 [Verbose] > │ let v198 : float = v178 + v188 │
00:00:54 #7647 [Verbose] > │ let v199 : float = v179 + v189 │
00:00:54 #7648 [Verbose] > │ let v200 : float = v183 + v193 │
00:00:54 #7649 [Verbose] > │ let v201 : float = v180 + v190 │
00:00:54 #7650 [Verbose] > │ let v202 : float = v181 + v191 │
00:00:54 #7651 [Verbose] > │ let v203 : float = v182 + v192 │
00:00:54 #7652 [Verbose] > │ let v204 : float = v184 + v194 │
00:00:54 #7653 [Verbose] > │ let v205 : float = v185 + v195 │
00:00:54 #7654 [Verbose] > │ let v206 : float = v186 + v196 │
00:00:54 #7655 [Verbose] > │ let v207 : (unit -> UH3) = closure136(v197, v187) │
00:00:54 #7656 [Verbose] > │ UH3_0(v198, v199, v201, v202, v203, v200, v204, v205, v206, │
00:00:54 #7657 [Verbose] > │ v207) │
00:00:54 #7658 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7659 [Verbose] > │ UH3_1 │
00:00:54 #7660 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7661 [Verbose] > │ UH3_1 │
00:00:54 #7662 [Verbose] > │ let v251 : UH3 = │
00:00:54 #7663 [Verbose] > │ match v214 with │
00:00:54 #7664 [Verbose] > │ | UH3_0(v215, v216, v217, v218, v219, v220, v221, v222, v223, v224) │
00:00:54 #7665 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7666 [Verbose] > │ match v94 with │
00:00:54 #7667 [Verbose] > │ | UH3_0(v225, v226, v227, v228, v229, v230, v231, v232, v233, │
00:00:54 #7668 [Verbose] > │ v234) -> (* StreamCons *) │
00:00:54 #7669 [Verbose] > │ let v235 : float = v215 + v225 │
00:00:54 #7670 [Verbose] > │ let v236 : float = v216 + v226 │
00:00:54 #7671 [Verbose] > │ let v237 : float = v220 + v230 │
00:00:54 #7672 [Verbose] > │ let v238 : float = v217 + v227 │
00:00:54 #7673 [Verbose] > │ let v239 : float = v218 + v228 │
00:00:54 #7674 [Verbose] > │ let v240 : float = v219 + v229 │
00:00:54 #7675 [Verbose] > │ let v241 : float = v221 + v231 │
00:00:54 #7676 [Verbose] > │ let v242 : float = v222 + v232 │
00:00:54 #7677 [Verbose] > │ let v243 : float = v223 + v233 │
00:00:54 #7678 [Verbose] > │ let v244 : (unit -> UH3) = closure136(v234, v224) │
00:00:54 #7679 [Verbose] > │ UH3_0(v235, v236, v238, v239, v240, v237, v241, v242, v243, │
00:00:54 #7680 [Verbose] > │ v244) │
00:00:54 #7681 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7682 [Verbose] > │ UH3_1 │
00:00:54 #7683 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7684 [Verbose] > │ UH3_1 │
00:00:54 #7685 [Verbose] > │ let v288 : UH3 = │
00:00:54 #7686 [Verbose] > │ match v251 with │
00:00:54 #7687 [Verbose] > │ | UH3_0(v252, v253, v254, v255, v256, v257, v258, v259, v260, v261) │
00:00:54 #7688 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7689 [Verbose] > │ match v94 with │
00:00:54 #7690 [Verbose] > │ | UH3_0(v262, v263, v264, v265, v266, v267, v268, v269, v270, │
00:00:54 #7691 [Verbose] > │ v271) -> (* StreamCons *) │
00:00:54 #7692 [Verbose] > │ let v272 : float = v252 + v262 │
00:00:54 #7693 [Verbose] > │ let v273 : float = v253 + v263 │
00:00:54 #7694 [Verbose] > │ let v274 : float = v257 + v267 │
00:00:54 #7695 [Verbose] > │ let v275 : float = v254 + v264 │
00:00:54 #7696 [Verbose] > │ let v276 : float = v255 + v265 │
00:00:54 #7697 [Verbose] > │ let v277 : float = v256 + v266 │
00:00:54 #7698 [Verbose] > │ let v278 : float = v258 + v268 │
00:00:54 #7699 [Verbose] > │ let v279 : float = v259 + v269 │
00:00:54 #7700 [Verbose] > │ let v280 : float = v260 + v270 │
00:00:54 #7701 [Verbose] > │ let v281 : (unit -> UH3) = closure136(v271, v261) │
00:00:54 #7702 [Verbose] > │ UH3_0(v272, v273, v275, v276, v277, v274, v278, v279, v280, │
00:00:54 #7703 [Verbose] > │ v281) │
00:00:54 #7704 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7705 [Verbose] > │ UH3_1 │
00:00:54 #7706 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7707 [Verbose] > │ UH3_1 │
00:00:54 #7708 [Verbose] > │ let v325 : UH3 = │
00:00:54 #7709 [Verbose] > │ match v288 with │
00:00:54 #7710 [Verbose] > │ | UH3_0(v289, v290, v291, v292, v293, v294, v295, v296, v297, v298) │
00:00:54 #7711 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7712 [Verbose] > │ match v140 with │
00:00:54 #7713 [Verbose] > │ | UH3_0(v299, v300, v301, v302, v303, v304, v305, v306, v307, │
00:00:54 #7714 [Verbose] > │ v308) -> (* StreamCons *) │
00:00:54 #7715 [Verbose] > │ let v309 : float = v289 + v299 │
00:00:54 #7716 [Verbose] > │ let v310 : float = v290 + v300 │
00:00:54 #7717 [Verbose] > │ let v311 : float = v294 + v304 │
00:00:54 #7718 [Verbose] > │ let v312 : float = v291 + v301 │
00:00:54 #7719 [Verbose] > │ let v313 : float = v292 + v302 │
00:00:54 #7720 [Verbose] > │ let v314 : float = v293 + v303 │
00:00:54 #7721 [Verbose] > │ let v315 : float = v295 + v305 │
00:00:54 #7722 [Verbose] > │ let v316 : float = v296 + v306 │
00:00:54 #7723 [Verbose] > │ let v317 : float = v297 + v307 │
00:00:54 #7724 [Verbose] > │ let v318 : (unit -> UH3) = closure136(v308, v298) │
00:00:54 #7725 [Verbose] > │ UH3_0(v309, v310, v312, v313, v314, v311, v315, v316, v317, │
00:00:54 #7726 [Verbose] > │ v318) │
00:00:54 #7727 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7728 [Verbose] > │ UH3_1 │
00:00:54 #7729 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7730 [Verbose] > │ UH3_1 │
00:00:54 #7731 [Verbose] > │ let v367 : UH1 = │
00:00:54 #7732 [Verbose] > │ match v325 with │
00:00:54 #7733 [Verbose] > │ | UH3_0(v326, v327, v328, v329, v330, v331, v332, v333, v334, v335) │
00:00:54 #7734 [Verbose] > │ -> (* StreamCons *) │
00:00:54 #7735 [Verbose] > │ match v1 with │
00:00:54 #7736 [Verbose] > │ | UH1_0(v336, v337, v338, v339, v340, v341, v342, v343, v344, │
00:00:54 #7737 [Verbose] > │ v345) -> (* StreamCons *) │
00:00:54 #7738 [Verbose] > │ let v346 : float = v331 * 4.166666666666667E-06 │
00:00:54 #7739 [Verbose] > │ let v347 : float = v341 + v346 │
00:00:54 #7740 [Verbose] > │ let v348 : float = 4.166666666666667E-06 * v328 │
00:00:54 #7741 [Verbose] > │ let v349 : float = 4.166666666666667E-06 * v329 │
00:00:54 #7742 [Verbose] > │ let v350 : float = 4.166666666666667E-06 * v330 │
00:00:54 #7743 [Verbose] > │ let v351 : float = v338 + v348 │
00:00:54 #7744 [Verbose] > │ let v352 : float = v339 + v349 │
00:00:54 #7745 [Verbose] > │ let v353 : float = v340 + v350 │
00:00:54 #7746 [Verbose] > │ let v354 : float = 4.166666666666667E-06 * v332 │
00:00:54 #7747 [Verbose] > │ let v355 : float = 4.166666666666667E-06 * v333 │
00:00:54 #7748 [Verbose] > │ let v356 : float = 4.166666666666667E-06 * v334 │
00:00:54 #7749 [Verbose] > │ let v357 : float = v342 + v354 │
00:00:54 #7750 [Verbose] > │ let v358 : float = v343 + v355 │
00:00:54 #7751 [Verbose] > │ let v359 : float = v344 + v356 │
00:00:54 #7752 [Verbose] > │ let v360 : (unit -> UH1) = closure137(v345, v335) │
00:00:54 #7753 [Verbose] > │ UH1_0(v336, v337, v351, v352, v353, v347, v357, v358, v359, │
00:00:54 #7754 [Verbose] > │ v360) │
00:00:54 #7755 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7756 [Verbose] > │ UH1_1 │
00:00:54 #7757 [Verbose] > │ | UH3_1 -> (* StreamNil *) │
00:00:54 #7758 [Verbose] > │ UH1_1 │
00:00:54 #7759 [Verbose] > │ let v368 : (unit -> UH1) = closure133(v367) │
00:00:54 #7760 [Verbose] > │ let v369 : (unit -> UH1) = method3(v367, v368) │
00:00:54 #7761 [Verbose] > │ let v370 : UH1 = v369 () │
00:00:54 #7762 [Verbose] > │ v370 │
00:00:54 #7763 [Verbose] > │ and closure130 () (v0 : (UH1 -> UH3)) : (UH1 -> UH1) = │
00:00:54 #7764 [Verbose] > │ closure131(v0) │
00:00:54 #7765 [Verbose] > │ and method2 () : ((UH1 -> UH3) -> (UH1 -> UH1)) = │
00:00:54 #7766 [Verbose] > │ closure130() │
00:00:54 #7767 [Verbose] > │ and closure138 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:54 #7768 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:54 #7769 [Verbose] > │ float * float) = │
00:00:54 #7770 [Verbose] > │ let v9 : float = v2 * v2 │
00:00:54 #7771 [Verbose] > │ let v10 : float = v3 * v3 │
00:00:54 #7772 [Verbose] > │ let v11 : float = v9 + v10 │
00:00:54 #7773 [Verbose] > │ let v12 : float = v4 * v4 │
00:00:54 #7774 [Verbose] > │ let v13 : float = v11 + v12 │
00:00:54 #7775 [Verbose] > │ let v14 : float = sqrt v13 │
00:00:54 #7776 [Verbose] > │ let v15 : float = -5384.0 * v14 │
00:00:54 #7777 [Verbose] > │ let v16 : float = v15 * v2 │
00:00:54 #7778 [Verbose] > │ let v17 : float = v15 * v3 │
00:00:54 #7779 [Verbose] > │ let v18 : float = v15 * v4 │
00:00:54 #7780 [Verbose] > │ let v19 : float = v16 / v14 │
00:00:54 #7781 [Verbose] > │ let v20 : float = v17 / v14 │
00:00:54 #7782 [Verbose] > │ let v21 : float = v18 / v14 │
00:00:54 #7783 [Verbose] > │ struct (v19, v20, v21) │
00:00:54 #7784 [Verbose] > │ and closure139 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:54 #7785 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:54 #7786 [Verbose] > │ float * float) = │
00:00:54 #7787 [Verbose] > │ let v9 : float = v2 + -0.65 │
00:00:54 #7788 [Verbose] > │ let v10 : float = v9 * v9 │
00:00:54 #7789 [Verbose] > │ let v11 : float = v3 * v3 │
00:00:54 #7790 [Verbose] > │ let v12 : float = v10 + v11 │
00:00:54 #7791 [Verbose] > │ let v13 : float = v4 * v4 │
00:00:54 #7792 [Verbose] > │ let v14 : float = v12 + v13 │
00:00:54 #7793 [Verbose] > │ let v15 : float = sqrt v14 │
00:00:54 #7794 [Verbose] > │ let v16 : float = -5384.0 * v15 │
00:00:54 #7795 [Verbose] > │ let v17 : float = v16 * v9 │
00:00:54 #7796 [Verbose] > │ let v18 : float = v16 * v3 │
00:00:54 #7797 [Verbose] > │ let v19 : float = v16 * v4 │
00:00:54 #7798 [Verbose] > │ let v20 : float = v17 / v15 │
00:00:54 #7799 [Verbose] > │ let v21 : float = v18 / v15 │
00:00:54 #7800 [Verbose] > │ let v22 : float = v19 / v15 │
00:00:54 #7801 [Verbose] > │ struct (v20, v21, v22) │
00:00:54 #7802 [Verbose] > │ and closure141 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, │
00:00:54 #7803 [Verbose] > │ v5 : float, v6 : float, v7 : float, v8 : float) struct (v9 : float, v10 : │
00:00:54 #7804 [Verbose] > │ float, v11 : float, v12 : float, v13 : float, v14 : float, v15 : float, v16 │
00:00:54 #7805 [Verbose] > │ : float, v17 : float) : struct (float * float * float) = │
00:00:54 #7806 [Verbose] > │ let v18 : float = -1.0 * v2 │
00:00:54 #7807 [Verbose] > │ let v19 : float = -1.0 * v3 │
00:00:54 #7808 [Verbose] > │ let v20 : float = -1.0 * v4 │
00:00:54 #7809 [Verbose] > │ let v21 : float = v11 + v18 │
00:00:54 #7810 [Verbose] > │ let v22 : float = v12 + v19 │
00:00:54 #7811 [Verbose] > │ let v23 : float = v13 + v20 │
00:00:54 #7812 [Verbose] > │ let v24 : float = v21 * v21 │
00:00:54 #7813 [Verbose] > │ let v25 : float = v22 * v22 │
00:00:54 #7814 [Verbose] > │ let v26 : float = v24 + v25 │
00:00:54 #7815 [Verbose] > │ let v27 : float = v23 * v23 │
00:00:54 #7816 [Verbose] > │ let v28 : float = v26 + v27 │
00:00:54 #7817 [Verbose] > │ let v29 : float = sqrt v28 │
00:00:54 #7818 [Verbose] > │ let v30 : float = -5384.0 * v29 │
00:00:54 #7819 [Verbose] > │ let v31 : float = v30 * v21 │
00:00:54 #7820 [Verbose] > │ let v32 : float = v30 * v22 │
00:00:54 #7821 [Verbose] > │ let v33 : float = v30 * v23 │
00:00:54 #7822 [Verbose] > │ let v34 : float = v31 / v29 │
00:00:54 #7823 [Verbose] > │ let v35 : float = v32 / v29 │
00:00:54 #7824 [Verbose] > │ let v36 : float = v33 / v29 │
00:00:54 #7825 [Verbose] > │ struct (v34, v35, v36) │
00:00:54 #7826 [Verbose] > │ and closure140 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:54 #7827 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : (struct (float * │
00:00:54 #7828 [Verbose] > │ float * float * float * float * float * float * float * float) -> struct │
00:00:54 #7829 [Verbose] > │ (float * float * float)) = │
00:00:54 #7830 [Verbose] > │ closure141(v0, v1, v2, v3, v4, v5, v6, v7, v8) │
00:00:54 #7831 [Verbose] > │ and method4 () : UH4 = │
00:00:54 #7832 [Verbose] > │ let v0 : (struct (float * float * float * float * float * float * float │
00:00:54 #7833 [Verbose] > │ * float * float) -> struct (float * float * float)) = closure138() │
00:00:54 #7834 [Verbose] > │ let v1 : US1 = US1_0(0, v0) │
00:00:54 #7835 [Verbose] > │ let v2 : (struct (float * float * float * float * float * float * float │
00:00:54 #7836 [Verbose] > │ * float * float) -> struct (float * float * float)) = closure139() │
00:00:54 #7837 [Verbose] > │ let v3 : US1 = US1_0(63, v2) │
00:00:54 #7838 [Verbose] > │ let v4 : (struct (float * float * float * float * float * float * float │
00:00:54 #7839 [Verbose] > │ * float * float) -> (struct (float * float * float * float * float * float * │
00:00:54 #7840 [Verbose] > │ float * float * float) -> struct (float * float * float))) = closure140() │
00:00:54 #7841 [Verbose] > │ let v5 : US1 = US1_1(0, 1, v4) │
00:00:54 #7842 [Verbose] > │ let v6 : US1 = US1_1(1, 2, v4) │
00:00:54 #7843 [Verbose] > │ let v7 : US1 = US1_1(2, 3, v4) │
00:00:54 #7844 [Verbose] > │ let v8 : US1 = US1_1(3, 4, v4) │
00:00:54 #7845 [Verbose] > │ let v9 : US1 = US1_1(4, 5, v4) │
00:00:54 #7846 [Verbose] > │ let v10 : US1 = US1_1(5, 6, v4) │
00:00:54 #7847 [Verbose] > │ let v11 : US1 = US1_1(6, 7, v4) │
00:00:54 #7848 [Verbose] > │ let v12 : US1 = US1_1(7, 8, v4) │
00:00:54 #7849 [Verbose] > │ let v13 : US1 = US1_1(8, 9, v4) │
00:00:54 #7850 [Verbose] > │ let v14 : US1 = US1_1(9, 10, v4) │
00:00:54 #7851 [Verbose] > │ let v15 : US1 = US1_1(10, 11, v4) │
00:00:54 #7852 [Verbose] > │ let v16 : US1 = US1_1(11, 12, v4) │
00:00:54 #7853 [Verbose] > │ let v17 : US1 = US1_1(12, 13, v4) │
00:00:54 #7854 [Verbose] > │ let v18 : US1 = US1_1(13, 14, v4) │
00:00:54 #7855 [Verbose] > │ let v19 : US1 = US1_1(14, 15, v4) │
00:00:54 #7856 [Verbose] > │ let v20 : US1 = US1_1(15, 16, v4) │
00:00:54 #7857 [Verbose] > │ let v21 : US1 = US1_1(16, 17, v4) │
00:00:54 #7858 [Verbose] > │ let v22 : US1 = US1_1(17, 18, v4) │
00:00:54 #7859 [Verbose] > │ let v23 : US1 = US1_1(18, 19, v4) │
00:00:54 #7860 [Verbose] > │ let v24 : US1 = US1_1(19, 20, v4) │
00:00:54 #7861 [Verbose] > │ let v25 : US1 = US1_1(20, 21, v4) │
00:00:54 #7862 [Verbose] > │ let v26 : US1 = US1_1(21, 22, v4) │
00:00:54 #7863 [Verbose] > │ let v27 : US1 = US1_1(22, 23, v4) │
00:00:54 #7864 [Verbose] > │ let v28 : US1 = US1_1(23, 24, v4) │
00:00:54 #7865 [Verbose] > │ let v29 : US1 = US1_1(24, 25, v4) │
00:00:54 #7866 [Verbose] > │ let v30 : US1 = US1_1(25, 26, v4) │
00:00:54 #7867 [Verbose] > │ let v31 : US1 = US1_1(26, 27, v4) │
00:00:54 #7868 [Verbose] > │ let v32 : US1 = US1_1(27, 28, v4) │
00:00:54 #7869 [Verbose] > │ let v33 : US1 = US1_1(28, 29, v4) │
00:00:54 #7870 [Verbose] > │ let v34 : US1 = US1_1(29, 30, v4) │
00:00:54 #7871 [Verbose] > │ let v35 : US1 = US1_1(30, 31, v4) │
00:00:54 #7872 [Verbose] > │ let v36 : US1 = US1_1(31, 32, v4) │
00:00:54 #7873 [Verbose] > │ let v37 : US1 = US1_1(32, 33, v4) │
00:00:54 #7874 [Verbose] > │ let v38 : US1 = US1_1(33, 34, v4) │
00:00:54 #7875 [Verbose] > │ let v39 : US1 = US1_1(34, 35, v4) │
00:00:54 #7876 [Verbose] > │ let v40 : US1 = US1_1(35, 36, v4) │
00:00:54 #7877 [Verbose] > │ let v41 : US1 = US1_1(36, 37, v4) │
00:00:54 #7878 [Verbose] > │ let v42 : US1 = US1_1(37, 38, v4) │
00:00:54 #7879 [Verbose] > │ let v43 : US1 = US1_1(38, 39, v4) │
00:00:54 #7880 [Verbose] > │ let v44 : US1 = US1_1(39, 40, v4) │
00:00:54 #7881 [Verbose] > │ let v45 : US1 = US1_1(40, 41, v4) │
00:00:54 #7882 [Verbose] > │ let v46 : US1 = US1_1(41, 42, v4) │
00:00:54 #7883 [Verbose] > │ let v47 : US1 = US1_1(42, 43, v4) │
00:00:54 #7884 [Verbose] > │ let v48 : US1 = US1_1(43, 44, v4) │
00:00:54 #7885 [Verbose] > │ let v49 : US1 = US1_1(44, 45, v4) │
00:00:54 #7886 [Verbose] > │ let v50 : US1 = US1_1(45, 46, v4) │
00:00:54 #7887 [Verbose] > │ let v51 : US1 = US1_1(46, 47, v4) │
00:00:54 #7888 [Verbose] > │ let v52 : US1 = US1_1(47, 48, v4) │
00:00:54 #7889 [Verbose] > │ let v53 : US1 = US1_1(48, 49, v4) │
00:00:54 #7890 [Verbose] > │ let v54 : US1 = US1_1(49, 50, v4) │
00:00:54 #7891 [Verbose] > │ let v55 : US1 = US1_1(50, 51, v4) │
00:00:54 #7892 [Verbose] > │ let v56 : US1 = US1_1(51, 52, v4) │
00:00:54 #7893 [Verbose] > │ let v57 : US1 = US1_1(52, 53, v4) │
00:00:54 #7894 [Verbose] > │ let v58 : US1 = US1_1(53, 54, v4) │
00:00:54 #7895 [Verbose] > │ let v59 : US1 = US1_1(54, 55, v4) │
00:00:54 #7896 [Verbose] > │ let v60 : US1 = US1_1(55, 56, v4) │
00:00:54 #7897 [Verbose] > │ let v61 : US1 = US1_1(56, 57, v4) │
00:00:54 #7898 [Verbose] > │ let v62 : US1 = US1_1(57, 58, v4) │
00:00:54 #7899 [Verbose] > │ let v63 : US1 = US1_1(58, 59, v4) │
00:00:54 #7900 [Verbose] > │ let v64 : US1 = US1_1(59, 60, v4) │
00:00:54 #7901 [Verbose] > │ let v65 : UH4 = UH4_1 │
00:00:54 #7902 [Verbose] > │ let v66 : UH4 = UH4_0(v64, v65) │
00:00:54 #7903 [Verbose] > │ let v67 : UH4 = UH4_0(v63, v66) │
00:00:54 #7904 [Verbose] > │ let v68 : UH4 = UH4_0(v62, v67) │
00:00:54 #7905 [Verbose] > │ let v69 : UH4 = UH4_0(v61, v68) │
00:00:54 #7906 [Verbose] > │ let v70 : UH4 = UH4_0(v60, v69) │
00:00:54 #7907 [Verbose] > │ let v71 : UH4 = UH4_0(v59, v70) │
00:00:54 #7908 [Verbose] > │ let v72 : UH4 = UH4_0(v58, v71) │
00:00:54 #7909 [Verbose] > │ let v73 : UH4 = UH4_0(v57, v72) │
00:00:54 #7910 [Verbose] > │ let v74 : UH4 = UH4_0(v56, v73) │
00:00:54 #7911 [Verbose] > │ let v75 : UH4 = UH4_0(v55, v74) │
00:00:54 #7912 [Verbose] > │ let v76 : UH4 = UH4_0(v54, v75) │
00:00:54 #7913 [Verbose] > │ let v77 : UH4 = UH4_0(v53, v76) │
00:00:54 #7914 [Verbose] > │ let v78 : UH4 = UH4_0(v52, v77) │
00:00:54 #7915 [Verbose] > │ let v79 : UH4 = UH4_0(v51, v78) │
00:00:54 #7916 [Verbose] > │ let v80 : UH4 = UH4_0(v50, v79) │
00:00:54 #7917 [Verbose] > │ let v81 : UH4 = UH4_0(v49, v80) │
00:00:54 #7918 [Verbose] > │ let v82 : UH4 = UH4_0(v48, v81) │
00:00:54 #7919 [Verbose] > │ let v83 : UH4 = UH4_0(v47, v82) │
00:00:54 #7920 [Verbose] > │ let v84 : UH4 = UH4_0(v46, v83) │
00:00:54 #7921 [Verbose] > │ let v85 : UH4 = UH4_0(v45, v84) │
00:00:54 #7922 [Verbose] > │ let v86 : UH4 = UH4_0(v44, v85) │
00:00:54 #7923 [Verbose] > │ let v87 : UH4 = UH4_0(v43, v86) │
00:00:54 #7924 [Verbose] > │ let v88 : UH4 = UH4_0(v42, v87) │
00:00:54 #7925 [Verbose] > │ let v89 : UH4 = UH4_0(v41, v88) │
00:00:54 #7926 [Verbose] > │ let v90 : UH4 = UH4_0(v40, v89) │
00:00:54 #7927 [Verbose] > │ let v91 : UH4 = UH4_0(v39, v90) │
00:00:54 #7928 [Verbose] > │ let v92 : UH4 = UH4_0(v38, v91) │
00:00:54 #7929 [Verbose] > │ let v93 : UH4 = UH4_0(v37, v92) │
00:00:54 #7930 [Verbose] > │ let v94 : UH4 = UH4_0(v36, v93) │
00:00:54 #7931 [Verbose] > │ let v95 : UH4 = UH4_0(v35, v94) │
00:00:54 #7932 [Verbose] > │ let v96 : UH4 = UH4_0(v34, v95) │
00:00:54 #7933 [Verbose] > │ let v97 : UH4 = UH4_0(v33, v96) │
00:00:54 #7934 [Verbose] > │ let v98 : UH4 = UH4_0(v32, v97) │
00:00:54 #7935 [Verbose] > │ let v99 : UH4 = UH4_0(v31, v98) │
00:00:54 #7936 [Verbose] > │ let v100 : UH4 = UH4_0(v30, v99) │
00:00:54 #7937 [Verbose] > │ let v101 : UH4 = UH4_0(v29, v100) │
00:00:54 #7938 [Verbose] > │ let v102 : UH4 = UH4_0(v28, v101) │
00:00:54 #7939 [Verbose] > │ let v103 : UH4 = UH4_0(v27, v102) │
00:00:54 #7940 [Verbose] > │ let v104 : UH4 = UH4_0(v26, v103) │
00:00:54 #7941 [Verbose] > │ let v105 : UH4 = UH4_0(v25, v104) │
00:00:54 #7942 [Verbose] > │ let v106 : UH4 = UH4_0(v24, v105) │
00:00:54 #7943 [Verbose] > │ let v107 : UH4 = UH4_0(v23, v106) │
00:00:54 #7944 [Verbose] > │ let v108 : UH4 = UH4_0(v22, v107) │
00:00:54 #7945 [Verbose] > │ let v109 : UH4 = UH4_0(v21, v108) │
00:00:54 #7946 [Verbose] > │ let v110 : UH4 = UH4_0(v20, v109) │
00:00:54 #7947 [Verbose] > │ let v111 : UH4 = UH4_0(v19, v110) │
00:00:54 #7948 [Verbose] > │ let v112 : UH4 = UH4_0(v18, v111) │
00:00:54 #7949 [Verbose] > │ let v113 : UH4 = UH4_0(v17, v112) │
00:00:54 #7950 [Verbose] > │ let v114 : UH4 = UH4_0(v16, v113) │
00:00:54 #7951 [Verbose] > │ let v115 : UH4 = UH4_0(v15, v114) │
00:00:54 #7952 [Verbose] > │ let v116 : UH4 = UH4_0(v14, v115) │
00:00:54 #7953 [Verbose] > │ let v117 : UH4 = UH4_0(v13, v116) │
00:00:54 #7954 [Verbose] > │ let v118 : UH4 = UH4_0(v12, v117) │
00:00:54 #7955 [Verbose] > │ let v119 : UH4 = UH4_0(v11, v118) │
00:00:54 #7956 [Verbose] > │ let v120 : UH4 = UH4_0(v10, v119) │
00:00:54 #7957 [Verbose] > │ let v121 : UH4 = UH4_0(v9, v120) │
00:00:54 #7958 [Verbose] > │ let v122 : UH4 = UH4_0(v8, v121) │
00:00:54 #7959 [Verbose] > │ let v123 : UH4 = UH4_0(v7, v122) │
00:00:54 #7960 [Verbose] > │ let v124 : UH4 = UH4_0(v6, v123) │
00:00:54 #7961 [Verbose] > │ let v125 : UH4 = UH4_0(v5, v124) │
00:00:54 #7962 [Verbose] > │ let v126 : UH4 = UH4_0(v3, v125) │
00:00:54 #7963 [Verbose] > │ UH4_0(v1, v126) │
00:00:54 #7964 [Verbose] > │ and closure143 (v0 : UH5) () : UH5 = │
00:00:54 #7965 [Verbose] > │ v0 │
00:00:54 #7966 [Verbose] > │ and method5 (v0 : UH1, v1 : UH5, v2 : int32) : struct (UH5 * int32) = │
00:00:54 #7967 [Verbose] > │ match v0 with │
00:00:54 #7968 [Verbose] > │ | UH1_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* StreamCons *) │
00:00:54 #7969 [Verbose] > │ let v13 : int32 = v2 + 1 │
00:00:54 #7970 [Verbose] > │ let v14 : UH1 = v12 () │
00:00:54 #7971 [Verbose] > │ let v15 : (unit -> UH5) = closure143(v1) │
00:00:54 #7972 [Verbose] > │ let v16 : UH5 = UH5_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v15) │
00:00:54 #7973 [Verbose] > │ method5(v14, v16, v13) │
00:00:54 #7974 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #7975 [Verbose] > │ struct (v1, v2) │
00:00:54 #7976 [Verbose] > │ and closure144 (v0 : UH5) () : UH5 = │
00:00:54 #7977 [Verbose] > │ v0 │
00:00:54 #7978 [Verbose] > │ and method6 (v0 : UH5, v1 : UH5) : UH5 = │
00:00:54 #7979 [Verbose] > │ match v0 with │
00:00:54 #7980 [Verbose] > │ | UH5_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> (* StreamCons │
00:00:54 #7981 [Verbose] > │ *) │
00:00:54 #7982 [Verbose] > │ let v13 : UH5 = v12 () │
00:00:54 #7983 [Verbose] > │ let v14 : (unit -> UH5) = closure144(v1) │
00:00:54 #7984 [Verbose] > │ let v15 : UH5 = UH5_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v14) │
00:00:54 #7985 [Verbose] > │ method6(v13, v15) │
00:00:54 #7986 [Verbose] > │ | UH5_1 -> (* StreamNil *) │
00:00:54 #7987 [Verbose] > │ v1 │
00:00:54 #7988 [Verbose] > │ and closure145 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:54 #7989 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:54 #7990 [Verbose] > │ float * float) = │
00:00:54 #7991 [Verbose] > │ struct (0.0, 0.0, 0.0) │
00:00:54 #7992 [Verbose] > │ and method9 (v0 : int32, v1 : UH1) : US3 = │
00:00:54 #7993 [Verbose] > │ match v1 with │
00:00:54 #7994 [Verbose] > │ | UH1_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* StreamCons *) │
00:00:54 #7995 [Verbose] > │ let v12 : bool = v0 <= 0 │
00:00:54 #7996 [Verbose] > │ if v12 then │
00:00:54 #7997 [Verbose] > │ US3_1(v2, v3, v4, v5, v6, v7, v8, v9, v10) │
00:00:54 #7998 [Verbose] > │ else │
00:00:54 #7999 [Verbose] > │ let v14 : int32 = v0 - 1 │
00:00:54 #8000 [Verbose] > │ let v15 : UH1 = v11 () │
00:00:54 #8001 [Verbose] > │ method9(v14, v15) │
00:00:54 #8002 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #8003 [Verbose] > │ US3_0 │
00:00:54 #8004 [Verbose] > │ and closure146 () struct (v0 : float, v1 : float, v2 : float, v3 : float, v4 │
00:00:54 #8005 [Verbose] > │ : float, v5 : float, v6 : float, v7 : float, v8 : float) : struct (float * │
00:00:54 #8006 [Verbose] > │ float * float) = │
00:00:54 #8007 [Verbose] > │ struct (0.0, 0.0, 0.0) │
00:00:54 #8008 [Verbose] > │ and method8 (v0 : int32, v1 : UH1, v2 : UH4, v3 : UH6) : UH6 = │
00:00:54 #8009 [Verbose] > │ match v2 with │
00:00:54 #8010 [Verbose] > │ | UH4_0(v4, v5) -> (* Cons *) │
00:00:54 #8011 [Verbose] > │ let v6 : UH6 = method8(v0, v1, v5, v3) │
00:00:54 #8012 [Verbose] > │ let v55 : (struct (float * float * float * float * float * float * │
00:00:54 #8013 [Verbose] > │ float * float * float) -> struct (float * float * float)) = │
00:00:54 #8014 [Verbose] > │ match v4 with │
00:00:54 #8015 [Verbose] > │ | US1_0(v7, v8) -> (* ExternalForce *) │
00:00:54 #8016 [Verbose] > │ let v9 : bool = v0 = v7 │
00:00:54 #8017 [Verbose] > │ if v9 then │
00:00:54 #8018 [Verbose] > │ v8 │
00:00:54 #8019 [Verbose] > │ else │
00:00:54 #8020 [Verbose] > │ closure145() │
00:00:54 #8021 [Verbose] > │ | US1_1(v12, v13, v14) -> (* InternalForce *) │
00:00:54 #8022 [Verbose] > │ let v15 : bool = v0 = v12 │
00:00:54 #8023 [Verbose] > │ let v49 : US2 = │
00:00:54 #8024 [Verbose] > │ if v15 then │
00:00:54 #8025 [Verbose] > │ let v16 : US3 = method9(v13, v1) │
00:00:54 #8026 [Verbose] > │ match v16 with │
00:00:54 #8027 [Verbose] > │ | US3_0 -> (* None *) │
00:00:54 #8028 [Verbose] > │ US2_0 │
00:00:54 #8029 [Verbose] > │ | US3_1(v17, v18, v19, v20, v21, v22, v23, v24, v25) │
00:00:54 #8030 [Verbose] > │ -> (* Some *) │
00:00:54 #8031 [Verbose] > │ let v26 : (struct (float * float * float * float │
00:00:54 #8032 [Verbose] > │ * float * float * float * float * float) -> struct (float * float * float)) │
00:00:54 #8033 [Verbose] > │ = v14 struct (v17, v18, v19, v20, v21, v22, v23, v24, v25) │
00:00:54 #8034 [Verbose] > │ US2_1(v26) │
00:00:54 #8035 [Verbose] > │ else │
00:00:54 #8036 [Verbose] > │ let v31 : bool = v0 = v13 │
00:00:54 #8037 [Verbose] > │ if v31 then │
00:00:54 #8038 [Verbose] > │ let v32 : US3 = method9(v12, v1) │
00:00:54 #8039 [Verbose] > │ match v32 with │
00:00:54 #8040 [Verbose] > │ | US3_0 -> (* None *) │
00:00:54 #8041 [Verbose] > │ US2_0 │
00:00:54 #8042 [Verbose] > │ | US3_1(v33, v34, v35, v36, v37, v38, v39, v40, │
00:00:54 #8043 [Verbose] > │ v41) -> (* Some *) │
00:00:54 #8044 [Verbose] > │ let v42 : (struct (float * float * float * │
00:00:54 #8045 [Verbose] > │ float * float * float * float * float * float) -> struct (float * float * │
00:00:54 #8046 [Verbose] > │ float)) = v14 struct (v33, v34, v35, v36, v37, v38, v39, v40, v41) │
00:00:54 #8047 [Verbose] > │ US2_1(v42) │
00:00:54 #8048 [Verbose] > │ else │
00:00:54 #8049 [Verbose] > │ US2_0 │
00:00:54 #8050 [Verbose] > │ match v49 with │
00:00:54 #8051 [Verbose] > │ | US2_0 -> (* None *) │
00:00:54 #8052 [Verbose] > │ closure146() │
00:00:54 #8053 [Verbose] > │ | US2_1(v50) -> (* Some *) │
00:00:54 #8054 [Verbose] > │ v50 │
00:00:54 #8055 [Verbose] > │ UH6_0(v55, v6) │
00:00:54 #8056 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:00:54 #8057 [Verbose] > │ v3 │
00:00:54 #8058 [Verbose] > │ and method10 (v0 : float, v1 : float, v2 : float, v3 : float, v4 : float, v5 │
00:00:54 #8059 [Verbose] > │ : float, v6 : float, v7 : float, v8 : float, v9 : UH6, v10 : UH7) : UH7 = │
00:00:54 #8060 [Verbose] > │ match v9 with │
00:00:54 #8061 [Verbose] > │ | UH6_0(v11, v12) -> (* Cons *) │
00:00:54 #8062 [Verbose] > │ let v13 : UH7 = method10(v0, v1, v2, v3, v4, v5, v6, v7, v8, v12, │
00:00:54 #8063 [Verbose] > │ v10) │
00:00:54 #8064 [Verbose] > │ let struct (v14 : float, v15 : float, v16 : float) = v11 struct (v0, │
00:00:54 #8065 [Verbose] > │ v1, v2, v3, v4, v5, v6, v7, v8) │
00:00:54 #8066 [Verbose] > │ UH7_0(v14, v15, v16, v13) │
00:00:54 #8067 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:00:54 #8068 [Verbose] > │ v10 │
00:00:54 #8069 [Verbose] > │ and method11 (v0 : UH7, v1 : float, v2 : float, v3 : float) : struct (float │
00:00:54 #8070 [Verbose] > │ * float * float) = │
00:00:54 #8071 [Verbose] > │ match v0 with │
00:00:54 #8072 [Verbose] > │ | UH7_0(v4, v5, v6, v7) -> (* Cons *) │
00:00:54 #8073 [Verbose] > │ let v8 : float = v1 + v4 │
00:00:54 #8074 [Verbose] > │ let v9 : float = v2 + v5 │
00:00:54 #8075 [Verbose] > │ let v10 : float = v3 + v6 │
00:00:54 #8076 [Verbose] > │ method11(v7, v8, v9, v10) │
00:00:54 #8077 [Verbose] > │ | UH7_1 -> (* Nil *) │
00:00:54 #8078 [Verbose] > │ struct (v1, v2, v3) │
00:00:54 #8079 [Verbose] > │ and closure147 (v0 : UH3) () : UH3 = │
00:00:54 #8080 [Verbose] > │ v0 │
00:00:54 #8081 [Verbose] > │ and method7 (v0 : UH4, v1 : UH1, v2 : UH5, v3 : UH3) : UH3 = │
00:00:54 #8082 [Verbose] > │ match v2 with │
00:00:54 #8083 [Verbose] > │ | UH5_0(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> (* │
00:00:54 #8084 [Verbose] > │ StreamCons *) │
00:00:54 #8085 [Verbose] > │ let v15 : UH5 = v14 () │
00:00:54 #8086 [Verbose] > │ let v16 : UH3 = method7(v0, v1, v15, v3) │
00:00:54 #8087 [Verbose] > │ let v17 : UH6 = UH6_1 │
00:00:54 #8088 [Verbose] > │ let v18 : UH6 = method8(v4, v1, v0, v17) │
00:00:54 #8089 [Verbose] > │ let v19 : UH7 = UH7_1 │
00:00:54 #8090 [Verbose] > │ let v20 : UH7 = method10(v5, v6, v7, v8, v9, v10, v11, v12, v13, │
00:00:54 #8091 [Verbose] > │ v18, v19) │
00:00:54 #8092 [Verbose] > │ let v21 : float = 0.0 │
00:00:54 #8093 [Verbose] > │ let v22 : float = 0.0 │
00:00:54 #8094 [Verbose] > │ let v23 : float = 0.0 │
00:00:54 #8095 [Verbose] > │ let struct (v24 : float, v25 : float, v26 : float) = method11(v20, │
00:00:54 #8096 [Verbose] > │ v21, v22, v23) │
00:00:54 #8097 [Verbose] > │ let v27 : float = v24 / v6 │
00:00:54 #8098 [Verbose] > │ let v28 : float = v25 / v6 │
00:00:54 #8099 [Verbose] > │ let v29 : float = v26 / v6 │
00:00:54 #8100 [Verbose] > │ let v30 : (unit -> UH3) = closure147(v16) │
00:00:54 #8101 [Verbose] > │ UH3_0(0.0, 0.0, v11, v12, v13, 1.0, v27, v28, v29, v30) │
00:00:54 #8102 [Verbose] > │ | UH5_1 -> (* StreamNil *) │
00:00:54 #8103 [Verbose] > │ v3 │
00:00:54 #8104 [Verbose] > │ and closure142 (v0 : UH4) (v1 : UH1) : UH3 = │
00:00:54 #8105 [Verbose] > │ let v2 : UH5 = UH5_1 │
00:00:54 #8106 [Verbose] > │ let v3 : int32 = 0 │
00:00:54 #8107 [Verbose] > │ let struct (v4 : UH5, v5 : int32) = method5(v1, v2, v3) │
00:00:54 #8108 [Verbose] > │ let v6 : UH5 = UH5_1 │
00:00:54 #8109 [Verbose] > │ let v7 : UH5 = method6(v4, v6) │
00:00:54 #8110 [Verbose] > │ let v8 : UH3 = UH3_1 │
00:00:54 #8111 [Verbose] > │ let v9 : UH3 = method7(v0, v1, v7, v8) │
00:00:54 #8112 [Verbose] > │ v9 │
00:00:54 #8113 [Verbose] > │ and closure148 (v0 : (UH1 -> UH1), v1 : UH1, v2 : UH1) () : UH8 = │
00:00:54 #8114 [Verbose] > │ let v3 : UH1 = v0 v2 │
00:00:54 #8115 [Verbose] > │ let v4 : (unit -> UH8) = closure148(v0, v1, v3) │
00:00:54 #8116 [Verbose] > │ UH8_0(v2, v4) │
00:00:54 #8117 [Verbose] > │ and method12 (v0 : float, v1 : UH8) : US4 = │
00:00:54 #8118 [Verbose] > │ match v1 with │
00:00:54 #8119 [Verbose] > │ | UH8_0(v2, v3) -> (* StreamCons *) │
00:00:54 #8120 [Verbose] > │ let v4 : bool = v0 <= 0.0 │
00:00:54 #8121 [Verbose] > │ if v4 then │
00:00:54 #8122 [Verbose] > │ US4_1(v2) │
00:00:54 #8123 [Verbose] > │ else │
00:00:54 #8124 [Verbose] > │ let v6 : float = v0 - 1.0 │
00:00:54 #8125 [Verbose] > │ let v7 : UH8 = v3 () │
00:00:54 #8126 [Verbose] > │ method12(v6, v7) │
00:00:54 #8127 [Verbose] > │ | UH8_1 -> (* StreamNil *) │
00:00:54 #8128 [Verbose] > │ US4_0 │
00:00:54 #8129 [Verbose] > │ and closure149 (v0 : UH9) () : UH9 = │
00:00:54 #8130 [Verbose] > │ v0 │
00:00:54 #8131 [Verbose] > │ and method13 (v0 : UH1, v1 : UH9) : UH9 = │
00:00:54 #8132 [Verbose] > │ match v0 with │
00:00:54 #8133 [Verbose] > │ | UH1_0(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> (* StreamCons *) │
00:00:54 #8134 [Verbose] > │ let v12 : UH1 = v11 () │
00:00:54 #8135 [Verbose] > │ let v13 : UH9 = method13(v12, v1) │
00:00:54 #8136 [Verbose] > │ let v14 : (unit -> UH9) = closure149(v13) │
00:00:54 #8137 [Verbose] > │ UH9_0(v4, v5, v6, v14) │
00:00:54 #8138 [Verbose] > │ | UH1_1 -> (* StreamNil *) │
00:00:54 #8139 [Verbose] > │ v1 │
00:00:54 #8140 [Verbose] > │ and method14 (v0 : UH9, v1 : UH7) : UH7 = │
00:00:54 #8141 [Verbose] > │ match v0 with │
00:00:54 #8142 [Verbose] > │ | UH9_0(v2, v3, v4, v5) -> (* StreamCons *) │
00:00:54 #8143 [Verbose] > │ let v6 : UH9 = v5 () │
00:00:54 #8144 [Verbose] > │ let v7 : UH7 = method14(v6, v1) │
00:00:54 #8145 [Verbose] > │ UH7_0(v2, v3, v4, v7) │
00:00:54 #8146 [Verbose] > │ | UH9_1 -> (* StreamNil *) │
00:00:54 #8147 [Verbose] > │ v1 │
00:00:54 #8148 [Verbose] > │ and method15 (v0 : UH7, v1 : UH7) : UH7 = │
00:00:54 #8149 [Verbose] > │ match v0 with │
00:00:54 #8150 [Verbose] > │ | UH7_0(v2, v3, v4, v5) -> (* Cons *) │
00:00:54 #8151 [Verbose] > │ let v6 : UH7 = method15(v5, v1) │
00:00:54 #8152 [Verbose] > │ UH7_0(v2, v3, v4, v6) │
00:00:54 #8153 [Verbose] > │ | UH7_1 -> (* Nil *) │
00:00:54 #8154 [Verbose] > │ v1 │
00:00:54 #8155 [Verbose] > │ and method16 (v0 : UH7, v1 : UH10) : UH10 = │
00:00:54 #8156 [Verbose] > │ match v0 with │
00:00:54 #8157 [Verbose] > │ | UH7_0(v2, v3, v4, v5) -> (* Cons *) │
00:00:54 #8158 [Verbose] > │ let v6 : UH10 = method16(v5, v1) │
00:00:54 #8159 [Verbose] > │ UH10_0(v2, v3, v6) │
00:00:54 #8160 [Verbose] > │ | UH7_1 -> (* Nil *) │
00:00:54 #8161 [Verbose] > │ v1 │
00:00:54 #8162 [Verbose] > │ and closure150 (v0 : UH11) () : UH11 = │
00:00:54 #8163 [Verbose] > │ v0 │
00:00:54 #8164 [Verbose] > │ and method17 (v0 : UH10, v1 : UH11) : UH11 = │
00:00:54 #8165 [Verbose] > │ match v0 with │
00:00:54 #8166 [Verbose] > │ | UH10_0(v2, v3, v4) -> (* Cons *) │
00:00:54 #8167 [Verbose] > │ let v5 : UH11 = method17(v4, v1) │
00:00:54 #8168 [Verbose] > │ let v6 : (unit -> UH11) = closure150(v5) │
00:00:54 #8169 [Verbose] > │ UH11_0(v2, v3, v6) │
00:00:54 #8170 [Verbose] > │ | UH10_1 -> (* Nil *) │
00:00:54 #8171 [Verbose] > │ v1 │
00:00:54 #8172 [Verbose] > │ and closure151 (v0 : UH0) () : UH0 = │
00:00:54 #8173 [Verbose] > │ v0 │
00:00:54 #8174 [Verbose] > │ and closure152 (v0 : UH0) () : UH0 = │
00:00:54 #8175 [Verbose] > │ v0 │
00:00:54 #8176 [Verbose] > │ and method18 (v0 : UH11) : struct (UH0 * UH0) = │
00:00:54 #8177 [Verbose] > │ match v0 with │
00:00:54 #8178 [Verbose] > │ | UH11_0(v1, v2, v3) -> (* StreamCons *) │
00:00:54 #8179 [Verbose] > │ let v4 : UH11 = v3 () │
00:00:54 #8180 [Verbose] > │ let struct (v5 : UH0, v6 : UH0) = method18(v4) │
00:00:54 #8181 [Verbose] > │ let v7 : (unit -> UH0) = closure151(v5) │
00:00:54 #8182 [Verbose] > │ let v8 : UH0 = UH0_0(v1, v7) │
00:00:54 #8183 [Verbose] > │ let v9 : (unit -> UH0) = closure152(v6) │
00:00:54 #8184 [Verbose] > │ let v10 : UH0 = UH0_0(v2, v9) │
00:00:54 #8185 [Verbose] > │ struct (v8, v10) │
00:00:54 #8186 [Verbose] > │ | UH11_1 -> (* StreamNil *) │
00:00:54 #8187 [Verbose] > │ let v11 : UH0 = UH0_1 │
00:00:54 #8188 [Verbose] > │ let v12 : UH0 = UH0_1 │
00:00:54 #8189 [Verbose] > │ struct (v11, v12) │
00:00:54 #8190 [Verbose] > │ and method19 (v0 : UH0, v1 : UH12) : UH12 = │
00:00:54 #8191 [Verbose] > │ match v0 with │
00:00:54 #8192 [Verbose] > │ | UH0_0(v2, v3) -> (* StreamCons *) │
00:00:54 #8193 [Verbose] > │ let v4 : UH0 = v3 () │
00:00:54 #8194 [Verbose] > │ let v5 : UH12 = method19(v4, v1) │
00:00:54 #8195 [Verbose] > │ UH12_0(v2, v5) │
00:00:54 #8196 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:54 #8197 [Verbose] > │ v1 │
00:00:54 #8198 [Verbose] > │ and method21 (v0 : UH12, v1 : int32) : int32 = │
00:00:54 #8199 [Verbose] > │ match v0 with │
00:00:54 #8200 [Verbose] > │ | UH12_0(v2, v3) -> (* Cons *) │
00:00:54 #8201 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:00:54 #8202 [Verbose] > │ method21(v3, v4) │
00:00:54 #8203 [Verbose] > │ | UH12_1 -> (* Nil *) │
00:00:54 #8204 [Verbose] > │ v1 │
00:00:54 #8205 [Verbose] > │ and method22 (v0 : (float []), v1 : UH12, v2 : int32) : int32 = │
00:00:54 #8206 [Verbose] > │ match v1 with │
00:00:54 #8207 [Verbose] > │ | UH12_0(v3, v4) -> (* Cons *) │
00:00:54 #8208 [Verbose] > │ v0.[int v2] <- v3 │
00:00:54 #8209 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:00:54 #8210 [Verbose] > │ method22(v0, v4, v5) │
00:00:54 #8211 [Verbose] > │ | UH12_1 -> (* Nil *) │
00:00:54 #8212 [Verbose] > │ v2 │
00:00:54 #8213 [Verbose] > │ and method20 (v0 : UH12) : (float []) = │
00:00:54 #8214 [Verbose] > │ let v1 : int32 = 0 │
00:00:54 #8215 [Verbose] > │ let v2 : int32 = method21(v0, v1) │
00:00:54 #8216 [Verbose] > │ let v3 : (float []) = Array.zeroCreate<float> (v2) │
00:00:54 #8217 [Verbose] > │ let v4 : int32 = 0 │
00:00:54 #8218 [Verbose] > │ let v5 : int32 = method22(v3, v0, v4) │
00:00:54 #8219 [Verbose] > │ v3 │
00:00:54 #8220 [Verbose] > │ and closure153 (v0 : UH2) () : UH2 = │
00:00:54 #8221 [Verbose] > │ v0 │
00:00:54 #8222 [Verbose] > │ and method1 (v0 : UH1, v1 : UH0, v2 : UH2) : UH2 = │
00:00:54 #8223 [Verbose] > │ match v1 with │
00:00:54 #8224 [Verbose] > │ | UH0_0(v3, v4) -> (* StreamCons *) │
00:00:54 #8225 [Verbose] > │ let v5 : UH0 = v4 () │
00:00:54 #8226 [Verbose] > │ let v6 : UH2 = method1(v0, v5, v2) │
00:00:54 #8227 [Verbose] > │ let v7 : ((UH1 -> UH3) -> (UH1 -> UH1)) = method2() │
00:00:54 #8228 [Verbose] > │ let v8 : UH4 = method4() │
00:00:54 #8229 [Verbose] > │ let v9 : (UH1 -> UH3) = closure142(v8) │
00:00:54 #8230 [Verbose] > │ let v10 : (UH1 -> UH1) = v7 v9 │
00:00:54 #8231 [Verbose] > │ let v11 : UH1 = v10 v0 │
00:00:54 #8232 [Verbose] > │ let v12 : (unit -> UH8) = closure148(v10, v0, v11) │
00:00:54 #8233 [Verbose] > │ let v13 : UH8 = UH8_0(v0, v12) │
00:00:54 #8234 [Verbose] > │ let v14 : US4 = method12(v3, v13) │
00:00:54 #8235 [Verbose] > │ let v18 : UH1 = │
00:00:54 #8236 [Verbose] > │ match v14 with │
00:00:54 #8237 [Verbose] > │ | US4_0 -> (* None *) │
00:00:54 #8238 [Verbose] > │ failwith<UH1> "Option does not have a value." │
00:00:54 #8239 [Verbose] > │ | US4_1(v15) -> (* Some *) │
00:00:54 #8240 [Verbose] > │ v15 │
00:00:54 #8241 [Verbose] > │ let v19 : UH9 = UH9_1 │
00:00:54 #8242 [Verbose] > │ let v20 : UH9 = method13(v18, v19) │
00:00:54 #8243 [Verbose] > │ let v21 : UH7 = UH7_1 │
00:00:54 #8244 [Verbose] > │ let v22 : UH7 = method14(v20, v21) │
00:00:54 #8245 [Verbose] > │ let v23 : float = 0.65 │
00:00:54 #8246 [Verbose] > │ let v24 : float = 0.0 │
00:00:54 #8247 [Verbose] > │ let v25 : float = 0.0 │
00:00:54 #8248 [Verbose] > │ let v26 : UH7 = UH7_1 │
00:00:54 #8249 [Verbose] > │ let v27 : UH7 = UH7_0(v23, v24, v25, v26) │
00:00:54 #8250 [Verbose] > │ let v28 : UH7 = method15(v22, v27) │
00:00:54 #8251 [Verbose] > │ let v29 : UH10 = UH10_1 │
00:00:54 #8252 [Verbose] > │ let v30 : UH10 = method16(v28, v29) │
00:00:54 #8253 [Verbose] > │ let v31 : UH11 = UH11_1 │
00:00:54 #8254 [Verbose] > │ let v32 : UH11 = method17(v30, v31) │
00:00:54 #8255 [Verbose] > │ let struct (v33 : UH0, v34 : UH0) = method18(v32) │
00:00:54 #8256 [Verbose] > │ let v35 : UH12 = UH12_1 │
00:00:54 #8257 [Verbose] > │ let v36 : UH12 = method19(v33, v35) │
00:00:54 #8258 [Verbose] > │ let v37 : float = 0.0 │
00:00:54 #8259 [Verbose] > │ let v38 : UH12 = UH12_0(v37, v36) │
00:00:54 #8260 [Verbose] > │ let v39 : (float []) = method20(v38) │
00:00:54 #8261 [Verbose] > │ let v40 : UH12 = UH12_1 │
00:00:54 #8262 [Verbose] > │ let v41 : UH12 = method19(v34, v40) │
00:00:54 #8263 [Verbose] > │ let v42 : float = 0.0 │
00:00:54 #8264 [Verbose] > │ let v43 : UH12 = UH12_0(v42, v41) │
00:00:54 #8265 [Verbose] > │ let v44 : (float []) = method20(v43) │
00:00:54 #8266 [Verbose] > │ let v45 : (unit -> UH2) = closure153(v6) │
00:00:54 #8267 [Verbose] > │ UH2_0(v39, v44, v45) │
00:00:54 #8268 [Verbose] > │ | UH0_1 -> (* StreamNil *) │
00:00:54 #8269 [Verbose] > │ v2 │
00:00:54 #8270 [Verbose] > │ and closure154 (v0 : UH13) () : UH13 = │
00:00:54 #8271 [Verbose] > │ v0 │
00:00:54 #8272 [Verbose] > │ and method23 (v0 : UH2, v1 : UH13, v2 : int32) : struct (UH13 * int32) = │
00:00:54 #8273 [Verbose] > │ match v0 with │
00:00:54 #8274 [Verbose] > │ | UH2_0(v3, v4, v5) -> (* StreamCons *) │
00:00:54 #8275 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:00:54 #8276 [Verbose] > │ let v7 : UH2 = v5 () │
00:00:54 #8277 [Verbose] > │ let v8 : (unit -> UH13) = closure154(v1) │
00:00:54 #8278 [Verbose] > │ let v9 : UH13 = UH13_0(v2, v3, v4, v8) │
00:00:54 #8279 [Verbose] > │ method23(v7, v9, v6) │
00:00:54 #8280 [Verbose] > │ | UH2_1 -> (* StreamNil *) │
00:00:54 #8281 [Verbose] > │ struct (v1, v2) │
00:00:54 #8282 [Verbose] > │ and closure155 (v0 : UH13) () : UH13 = │
00:00:54 #8283 [Verbose] > │ v0 │
00:00:54 #8284 [Verbose] > │ and method24 (v0 : UH13, v1 : UH13) : UH13 = │
00:00:54 #8285 [Verbose] > │ match v0 with │
00:00:54 #8286 [Verbose] > │ | UH13_0(v2, v3, v4, v5) -> (* StreamCons *) │
00:00:54 #8287 [Verbose] > │ let v6 : UH13 = v5 () │
00:00:54 #8288 [Verbose] > │ let v7 : (unit -> UH13) = closure155(v1) │
00:00:54 #8289 [Verbose] > │ let v8 : UH13 = UH13_0(v2, v3, v4, v7) │
00:00:54 #8290 [Verbose] > │ method24(v6, v8) │
00:00:54 #8291 [Verbose] > │ | UH13_1 -> (* StreamNil *) │
00:00:54 #8292 [Verbose] > │ v1 │
00:00:54 #8293 [Verbose] > │ and method26 (v0 : (struct (string * (float []) * (float [])) [])) : (struct │
00:00:54 #8294 [Verbose] > │ (string * (float []) * (float [])) []) = │
00:00:54 #8295 [Verbose] > │ v0 │
00:00:54 #8296 [Verbose] > │ and closure156 (v0 : UH14) () : UH14 = │
00:00:54 #8297 [Verbose] > │ v0 │
00:00:54 #8298 [Verbose] > │ and method25 (v0 : UH13, v1 : UH14) : UH14 = │
00:00:54 #8299 [Verbose] > │ match v0 with │
00:00:54 #8300 [Verbose] > │ | UH13_0(v2, v3, v4, v5) -> (* StreamCons *) │
00:00:54 #8301 [Verbose] > │ let v6 : UH13 = v5 () │
00:00:54 #8302 [Verbose] > │ let v7 : UH14 = method25(v6, v1) │
00:00:54 #8303 [Verbose] > │ let v8 : string = $"{v2}" │
00:00:54 #8304 [Verbose] > │ let v9 : (struct (string * (float []) * (float [])) []) = [|struct │
00:00:54 #8305 [Verbose] > │ (v8, v3, v4)|] │
00:00:54 #8306 [Verbose] > │ let v10 : (struct (string * (float []) * (float [])) []) = │
00:00:54 #8307 [Verbose] > │ method26(v9) │
00:00:54 #8308 [Verbose] > │ let v11 : string = "wave" │
00:00:54 #8309 [Verbose] > │ let v12 : string = "position (m)" │
00:00:54 #8310 [Verbose] > │ let v13 : string = "displacement (m)" │
00:00:54 #8311 [Verbose] > │ let v14 : (unit -> UH14) = closure156(v7) │
00:00:54 #8312 [Verbose] > │ UH14_0(v11, v12, v13, v10, v14) │
00:00:54 #8313 [Verbose] > │ | UH13_1 -> (* StreamNil *) │
00:00:54 #8314 [Verbose] > │ v1 │
00:00:54 #8315 [Verbose] > │ and method27 (v0 : UH14, v1 : UH15) : UH15 = │
00:00:54 #8316 [Verbose] > │ match v0 with │
00:00:54 #8317 [Verbose] > │ | UH14_0(v2, v3, v4, v5, v6) -> (* StreamCons *) │
00:00:54 #8318 [Verbose] > │ let v7 : UH14 = v6 () │
00:00:54 #8319 [Verbose] > │ let v8 : UH15 = method27(v7, v1) │
00:00:54 #8320 [Verbose] > │ UH15_0(v2, v3, v4, v5, v8) │
00:00:54 #8321 [Verbose] > │ | UH14_1 -> (* StreamNil *) │
00:00:54 #8322 [Verbose] > │ v1 │
00:00:54 #8323 [Verbose] > │ and method29 (v0 : UH15, v1 : int32) : int32 = │
00:00:54 #8324 [Verbose] > │ match v0 with │
00:00:54 #8325 [Verbose] > │ | UH15_0(v2, v3, v4, v5, v6) -> (* Cons *) │
00:00:54 #8326 [Verbose] > │ let v7 : int32 = v1 + 1 │
00:00:54 #8327 [Verbose] > │ method29(v6, v7) │
00:00:54 #8328 [Verbose] > │ | UH15_1 -> (* Nil *) │
00:00:54 #8329 [Verbose] > │ v1 │
00:00:54 #8330 [Verbose] > │ and method30 (v0 : (struct (string * string * string * (struct (string * │
00:00:54 #8331 [Verbose] > │ (float []) * (float [])) [])) []), v1 : UH15, v2 : int32) : int32 = │
00:00:54 #8332 [Verbose] > │ match v1 with │
00:00:54 #8333 [Verbose] > │ | UH15_0(v3, v4, v5, v6, v7) -> (* Cons *) │
00:00:54 #8334 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5, v6) │
00:00:54 #8335 [Verbose] > │ let v8 : int32 = v2 + 1 │
00:00:54 #8336 [Verbose] > │ method30(v0, v7, v8) │
00:00:54 #8337 [Verbose] > │ | UH15_1 -> (* Nil *) │
00:00:54 #8338 [Verbose] > │ v2 │
00:00:54 #8339 [Verbose] > │ and method28 (v0 : UH15) : (struct (string * string * string * (struct │
00:00:54 #8340 [Verbose] > │ (string * (float []) * (float [])) [])) []) = │
00:00:54 #8341 [Verbose] > │ let v1 : int32 = 0 │
00:00:54 #8342 [Verbose] > │ let v2 : int32 = method29(v0, v1) │
00:00:54 #8343 [Verbose] > │ let v3 : (struct (string * string * string * (struct (string * (float [ │
00:00:54 #8344 [Verbose] > │ ]) * (float [])) [])) []) = Array.zeroCreate<struct (string * string * │
00:00:54 #8345 [Verbose] > │ string * (struct (string * (float []) * (float [])) []))> (v2) │
00:00:54 #8346 [Verbose] > │ let v4 : int32 = 0 │
00:00:54 #8347 [Verbose] > │ let v5 : int32 = method30(v3, v0, v4) │
00:00:54 #8348 [Verbose] > │ v3 │
00:00:54 #8349 [Verbose] > │ and method0 () : (struct (string * string * string * (struct (string * │
00:00:54 #8350 [Verbose] > │ (float []) * (float [])) [])) []) = │
00:00:54 #8351 [Verbose] > │ let v0 : float = 0.0 │
00:00:54 #8352 [Verbose] > │ let v1 : (unit -> UH0) = closure0() │
00:00:54 #8353 [Verbose] > │ let v2 : UH0 = UH0_0(v0, v1) │
00:00:55 #8354 [Verbose] > │ let v3 : float = 0.0 │
00:00:55 #8355 [Verbose] > │ let v4 : float = 8.422578125E-06 │
00:00:55 #8356 [Verbose] > │ let v5 : float = 0.01 │
00:00:55 #8357 [Verbose] > │ let v6 : float = 0.0007224452478461068 │
00:00:55 #8358 [Verbose] > │ let v7 : float = 0.0 │
00:00:55 #8359 [Verbose] > │ let v8 : float = 0.0 │
00:00:55 #8360 [Verbose] > │ let v9 : float = 0.0 │
00:00:55 #8361 [Verbose] > │ let v10 : float = 0.0 │
00:00:55 #8362 [Verbose] > │ let v11 : float = 0.0 │
00:00:55 #8363 [Verbose] > │ let v12 : (unit -> UH1) = closure66() │
00:00:55 #8364 [Verbose] > │ let v13 : UH1 = UH1_0(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) │
00:00:55 #8365 [Verbose] > │ let v14 : UH2 = UH2_1 │
00:00:55 #8366 [Verbose] > │ let v15 : UH2 = method1(v13, v2, v14) │
00:00:55 #8367 [Verbose] > │ let v16 : UH13 = UH13_1 │
00:00:55 #8368 [Verbose] > │ let v17 : int32 = 0 │
00:00:55 #8369 [Verbose] > │ let struct (v18 : UH13, v19 : int32) = method23(v15, v16, v17) │
00:00:55 #8370 [Verbose] > │ let v20 : UH13 = UH13_1 │
00:00:55 #8371 [Verbose] > │ let v21 : UH13 = method24(v18, v20) │
00:00:55 #8372 [Verbose] > │ let v22 : UH14 = UH14_1 │
00:00:55 #8373 [Verbose] > │ let v23 : UH14 = method25(v21, v22) │
00:00:55 #8374 [Verbose] > │ let v24 : UH15 = UH15_1 │
00:00:55 #8375 [Verbose] > │ let v25 : UH15 = method27(v23, v24) │
00:00:55 #8376 [Verbose] > │ method28(v25) │
00:00:55 #8377 [Verbose] > │ method0() │
00:00:55 #8378 [Verbose] > │ │
00:00:55 #8379 [Verbose] > │ │
00:00:55 #8380 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:55 #8381 [Verbose] >
00:00:55 #8382 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:55 #8383 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:55 #8384 [Verbose] > │ ## end │
00:00:55 #8385 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:57 #8386 [Verbose] > [NbConvertApp] Converting notebook physics.dib.ipynb to html
00:00:57 #8387 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:57 #8388 [Verbose] > validate(nb)
00:00:57 #8389 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:57 #8390 [Verbose] > return _pygments_highlight(
00:01:01 #8391 [Verbose] > [NbConvertApp] Writing 2736198 bytes to physics.dib.html
00:01:03 #8392 [Debug] executeAsync / exitCode: 0 / output.Length: 580151
00:01:03 #8393 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: listm'.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: math.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: benchmark.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: am'.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: testing.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: optionm'.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: console.dib
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: common.dib
00:00:00 #5 [Debug] parseDibCode / output: Spi / file: benchmark.dib
00:00:00 #7 [Debug] parseDibCode / output: Spi / file: optionm'.dib
00:00:00 #5 [Debug] parseDibCode / output: Spi / file: console.dib
00:00:00 #8 [Debug] parseDibCode / output: Spi / file: listm'.dib
00:00:00 #5 [Debug] parseDibCode / output: Spi / file: testing.dib
00:00:00 #6 [Debug] parseDibCode / output: Spi / file: math.dib
00:00:00 #5 [Debug] parseDibCode / output: Spi / file: am'.dib
00:00:00 #7 [Debug] parseDibCode / output: Spi / file: common.dib
00:00:00 #10 [Debug] writeDibCode / output: Spi / path: stream.dib
00:00:00 #10 [Debug] writeDibCode / output: Spi / path: seq.dib
00:00:00 #10 [Debug] writeDibCode / output: Spi / path: rust.dib
00:00:00 #10 [Debug] writeDibCode / output: Spi / path: physics.dib
00:00:00 #10 [Debug] writeDibCode / output: Spi / path: util.dib
00:00:00 #11 [Debug] parseDibCode / output: Spi / file: stream.dib
00:00:00 #12 [Debug] parseDibCode / output: Spi / file: seq.dib
00:00:00 #15 [Debug] parseDibCode / output: Spi / file: util.dib
00:00:00 #14 [Debug] parseDibCode / output: Spi / file: physics.dib
00:00:00 #13 [Debug] parseDibCode / output: Spi / file: rust.dib
In [ ]:
{ . "$ScriptDir/../lib/math/build.ps1" } | Invoke-Block
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 math.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:02 #3 [Verbose] >
00:00:02 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:02 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:02 #6 [Verbose] > │ # math │
00:00:02 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:02 #8 [Verbose] >
00:00:02 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:02 #10 [Verbose] > // // test
00:00:02 #11 [Verbose] >
00:00:02 #12 [Verbose] > open testing
00:00:02 #13 [Verbose] > open rust_operators
00:00:09 #14 [Verbose] >
00:00:09 #15 [Verbose] > ╭─[ 6.78s - stdout ]───────────────────────────────────────────────────────────╮
00:00:09 #16 [Verbose] > │ () │
00:00:09 #17 [Verbose] > │ │
00:00:09 #18 [Verbose] > │ │
00:00:09 #19 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #20 [Verbose] >
00:00:09 #21 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #22 [Verbose] > inl types () =
00:00:09 #23 [Verbose] > global "[[<Fable.Core.Erase;
00:00:09 #24 [Verbose] > Fable.Core.Emit(\"num_complex::Complex<$0>\")>]] type num_complex_Complex<'T> =
00:00:09 #25 [Verbose] > class end"
00:00:09 #26 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"pyo3::types::PyModule\")>]]
00:00:09 #27 [Verbose] > type pyo3_types_PyModule = class end"
00:00:09 #28 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"pyo3::Bound<$0>\")>]] type
00:00:09 #29 [Verbose] > pyo3_Bound<'T> = class end"
00:00:09 #30 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"pyo3::Python\")>]] type
00:00:09 #31 [Verbose] > pyo3_Python = class end"
00:00:09 #32 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"pyo3::PyAny\")>]] type
00:00:09 #33 [Verbose] > pyo3_PyAny = class end"
00:00:09 #34 [Verbose] > global "[[<Fable.Core.Erase; Fable.Core.Emit(\"pyo3::PyErr\")>]] type
00:00:09 #35 [Verbose] > pyo3_PyErr = class end"
00:00:09 #36 [Verbose] >
00:00:09 #37 [Verbose] > ╭─[ 289.64ms - stdout ]────────────────────────────────────────────────────────╮
00:00:09 #38 [Verbose] > │ () │
00:00:09 #39 [Verbose] > │ │
00:00:09 #40 [Verbose] > │ │
00:00:09 #41 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:09 #42 [Verbose] >
00:00:09 #43 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:09 #44 [Verbose] > inl types () =
00:00:09 #45 [Verbose] > rust.types ()
00:00:09 #46 [Verbose] > sm'.types ()
00:00:09 #47 [Verbose] > types ()
00:00:10 #48 [Verbose] >
00:00:10 #49 [Verbose] > ╭─[ 264.16ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #50 [Verbose] > │ () │
00:00:10 #51 [Verbose] > │ │
00:00:10 #52 [Verbose] > │ │
00:00:10 #53 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #54 [Verbose] >
00:00:10 #55 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #56 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #57 [Verbose] > │ ## complex │
00:00:10 #58 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #59 [Verbose] >
00:00:10 #60 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #61 [Verbose] > nominal complex t = $"num_complex_Complex<`t>"
00:00:10 #62 [Verbose] > nominal bound t = $"pyo3_Bound<`t>"
00:00:10 #63 [Verbose] > nominal python = $"pyo3_Python"
00:00:10 #64 [Verbose] > nominal pymodule = $"pyo3_types_PyModule"
00:00:10 #65 [Verbose] > nominal pyany = $"pyo3_PyAny"
00:00:10 #66 [Verbose] > nominal pyerr = $"pyo3_PyErr"
00:00:10 #67 [Verbose] >
00:00:10 #68 [Verbose] > inl complex forall t. ((re : t), (im : t)) : complex t =
00:00:10 #69 [Verbose] > inl re = join re
00:00:10 #70 [Verbose] > inl im = join im
00:00:10 #71 [Verbose] > !\($'"num_complex::Complex::new(!re, !im)"')
00:00:10 #72 [Verbose] >
00:00:10 #73 [Verbose] > ╭─[ 324.21ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #74 [Verbose] > │ () │
00:00:10 #75 [Verbose] > │ │
00:00:10 #76 [Verbose] > │ │
00:00:10 #77 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #78 [Verbose] >
00:00:10 #79 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #80 [Verbose] > // // test
00:00:10 #81 [Verbose] > // // rust=
00:00:10 #82 [Verbose] >
00:00:10 #83 [Verbose] > types ()
00:00:10 #84 [Verbose] >
00:00:10 #85 [Verbose] > complex (0f64, 0f64)
00:00:10 #86 [Verbose] > |> sm'.format'
00:00:10 #87 [Verbose] > |> sm'.from_std_string
00:00:10 #88 [Verbose] > |> _assert_eq "0+0i"
00:00:16 #89 [Verbose] >
00:00:16 #90 [Verbose] > ╭─[ 6.14s - return value ]─────────────────────────────────────────────────────╮
00:00:16 #91 [Verbose] > │ .rs output: │
00:00:16 #92 [Verbose] > │ │
00:00:16 #93 [Verbose] > │ │
00:00:16 #94 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #95 [Verbose] >
00:00:16 #96 [Verbose] > ╭─[ 6.15s - stdout ]───────────────────────────────────────────────────────────╮
00:00:16 #97 [Verbose] > │ │
00:00:16 #98 [Verbose] > │ .fsx: │
00:00:16 #99 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] type Func0<'T> = class │
00:00:16 #100 [Verbose] > │ end │
00:00:16 #101 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>] type Func0<'T, 'U> = │
00:00:16 #102 [Verbose] > │ class end │
00:00:16 #103 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>] type Box<'T> = class end │
00:00:16 #104 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>] type Dyn<'T> = class end │
00:00:16 #105 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>] type Fn<'T> = class end │
00:00:16 #106 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn()")>] type FnUnit = class end │
00:00:16 #107 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>] type FnOnce<'T> = │
00:00:16 #108 [Verbose] > │ class end │
00:00:16 #109 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>] type ActionFn2<'T, 'U> = │
00:00:16 #110 [Verbose] > │ class end │
00:00:16 #111 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("impl $0")>] type Impl<'T> = class end │
00:00:16 #112 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("mut $0")>] type Mut<'T> = class end │
00:00:16 #113 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end │
00:00:16 #114 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>] type StaticRef<'T> = │
00:00:16 #115 [Verbose] > │ class end │
00:00:16 #116 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>] type MutCell<'T> = │
00:00:16 #117 [Verbose] > │ class end │
00:00:16 #118 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::any::Any")>] type std_any_Any = │
00:00:16 #119 [Verbose] > │ class end │
00:00:16 #120 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::cell::RefCell<$0>")>] type │
00:00:16 #121 [Verbose] > │ std_cell_RefCell<'T> = class end │
00:00:16 #122 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::pin::Pin<$0>")>] type │
00:00:16 #123 [Verbose] > │ std_pin_Pin<'T> = class end │
00:00:16 #124 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Rc<$0>")>] type std_rc_Rc<'T> │
00:00:16 #125 [Verbose] > │ = class end │
00:00:16 #126 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Weak<$0>")>] type │
00:00:16 #127 [Verbose] > │ std_rc_Weak<'T> = class end │
00:00:16 #128 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>] type │
00:00:16 #129 [Verbose] > │ std_sync_Arc<'T> = class end │
00:00:16 #130 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end │
00:00:16 #131 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("base64::DecodeError")>] type │
00:00:16 #132 [Verbose] > │ base64_DecodeError = class end │
00:00:16 #133 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("borsh::io::Error")>] type │
00:00:16 #134 [Verbose] > │ borsh_io_Error = class end │
00:00:16 #135 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("js_sys::JsString")>] type │
00:00:16 #136 [Verbose] > │ js_sys_JsString = class end │
00:00:16 #137 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Error")>] type │
00:00:16 #138 [Verbose] > │ serde_json_Error = class end │
00:00:16 #139 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Value")>] type │
00:00:16 #140 [Verbose] > │ serde_json_Value = class end │
00:00:16 #141 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_wasm_bindgen::Error")>] type │
00:00:16 #142 [Verbose] > │ serde_wasm_bindgen_Error = class end │
00:00:16 #143 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::str::Utf8Error")>] type │
00:00:16 #144 [Verbose] > │ std_str_Utf8Error = class end │
00:00:16 #145 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type │
00:00:16 #146 [Verbose] > │ std_string_String = class end │
00:00:16 #147 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("num_complex::Complex<$0>")>] type │
00:00:16 #148 [Verbose] > │ num_complex_Complex<'T> = class end │
00:00:16 #149 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::types::PyModule")>] type │
00:00:16 #150 [Verbose] > │ pyo3_types_PyModule = class end │
00:00:16 #151 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Bound<$0>")>] type pyo3_Bound<'T> │
00:00:16 #152 [Verbose] > │ = class end │
00:00:16 #153 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Python")>] type pyo3_Python = │
00:00:16 #154 [Verbose] > │ class end │
00:00:16 #155 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::PyAny")>] type pyo3_PyAny = class │
00:00:16 #156 [Verbose] > │ end │
00:00:16 #157 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::PyErr")>] type pyo3_PyErr = class │
00:00:16 #158 [Verbose] > │ end │
00:00:16 #159 [Verbose] > │ let rec method1 () : float = │
00:00:16 #160 [Verbose] > │ 0.0 │
00:00:16 #161 [Verbose] > │ and method2 () : float = │
00:00:16 #162 [Verbose] > │ 0.0 │
00:00:16 #163 [Verbose] > │ and method3 (v0 : std_string_String) : std_string_String = │
00:00:16 #164 [Verbose] > │ v0 │
00:00:16 #165 [Verbose] > │ and method4 (v0 : bool) : bool = │
00:00:16 #166 [Verbose] > │ v0 │
00:00:16 #167 [Verbose] > │ and method0 () : unit = │
00:00:16 #168 [Verbose] > │ let v0 : float = method1() │
00:00:16 #169 [Verbose] > │ let v1 : float = method2() │
00:00:16 #170 [Verbose] > │ let v2 : string = "num_complex::Complex::new(v0, v1)" │
00:00:16 #171 [Verbose] > │ let v3 : num_complex_Complex<float> = │
00:00:16 #172 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v2 │
00:00:16 #173 [Verbose] > │ let v4 : string = @$"format!(""{{}}"", $0)" │
00:00:16 #174 [Verbose] > │ let v5 : std_string_String = Fable.Core.RustInterop.emitRustExpr v3 v4 │
00:00:16 #175 [Verbose] > │ let v6 : std_string_String = method3(v5) │
00:00:16 #176 [Verbose] > │ let v7 : string = "fable_library_rust::String_::fromString(v6)" │
00:00:16 #177 [Verbose] > │ let v8 : string = Fable.Core.RustInterop.emitRustExpr () v7 │
00:00:16 #178 [Verbose] > │ let v10 : bool = v8 = "0+0i" │
00:00:16 #179 [Verbose] > │ let v12 : bool = │
00:00:16 #180 [Verbose] > │ if v10 then │
00:00:16 #181 [Verbose] > │ v10 │
00:00:16 #182 [Verbose] > │ else │
00:00:16 #183 [Verbose] > │ method4(v10) │
00:00:16 #184 [Verbose] > │ let v13 : string = "0+0i" │
00:00:16 #185 [Verbose] > │ let v14 : string = $"__expect / actual: %A{v8} / expected: %A{v13}" │
00:00:16 #186 [Verbose] > │ let v15 : bool = v12 = false │
00:00:16 #187 [Verbose] > │ if v15 then │
00:00:16 #188 [Verbose] > │ failwith<unit> v14 │
00:00:16 #189 [Verbose] > │ method0() │
00:00:16 #190 [Verbose] > │ │
00:00:16 #191 [Verbose] > │ .rs: │
00:00:16 #192 [Verbose] > │ #![allow(dead_code,)] │
00:00:16 #193 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:16 #194 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:16 #195 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:16 #196 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:16 #197 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:16 #198 [Verbose] > │ #![allow(unused_imports,)] │
00:00:16 #199 [Verbose] > │ #![allow(unused_macros,)] │
00:00:16 #200 [Verbose] > │ #![allow(unused_parens,)] │
00:00:16 #201 [Verbose] > │ #![allow(unused_variables,)] │
00:00:16 #202 [Verbose] > │ mod module_ccfa04bf { │
00:00:16 #203 [Verbose] > │ pub mod Spiral_eval { │
00:00:16 #204 [Verbose] > │ use super::*; │
00:00:16 #205 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:16 #206 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:16 #207 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:16 #208 [Verbose] > │ pub fn method1() -> f64 { 0.0_f64 } │
00:00:16 #209 [Verbose] > │ pub fn method2() -> f64 { 0.0_f64 } │
00:00:16 #210 [Verbose] > │ pub fn method3(v0: std::string::String) -> std::string::String { v0 │
00:00:16 #211 [Verbose] > │ } │
00:00:16 #212 [Verbose] > │ pub fn method4(v0: bool) -> bool { v0 } │
00:00:16 #213 [Verbose] > │ pub fn method0() { │
00:00:16 #214 [Verbose] > │ let v0: f64 = Spiral_eval::method1(); │
00:00:16 #215 [Verbose] > │ let v1: f64 = Spiral_eval::method2(); │
00:00:16 #216 [Verbose] > │ let v3: num_complex::Complex<f64> = │
00:00:16 #217 [Verbose] > │ num_complex::Complex::new(v0, v1); │
00:00:16 #218 [Verbose] > │ let v6: std::string::String = │
00:00:16 #219 [Verbose] > │ Spiral_eval::method3(format!("{}", v3)); │
00:00:16 #220 [Verbose] > │ let v8: string = fable_library_rust::String_::fromString(v6); │
00:00:16 #221 [Verbose] > │ let v10: bool = v8.clone() == string("0+0i"); │
00:00:16 #222 [Verbose] > │ if (if v10 { v10 } else { Spiral_eval::method4(v10) }) == false │
00:00:16 #223 [Verbose] > │ { │
00:00:16 #224 [Verbose] > │ panic!("{}", │
00:00:16 #225 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: {:?}", │
00:00:16 #226 [Verbose] > │ v8, string("0+0i"))); │
00:00:16 #227 [Verbose] > │ } │
00:00:16 #228 [Verbose] > │ } │
00:00:16 #229 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:16 #230 [Verbose] > │ } │
00:00:16 #231 [Verbose] > │ } │
00:00:16 #232 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:16 #233 [Verbose] > │ │
00:00:16 #234 [Verbose] > │ │
00:00:16 #235 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #236 [Verbose] >
00:00:16 #237 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #238 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #239 [Verbose] > │ ## run_test │
00:00:16 #240 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #241 [Verbose] >
00:00:16 #242 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:16 #243 [Verbose] > inl re forall t. (c : complex t) : t =
00:00:16 #244 [Verbose] > !\($'"!c.re"')
00:00:16 #245 [Verbose] >
00:00:16 #246 [Verbose] > inl im forall t. (c : complex t) : t =
00:00:16 #247 [Verbose] > !\($'"!c.im"')
00:00:16 #248 [Verbose] >
00:00:16 #249 [Verbose] > inl complex_unbox forall t. (c : complex t) =
00:00:16 #250 [Verbose] > c |> re, c |> im
00:00:16 #251 [Verbose] >
00:00:16 #252 [Verbose] > inl powc forall t. (s : complex t) (c : complex t) : complex t =
00:00:16 #253 [Verbose] > !\($'"num_complex::Complex::powc(!c, !s)"')
00:00:16 #254 [Verbose] >
00:00:16 #255 [Verbose] > inl complex_sub forall t. (a : complex t) (b : complex t) : complex t =
00:00:16 #256 [Verbose] > !\($'"!a - !b"')
00:00:16 #257 [Verbose] >
00:00:16 #258 [Verbose] > inl complex_mult forall t. (a : complex t) (b : complex t) : complex t =
00:00:16 #259 [Verbose] > !\($'"!a * !b"')
00:00:16 #260 [Verbose] >
00:00:16 #261 [Verbose] > inl complex_div forall t. (a : complex t) (b : complex t) : complex t =
00:00:16 #262 [Verbose] > !\($'"!a / !b"')
00:00:16 #263 [Verbose] >
00:00:16 #264 [Verbose] > inl complex_sin forall t. (c : complex t) : complex t =
00:00:16 #265 [Verbose] > !\($'"!c.sin()"')
00:00:16 #266 [Verbose] >
00:00:16 #267 [Verbose] > inl conj forall t. (c : complex t) : complex t =
00:00:16 #268 [Verbose] > !\($'"!c.conj()"')
00:00:16 #269 [Verbose] >
00:00:16 #270 [Verbose] > inl module_from_code (py : python) (code : string) : resultm.result' (bound
00:00:16 #271 [Verbose] > pymodule) pyerr =
00:00:16 #272 [Verbose] > inl py = join py
00:00:16 #273 [Verbose] > inl code = code |> sm'.as_str
00:00:16 #274 [Verbose] > !\($'"pyo3::types::PyModule::from_code_bound(!py, !code, \\"\\", \\"\\")"')
00:00:16 #275 [Verbose] >
00:00:16 #276 [Verbose] > inl use_pyanymethods () =
00:00:16 #277 [Verbose] > global "Fable.Core.RustInterop.emitRustExpr () \");\nuse
00:00:16 #278 [Verbose] > pyo3::prelude::PyAnyMethods;\n//\""
00:00:16 #279 [Verbose] >
00:00:16 #280 [Verbose] > inl getattr (attr : string) (module : bound pymodule) : resultm.result' (bound
00:00:16 #281 [Verbose] > pyany) pyerr =
00:00:16 #282 [Verbose] > inl attr = attr |> sm'.as_str
00:00:16 #283 [Verbose] > inl module = join module
00:00:16 #284 [Verbose] > use_pyanymethods ()
00:00:16 #285 [Verbose] > !\($'"!module.getattr(!attr)"')
00:00:16 #286 [Verbose] >
00:00:16 #287 [Verbose] > inl call forall t. (args : t) (module : bound pyany) : resultm.result' (bound
00:00:16 #288 [Verbose] > pyany) pyerr =
00:00:16 #289 [Verbose] > inl args = join args
00:00:16 #290 [Verbose] > inl module = join module
00:00:16 #291 [Verbose] > !\($'"pyo3::prelude::PyAnyMethods::call(&!module, (*(*!args).0, ()),
00:00:16 #292 [Verbose] > None)"')
00:00:16 #293 [Verbose] >
00:00:16 #294 [Verbose] > inl extract forall t. (result : bound pyany) : resultm.result' t pyerr =
00:00:16 #295 [Verbose] > inl result = join result
00:00:16 #296 [Verbose] > use_pyanymethods ()
00:00:16 #297 [Verbose] > !\($'"!result.extract()"')
00:00:16 #298 [Verbose] >
00:00:16 #299 [Verbose] > inl eval py code args =
00:00:16 #300 [Verbose] > inl code =
00:00:16 #301 [Verbose] > code
00:00:16 #302 [Verbose] > |> module_from_code py
00:00:16 #303 [Verbose] > |> resultm.unwrap'
00:00:16 #304 [Verbose] > inl fn =
00:00:16 #305 [Verbose] > code
00:00:16 #306 [Verbose] > |> getattr "fn"
00:00:16 #307 [Verbose] > |> fun x => x : _ _ pyerr
00:00:16 #308 [Verbose] > |> resultm.unwrap'
00:00:16 #309 [Verbose] >
00:00:16 #310 [Verbose] > fn
00:00:16 #311 [Verbose] > |> call args
00:00:16 #312 [Verbose] > |> resultm.unwrap'
00:00:16 #313 [Verbose] > |> extract
00:00:16 #314 [Verbose] > |> fun x => x : _ _ pyerr
00:00:16 #315 [Verbose] > |> resultm.unwrap'
00:00:16 #316 [Verbose] > |> complex
00:00:16 #317 [Verbose] > |> Ok
00:00:16 #318 [Verbose] > |> fun x => x : _ _ pyerr
00:00:16 #319 [Verbose] > |> resultm.box
00:00:16 #320 [Verbose] >
00:00:16 #321 [Verbose] > inl gamma_ py s =
00:00:16 #322 [Verbose] > inl code =
00:00:16 #323 [Verbose] > ;[[
00:00:16 #324 [Verbose] > "import mpmath"
00:00:16 #325 [Verbose] > "def fn(s, _):"
00:00:16 #326 [Verbose] > " s = complex(*s)"
00:00:16 #327 [Verbose] > " s = mpmath.gamma(s)"
00:00:16 #328 [Verbose] > " return (s.real, s.imag)"
00:00:16 #329 [Verbose] > ]]
00:00:16 #330 [Verbose] > inl code = (a code : _ i32 _) |> sm'.concat_array_trailing "\n"
00:00:16 #331 [Verbose] >
00:00:16 #332 [Verbose] > inl s = new_pair (s |> re) (s |> im)
00:00:16 #333 [Verbose] > inl args = new_pair s ()
00:00:16 #334 [Verbose] >
00:00:16 #335 [Verbose] > eval py code args
00:00:16 #336 [Verbose] >
00:00:16 #337 [Verbose] > inl zeta_ py s =
00:00:16 #338 [Verbose] > inl code =
00:00:16 #339 [Verbose] > ;[[
00:00:16 #340 [Verbose] > "import mpmath"
00:00:16 #341 [Verbose] > "def fn(s, _):"
00:00:16 #342 [Verbose] > " s = complex(*s)"
00:00:16 #343 [Verbose] > " try:"
00:00:16 #344 [Verbose] > " s = mpmath.zeta(s)"
00:00:16 #345 [Verbose] > " except ValueError as e:"
00:00:16 #346 [Verbose] > " if s.real == 1:"
00:00:16 #347 [Verbose] > " s = complex(float('inf'), 0)"
00:00:16 #348 [Verbose] > " return (s.real, s.imag)"
00:00:16 #349 [Verbose] > ]]
00:00:16 #350 [Verbose] > inl code = (a code : _ i32 _) |> sm'.concat_array_trailing "\n"
00:00:16 #351 [Verbose] >
00:00:16 #352 [Verbose] > inl s = new_pair (s |> re) (s |> im)
00:00:16 #353 [Verbose] > inl args = new_pair s ()
00:00:16 #354 [Verbose] >
00:00:16 #355 [Verbose] > eval py code args
00:00:16 #356 [Verbose] >
00:00:16 #357 [Verbose] > inl run_test closure_fix (fn : (complex f64 -> complex f64) * (complex f64 ->
00:00:16 #358 [Verbose] > complex f64) -> ()) =
00:00:16 #359 [Verbose] > inl fn_ (py : python) : resultm.result' () pyerr =
00:00:16 #360 [Verbose] > inl zeta = fun (s : complex f64) =>
00:00:16 #361 [Verbose] > inl s = zeta_ py s |> resultm.unwrap'
00:00:16 #362 [Verbose] > s
00:00:16 #363 [Verbose] > inl gamma = fun (s : complex f64) =>
00:00:16 #364 [Verbose] > inl s = gamma_ py s |> resultm.unwrap'
00:00:16 #365 [Verbose] > s
00:00:16 #366 [Verbose] > fn (zeta, gamma)
00:00:16 #367 [Verbose] >
00:00:16 #368 [Verbose] > Ok ()
00:00:16 #369 [Verbose] > |> resultm.box
00:00:16 #370 [Verbose] >
00:00:16 #371 [Verbose] > inl run () =
00:00:16 #372 [Verbose] > !\($'"pyo3::prepare_freethreaded_python()"') : ()
00:00:16 #373 [Verbose] >
00:00:16 #374 [Verbose] > !\($'"let __result = pyo3::Python::with_gil(|py| -> pyo3::PyResult<()> {
00:00:16 #375 [Verbose] > //"')
00:00:16 #376 [Verbose] >
00:00:16 #377 [Verbose] > inl x = fn_
00:00:16 #378 [Verbose] > let x' = x (!\($'"py"') : python)
00:00:16 #379 [Verbose] > inl x' = join x'
00:00:16 #380 [Verbose] >
00:00:16 #381 [Verbose] > x' |> rust.fix_closure closure_fix
00:00:16 #382 [Verbose] >
00:00:16 #383 [Verbose] > (!\($'"__result"') : _ () pyerr)
00:00:16 #384 [Verbose] > |> resultm.unwrap'
00:00:16 #385 [Verbose] > inl run = join run
00:00:16 #386 [Verbose] > run ()
00:00:17 #387 [Verbose] >
00:00:17 #388 [Verbose] > ╭─[ 304.39ms - stdout ]────────────────────────────────────────────────────────╮
00:00:17 #389 [Verbose] > │ () │
00:00:17 #390 [Verbose] > │ │
00:00:17 #391 [Verbose] > │ │
00:00:17 #392 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #393 [Verbose] >
00:00:17 #394 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:17 #395 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:17 #396 [Verbose] > │ ## test_zeta_at_2___ │
00:00:17 #397 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:17 #398 [Verbose] >
00:00:17 #399 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:17 #400 [Verbose] > // // test
00:00:17 #401 [Verbose] > // // rust=
00:00:17 #402 [Verbose] > // // print_code=true
00:00:17 #403 [Verbose] >
00:00:17 #404 [Verbose] > types ()
00:00:17 #405 [Verbose] >
00:00:17 #406 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:00:17 #407 [Verbose] > inl s = complex (2f64, 0f64)
00:00:17 #408 [Verbose] > inl result = zeta s
00:00:17 #409 [Verbose] >
00:00:17 #410 [Verbose] > result
00:00:17 #411 [Verbose] > |> im
00:00:17 #412 [Verbose] > |> _assert_eq 0f64
00:00:17 #413 [Verbose] >
00:00:17 #414 [Verbose] > ((result |> re) - (pi ** 2f64) / 6f64) |> abs
00:00:17 #415 [Verbose] > |> _assert_lt 0.001f64
00:00:24 #416 [Verbose] >
00:00:24 #417 [Verbose] > ╭─[ 7.45s - return value ]─────────────────────────────────────────────────────╮
00:00:24 #418 [Verbose] > │ .rs output: │
00:00:24 #419 [Verbose] > │ │
00:00:24 #420 [Verbose] > │ │
00:00:24 #421 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #422 [Verbose] >
00:00:24 #423 [Verbose] > ╭─[ 7.46s - stdout ]───────────────────────────────────────────────────────────╮
00:00:24 #424 [Verbose] > │ │
00:00:24 #425 [Verbose] > │ .fsx: │
00:00:24 #426 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] type Func0<'T> = class │
00:00:24 #427 [Verbose] > │ end │
00:00:24 #428 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>] type Func0<'T, 'U> = │
00:00:24 #429 [Verbose] > │ class end │
00:00:24 #430 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>] type Box<'T> = class end │
00:00:24 #431 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>] type Dyn<'T> = class end │
00:00:24 #432 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>] type Fn<'T> = class end │
00:00:24 #433 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn()")>] type FnUnit = class end │
00:00:24 #434 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>] type FnOnce<'T> = │
00:00:24 #435 [Verbose] > │ class end │
00:00:24 #436 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>] type ActionFn2<'T, 'U> = │
00:00:24 #437 [Verbose] > │ class end │
00:00:24 #438 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("impl $0")>] type Impl<'T> = class end │
00:00:24 #439 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("mut $0")>] type Mut<'T> = class end │
00:00:24 #440 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end │
00:00:24 #441 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>] type StaticRef<'T> = │
00:00:24 #442 [Verbose] > │ class end │
00:00:24 #443 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>] type MutCell<'T> = │
00:00:24 #444 [Verbose] > │ class end │
00:00:24 #445 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::any::Any")>] type std_any_Any = │
00:00:24 #446 [Verbose] > │ class end │
00:00:24 #447 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::cell::RefCell<$0>")>] type │
00:00:24 #448 [Verbose] > │ std_cell_RefCell<'T> = class end │
00:00:24 #449 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::pin::Pin<$0>")>] type │
00:00:24 #450 [Verbose] > │ std_pin_Pin<'T> = class end │
00:00:24 #451 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Rc<$0>")>] type std_rc_Rc<'T> │
00:00:24 #452 [Verbose] > │ = class end │
00:00:24 #453 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::rc::Weak<$0>")>] type │
00:00:24 #454 [Verbose] > │ std_rc_Weak<'T> = class end │
00:00:24 #455 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>] type │
00:00:24 #456 [Verbose] > │ std_sync_Arc<'T> = class end │
00:00:24 #457 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end │
00:00:24 #458 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("base64::DecodeError")>] type │
00:00:24 #459 [Verbose] > │ base64_DecodeError = class end │
00:00:24 #460 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("borsh::io::Error")>] type │
00:00:24 #461 [Verbose] > │ borsh_io_Error = class end │
00:00:24 #462 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("js_sys::JsString")>] type │
00:00:24 #463 [Verbose] > │ js_sys_JsString = class end │
00:00:24 #464 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Error")>] type │
00:00:24 #465 [Verbose] > │ serde_json_Error = class end │
00:00:24 #466 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_json::Value")>] type │
00:00:24 #467 [Verbose] > │ serde_json_Value = class end │
00:00:24 #468 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("serde_wasm_bindgen::Error")>] type │
00:00:24 #469 [Verbose] > │ serde_wasm_bindgen_Error = class end │
00:00:24 #470 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::str::Utf8Error")>] type │
00:00:24 #471 [Verbose] > │ std_str_Utf8Error = class end │
00:00:24 #472 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type │
00:00:24 #473 [Verbose] > │ std_string_String = class end │
00:00:24 #474 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("num_complex::Complex<$0>")>] type │
00:00:24 #475 [Verbose] > │ num_complex_Complex<'T> = class end │
00:00:24 #476 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::types::PyModule")>] type │
00:00:24 #477 [Verbose] > │ pyo3_types_PyModule = class end │
00:00:24 #478 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Bound<$0>")>] type pyo3_Bound<'T> │
00:00:24 #479 [Verbose] > │ = class end │
00:00:24 #480 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Python")>] type pyo3_Python = │
00:00:24 #481 [Verbose] > │ class end │
00:00:24 #482 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::PyAny")>] type pyo3_PyAny = class │
00:00:24 #483 [Verbose] > │ end │
00:00:24 #484 [Verbose] > │ [<Fable.Core.Erase; Fable.Core.Emit("pyo3::PyErr")>] type pyo3_PyErr = class │
00:00:24 #485 [Verbose] > │ end │
00:00:24 #486 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () "); │
00:00:24 #487 [Verbose] > │ use pyo3::prelude::PyAnyMethods; │
00:00:24 #488 [Verbose] > │ //" │
00:00:24 #489 [Verbose] > │ type Mut0 = {mutable l0 : int32; mutable l1 : string} │
00:00:24 #490 [Verbose] > │ let rec method2 () : float = │
00:00:24 #491 [Verbose] > │ 2.0 │
00:00:24 #492 [Verbose] > │ and method3 () : float = │
00:00:24 #493 [Verbose] > │ 0.0 │
00:00:24 #494 [Verbose] > │ and method4 (v0 : (string [])) : (string []) = │
00:00:24 #495 [Verbose] > │ v0 │
00:00:24 #496 [Verbose] > │ and method6 (v0 : int32, v1 : Mut0) : bool = │
00:00:24 #497 [Verbose] > │ let v2 : int32 = v1.l0 │
00:00:24 #498 [Verbose] > │ let v3 : bool = v2 < v0 │
00:00:24 #499 [Verbose] > │ v3 │
00:00:24 #500 [Verbose] > │ and method5 (v0 : string, v1 : (string [])) : string = │
00:00:24 #501 [Verbose] > │ let v2 : int32 = v1.Length │
00:00:24 #502 [Verbose] > │ let v3 : string = "" │
00:00:24 #503 [Verbose] > │ let v4 : Mut0 = {l0 = 0; l1 = v3} : Mut0 │
00:00:24 #504 [Verbose] > │ while method6(v2, v4) do │
00:00:24 #505 [Verbose] > │ let v6 : int32 = v4.l0 │
00:00:24 #506 [Verbose] > │ let v7 : string = v4.l1 │
00:00:24 #507 [Verbose] > │ let v8 : string = v1.[int v6] │
00:00:24 #508 [Verbose] > │ let v9 : string = v7 + v8 + v0 + "" │
00:00:24 #509 [Verbose] > │ let v10 : int32 = v6 + 1 │
00:00:24 #510 [Verbose] > │ v4.l0 <- v10 │
00:00:24 #511 [Verbose] > │ v4.l1 <- v9 │
00:00:24 #512 [Verbose] > │ () │
00:00:24 #513 [Verbose] > │ let v11 : string = v4.l1 │
00:00:24 #514 [Verbose] > │ v11 │
00:00:24 #515 [Verbose] > │ and method7 (v0 : pyo3_Python) : pyo3_Python = │
00:00:24 #516 [Verbose] > │ v0 │
00:00:24 #517 [Verbose] > │ and method8 (v0 : string) : string = │
00:00:24 #518 [Verbose] > │ v0 │
00:00:24 #519 [Verbose] > │ and method9 (v0 : Result<pyo3_Bound<pyo3_types_PyModule>, pyo3_PyErr>) : │
00:00:24 #520 [Verbose] > │ Result<pyo3_Bound<pyo3_types_PyModule>, pyo3_PyErr> = │
00:00:24 #521 [Verbose] > │ v0 │
00:00:24 #522 [Verbose] > │ and method10 () : string = │
00:00:24 #523 [Verbose] > │ let v0 : string = "fn" │
00:00:24 #524 [Verbose] > │ v0 │
00:00:24 #525 [Verbose] > │ and method11 (v0 : pyo3_Bound<pyo3_types_PyModule>) : │
00:00:24 #526 [Verbose] > │ pyo3_Bound<pyo3_types_PyModule> = │
00:00:24 #527 [Verbose] > │ v0 │
00:00:24 #528 [Verbose] > │ and method12 (v0 : Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr>) : │
00:00:24 #529 [Verbose] > │ Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr> = │
00:00:24 #530 [Verbose] > │ v0 │
00:00:24 #531 [Verbose] > │ and method13 (v0 : ((float * float) * unit)) : ((float * float) * unit) = │
00:00:24 #532 [Verbose] > │ v0 │
00:00:24 #533 [Verbose] > │ and method14 (v0 : pyo3_Bound<pyo3_PyAny>) : pyo3_Bound<pyo3_PyAny> = │
00:00:24 #534 [Verbose] > │ v0 │
00:00:24 #535 [Verbose] > │ and method15 (v0 : pyo3_Bound<pyo3_PyAny>) : pyo3_Bound<pyo3_PyAny> = │
00:00:24 #536 [Verbose] > │ v0 │
00:00:24 #537 [Verbose] > │ and method16 (v0 : Result<struct (float * float), pyo3_PyErr>) : │
00:00:24 #538 [Verbose] > │ Result<struct (float * float), pyo3_PyErr> = │
00:00:24 #539 [Verbose] > │ v0 │
00:00:24 #540 [Verbose] > │ and method17 (v0 : float) : float = │
00:00:24 #541 [Verbose] > │ v0 │
00:00:24 #542 [Verbose] > │ and method18 (v0 : float) : float = │
00:00:24 #543 [Verbose] > │ v0 │
00:00:24 #544 [Verbose] > │ and method19 (v0 : Result<num_complex_Complex<float>, pyo3_PyErr>) : │
00:00:24 #545 [Verbose] > │ Result<num_complex_Complex<float>, pyo3_PyErr> = │
00:00:24 #546 [Verbose] > │ v0 │
00:00:24 #547 [Verbose] > │ and method20 (v0 : bool) : bool = │
00:00:24 #548 [Verbose] > │ v0 │
00:00:24 #549 [Verbose] > │ and method21 (v0 : Result<unit, pyo3_PyErr>) : Result<unit, pyo3_PyErr> = │
00:00:24 #550 [Verbose] > │ v0 │
00:00:24 #551 [Verbose] > │ and method22 (v0 : Result<unit, pyo3_PyErr>) : Result<unit, pyo3_PyErr> = │
00:00:24 #552 [Verbose] > │ v0 │
00:00:24 #553 [Verbose] > │ and closure0 () () : unit = │
00:00:24 #554 [Verbose] > │ let v0 : string = "pyo3::prepare_freethreaded_python()" │
00:00:24 #555 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v0 │
00:00:24 #556 [Verbose] > │ let v1 : string = "let __result = pyo3::Python::with_gil(|py| -> │
00:00:24 #557 [Verbose] > │ pyo3::PyResult<()> { //" │
00:00:24 #558 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v1 │
00:00:24 #559 [Verbose] > │ let v2 : string = "py" │
00:00:24 #560 [Verbose] > │ let v3 : pyo3_Python = Fable.Core.RustInterop.emitRustExpr () v2 │
00:00:24 #561 [Verbose] > │ let v4 : float = method2() │
00:00:24 #562 [Verbose] > │ let v5 : float = method3() │
00:00:24 #563 [Verbose] > │ let v6 : string = "num_complex::Complex::new(v4, v5)" │
00:00:24 #564 [Verbose] > │ let v7 : num_complex_Complex<float> = │
00:00:24 #565 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v6 │
00:00:24 #566 [Verbose] > │ let v8 : string = "import mpmath" │
00:00:24 #567 [Verbose] > │ let v9 : string = "def fn(s, _):" │
00:00:24 #568 [Verbose] > │ let v10 : string = " s = complex(*s)" │
00:00:24 #569 [Verbose] > │ let v11 : string = " try:" │
00:00:24 #570 [Verbose] > │ let v12 : string = " s = mpmath.zeta(s)" │
00:00:24 #571 [Verbose] > │ let v13 : string = " except ValueError as e:" │
00:00:24 #572 [Verbose] > │ let v14 : string = " if s.real == 1:" │
00:00:24 #573 [Verbose] > │ let v15 : string = " s = complex(float('inf'), 0)" │
00:00:24 #574 [Verbose] > │ let v16 : string = " return (s.real, s.imag)" │
00:00:24 #575 [Verbose] > │ let v17 : (string []) = [|v8; v9; v10; v11; v12; v13; v14; v15; v16|] │
00:00:24 #576 [Verbose] > │ let v18 : (string []) = method4(v17) │
00:00:24 #577 [Verbose] > │ let v19 : string = "\n" │
00:00:24 #578 [Verbose] > │ let v20 : string = method5(v19, v18) │
00:00:24 #579 [Verbose] > │ let v21 : string = "v7.re" │
00:00:24 #580 [Verbose] > │ let v22 : float = Fable.Core.RustInterop.emitRustExpr () v21 │
00:00:24 #581 [Verbose] > │ let v23 : string = "v7.im" │
00:00:24 #582 [Verbose] > │ let v24 : float = Fable.Core.RustInterop.emitRustExpr () v23 │
00:00:24 #583 [Verbose] > │ let v25 : (float * float) = v22, v24 │
00:00:24 #584 [Verbose] > │ let v26 : ((float * float) * unit) = v25, () │
00:00:24 #585 [Verbose] > │ let v27 : pyo3_Python = method7(v3) │
00:00:24 #586 [Verbose] > │ let v28 : string = method8(v20) │
00:00:24 #587 [Verbose] > │ let v29 : string = $"fable_library_rust::String_::LrcStr::as_str(&v28)" │
00:00:24 #588 [Verbose] > │ let v30 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v29 │
00:00:24 #589 [Verbose] > │ let v31 : string = "pyo3::types::PyModule::from_code_bound(v27, v30, │
00:00:24 #590 [Verbose] > │ \"\", \"\")" │
00:00:24 #591 [Verbose] > │ let v32 : Result<pyo3_Bound<pyo3_types_PyModule>, pyo3_PyErr> = │
00:00:24 #592 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v31 │
00:00:24 #593 [Verbose] > │ let v33 : Result<pyo3_Bound<pyo3_types_PyModule>, pyo3_PyErr> = │
00:00:24 #594 [Verbose] > │ method9(v32) │
00:00:24 #595 [Verbose] > │ let v34 : string = "v33.unwrap()" │
00:00:24 #596 [Verbose] > │ let v35 : pyo3_Bound<pyo3_types_PyModule> = │
00:00:24 #597 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v34 │
00:00:24 #598 [Verbose] > │ let v36 : string = method10() │
00:00:24 #599 [Verbose] > │ let v37 : string = $"fable_library_rust::String_::LrcStr::as_str(&v36)" │
00:00:24 #600 [Verbose] > │ let v38 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v37 │
00:00:24 #601 [Verbose] > │ let v39 : pyo3_Bound<pyo3_types_PyModule> = method11(v35) │
00:00:24 #602 [Verbose] > │ let v40 : string = "v39.getattr(v38)" │
00:00:24 #603 [Verbose] > │ let v41 : Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr> = │
00:00:24 #604 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v40 │
00:00:24 #605 [Verbose] > │ let v42 : Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr> = method12(v41) │
00:00:24 #606 [Verbose] > │ let v43 : string = "v42.unwrap()" │
00:00:24 #607 [Verbose] > │ let v44 : pyo3_Bound<pyo3_PyAny> = Fable.Core.RustInterop.emitRustExpr │
00:00:24 #608 [Verbose] > │ () v43 │
00:00:24 #609 [Verbose] > │ let v45 : ((float * float) * unit) = method13(v26) │
00:00:24 #610 [Verbose] > │ let v46 : pyo3_Bound<pyo3_PyAny> = method14(v44) │
00:00:24 #611 [Verbose] > │ let v47 : string = "pyo3::prelude::PyAnyMethods::call(&v46, (*(*v45).0, │
00:00:24 #612 [Verbose] > │ ()), None)" │
00:00:24 #613 [Verbose] > │ let v48 : Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr> = │
00:00:24 #614 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v47 │
00:00:24 #615 [Verbose] > │ let v49 : Result<pyo3_Bound<pyo3_PyAny>, pyo3_PyErr> = method12(v48) │
00:00:24 #616 [Verbose] > │ let v50 : string = "v49.unwrap()" │
00:00:24 #617 [Verbose] > │ let v51 : pyo3_Bound<pyo3_PyAny> = Fable.Core.RustInterop.emitRustExpr │
00:00:24 #618 [Verbose] > │ () v50 │
00:00:24 #619 [Verbose] > │ let v52 : pyo3_Bound<pyo3_PyAny> = method15(v51) │
00:00:24 #620 [Verbose] > │ let v53 : string = "v52.extract()" │
00:00:24 #621 [Verbose] > │ let v54 : Result<struct (float * float), pyo3_PyErr> = │
00:00:24 #622 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v53 │
00:00:24 #623 [Verbose] > │ let v55 : Result<struct (float * float), pyo3_PyErr> = method16(v54) │
00:00:24 #624 [Verbose] > │ let v56 : string = "v55.unwrap()" │
00:00:24 #625 [Verbose] > │ let struct (v57 : float, v58 : float) = │
00:00:24 #626 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v56 │
00:00:24 #627 [Verbose] > │ let v59 : float = method17(v57) │
00:00:24 #628 [Verbose] > │ let v60 : float = method18(v58) │
00:00:24 #629 [Verbose] > │ let v61 : string = "num_complex::Complex::new(v59, v60)" │
00:00:24 #630 [Verbose] > │ let v62 : num_complex_Complex<float> = │
00:00:24 #631 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v61 │
00:00:24 #632 [Verbose] > │ let v63 : Result<num_complex_Complex<float>, pyo3_PyErr> = Ok v62 │
00:00:24 #633 [Verbose] > │ let v64 : Result<num_complex_Complex<float>, pyo3_PyErr> = method19(v63) │
00:00:24 #634 [Verbose] > │ let v65 : string = "v64.unwrap()" │
00:00:24 #635 [Verbose] > │ let v66 : num_complex_Complex<float> = │
00:00:24 #636 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v65 │
00:00:24 #637 [Verbose] > │ let v67 : string = "v66.im" │
00:00:24 #638 [Verbose] > │ let v68 : float = Fable.Core.RustInterop.emitRustExpr () v67 │
00:00:24 #639 [Verbose] > │ let v69 : bool = v68 = 0.0 │
00:00:24 #640 [Verbose] > │ let v71 : bool = │
00:00:24 #641 [Verbose] > │ if v69 then │
00:00:24 #642 [Verbose] > │ v69 │
00:00:24 #643 [Verbose] > │ else │
00:00:24 #644 [Verbose] > │ method20(v69) │
00:00:24 #645 [Verbose] > │ let v72 : string = $"__expect / actual: %A{v68} / expected: %A{0.0}" │
00:00:24 #646 [Verbose] > │ let v73 : bool = v71 = false │
00:00:24 #647 [Verbose] > │ if v73 then │
00:00:24 #648 [Verbose] > │ failwith<unit> v72 │
00:00:24 #649 [Verbose] > │ let v74 : string = "v66.re" │
00:00:24 #650 [Verbose] > │ let v75 : float = Fable.Core.RustInterop.emitRustExpr () v74 │
00:00:24 #651 [Verbose] > │ let v76 : float = v75 - 1.6449340668482264 │
00:00:24 #652 [Verbose] > │ let v77 : float = -v76 │
00:00:24 #653 [Verbose] > │ let v78 : bool = v76 >= v77 │
00:00:24 #654 [Verbose] > │ let v79 : float = │
00:00:24 #655 [Verbose] > │ if v78 then │
00:00:24 #656 [Verbose] > │ v76 │
00:00:24 #657 [Verbose] > │ else │
00:00:24 #658 [Verbose] > │ v77 │
00:00:24 #659 [Verbose] > │ let v80 : bool = v79 < 0.001 │
00:00:24 #660 [Verbose] > │ let v82 : bool = │
00:00:24 #661 [Verbose] > │ if v80 then │
00:00:24 #662 [Verbose] > │ v80 │
00:00:24 #663 [Verbose] > │ else │
00:00:24 #664 [Verbose] > │ method20(v80) │
00:00:24 #665 [Verbose] > │ let v83 : string = $"__expect / actual: %A{v79} / expected: %A{0.001}" │
00:00:24 #666 [Verbose] > │ let v84 : bool = v82 = false │
00:00:24 #667 [Verbose] > │ if v84 then │
00:00:24 #668 [Verbose] > │ failwith<unit> v83 │
00:00:24 #669 [Verbose] > │ let v85 : Result<unit, pyo3_PyErr> = Ok () │
00:00:24 #670 [Verbose] > │ let v86 : Result<unit, pyo3_PyErr> = method21(v85) │
00:00:24 #671 [Verbose] > │ let v87 : string = "v86 }}}}); {{{ //" │
00:00:24 #672 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v87 │
00:00:24 #673 [Verbose] > │ let v88 : string = "__result" │
00:00:24 #674 [Verbose] > │ let v89 : Result<unit, pyo3_PyErr> = Fable.Core.RustInterop.emitRustExpr │
00:00:24 #675 [Verbose] > │ () v88 │
00:00:24 #676 [Verbose] > │ let v90 : Result<unit, pyo3_PyErr> = method22(v89) │
00:00:24 #677 [Verbose] > │ let v91 : string = "v90.unwrap()" │
00:00:24 #678 [Verbose] > │ Fable.Core.RustInterop.emitRustExpr () v91 │
00:00:24 #679 [Verbose] > │ () │
00:00:24 #680 [Verbose] > │ and method1 () : (unit -> unit) = │
00:00:24 #681 [Verbose] > │ closure0() │
00:00:24 #682 [Verbose] > │ and method0 () : unit = │
00:00:24 #683 [Verbose] > │ let v0 : (unit -> unit) = method1() │
00:00:24 #684 [Verbose] > │ v0 () │
00:00:24 #685 [Verbose] > │ method0() │
00:00:24 #686 [Verbose] > │ │
00:00:24 #687 [Verbose] > │ .rs: │
00:00:24 #688 [Verbose] > │ #![allow(dead_code,)] │
00:00:24 #689 [Verbose] > │ #![allow(non_camel_case_types,)] │
00:00:24 #690 [Verbose] > │ #![allow(non_snake_case,)] │
00:00:24 #691 [Verbose] > │ #![allow(non_upper_case_globals,)] │
00:00:24 #692 [Verbose] > │ #![allow(unreachable_code,)] │
00:00:24 #693 [Verbose] > │ #![allow(unused_attributes,)] │
00:00:24 #694 [Verbose] > │ #![allow(unused_imports,)] │
00:00:24 #695 [Verbose] > │ #![allow(unused_macros,)] │
00:00:24 #696 [Verbose] > │ #![allow(unused_parens,)] │
00:00:24 #697 [Verbose] > │ #![allow(unused_variables,)] │
00:00:24 #698 [Verbose] > │ mod module_ccfa04bf { │
00:00:24 #699 [Verbose] > │ pub mod Spiral_eval { │
00:00:24 #700 [Verbose] > │ use super::*; │
00:00:24 #701 [Verbose] > │ use fable_library_rust::Native_::Func0; │
00:00:24 #702 [Verbose] > │ use fable_library_rust::Native_::LrcPtr; │
00:00:24 #703 [Verbose] > │ use fable_library_rust::Native_::MutCell; │
00:00:24 #704 [Verbose] > │ use fable_library_rust::Native_::on_startup; │
00:00:24 #705 [Verbose] > │ use fable_library_rust::NativeArray_::Array; │
00:00:24 #706 [Verbose] > │ use fable_library_rust::NativeArray_::count; │
00:00:24 #707 [Verbose] > │ use fable_library_rust::NativeArray_::new_array; │
00:00:24 #708 [Verbose] > │ use fable_library_rust::String_::append; │
00:00:24 #709 [Verbose] > │ use fable_library_rust::String_::sprintf; │
00:00:24 #710 [Verbose] > │ use fable_library_rust::String_::string; │
00:00:24 #711 [Verbose] > │ on_startup!(); │
00:00:24 #712 [Verbose] > │ use pyo3::prelude::PyAnyMethods; │
00:00:24 #713 [Verbose] > │ //,); │
00:00:24 #714 [Verbose] > │ #[derive(Clone, Debug, Default, PartialEq, PartialOrd, Hash, Eq,)] │
00:00:24 #715 [Verbose] > │ pub struct Mut0 { │
00:00:24 #716 [Verbose] > │ pub l0: MutCell<i32>, │
00:00:24 #717 [Verbose] > │ pub l1: MutCell<string>, │
00:00:24 #718 [Verbose] > │ } │
00:00:24 #719 [Verbose] > │ impl core::fmt::Display for Spiral_eval::Mut0 { │
00:00:24 #720 [Verbose] > │ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result │
00:00:24 #721 [Verbose] > │ { │
00:00:24 #722 [Verbose] > │ write!(f, "{}", core::any::type_name::<Self>()) │
00:00:24 #723 [Verbose] > │ } │
00:00:24 #724 [Verbose] > │ } │
00:00:24 #725 [Verbose] > │ pub fn method2() -> f64 { 2.0_f64 } │
00:00:24 #726 [Verbose] > │ pub fn method3() -> f64 { 0.0_f64 } │
00:00:24 #727 [Verbose] > │ pub fn method4(v0: Array<string>) -> Array<string> { v0 } │
00:00:24 #728 [Verbose] > │ pub fn method6(v0: i32, v1: LrcPtr<Spiral_eval::Mut0>) -> bool { │
00:00:24 #729 [Verbose] > │ v1.l0.get().clone() < v0 │
00:00:24 #730 [Verbose] > │ } │
00:00:24 #731 [Verbose] > │ pub fn method5(v0: string, v1: Array<string>) -> string { │
00:00:24 #732 [Verbose] > │ let v2: i32 = count(v1.clone()); │
00:00:24 #733 [Verbose] > │ let v4: LrcPtr<Spiral_eval::Mut0> = │
00:00:24 #734 [Verbose] > │ LrcPtr::new(Spiral_eval::Mut0{l0: MutCell::new(0_i32), │
00:00:24 #735 [Verbose] > │ l1: │
00:00:24 #736 [Verbose] > │ MutCell::new(string("")),}); │
00:00:24 #737 [Verbose] > │ while Spiral_eval::method6(v2, v4.clone()) { │
00:00:24 #738 [Verbose] > │ let v6: i32 = v4.l0.get().clone(); │
00:00:24 #739 [Verbose] > │ let v9: string = │
00:00:24 #740 [Verbose] > │ append(append(append(v4.l1.get().clone(), v1[ │
00:00:24 #741 [Verbose] > │ v6].clone()), │
00:00:24 #742 [Verbose] > │ v0.clone()), string("")); │
00:00:24 #743 [Verbose] > │ let v10: i32 = v6 + 1_i32; │
00:00:24 #744 [Verbose] > │ v4.l0.set(v10); │
00:00:24 #745 [Verbose] > │ v4.l1.set(v9); │
00:00:24 #746 [Verbose] > │ () │
00:00:24 #747 [Verbose] > │ } │
00:00:24 #748 [Verbose] > │ v4.l1.get().clone() │
00:00:24 #749 [Verbose] > │ } │
00:00:24 #750 [Verbose] > │ pub fn method7(v0: pyo3::Python) -> pyo3::Python { v0 } │
00:00:24 #751 [Verbose] > │ pub fn method8(v0: string) -> string { v0 } │
00:00:24 #752 [Verbose] > │ pub fn method9(v0: │
00:00:24 #753 [Verbose] > │ Result<pyo3::Bound<pyo3::types::PyModule>, │
00:00:24 #754 [Verbose] > │ pyo3::PyErr>) │
00:00:24 #755 [Verbose] > │ -> Result<pyo3::Bound<pyo3::types::PyModule>, pyo3::PyErr> { │
00:00:24 #756 [Verbose] > │ v0 │
00:00:24 #757 [Verbose] > │ } │
00:00:24 #758 [Verbose] > │ pub fn method10() -> string { string("fn") } │
00:00:24 #759 [Verbose] > │ pub fn method11(v0: pyo3::Bound<pyo3::types::PyModule>) │
00:00:24 #760 [Verbose] > │ -> pyo3::Bound<pyo3::types::PyModule> { │
00:00:24 #761 [Verbose] > │ v0 │
00:00:24 #762 [Verbose] > │ } │
00:00:24 #763 [Verbose] > │ pub fn method12(v0: Result<pyo3::Bound<pyo3::PyAny>, pyo3::PyErr>) │
00:00:24 #764 [Verbose] > │ -> Result<pyo3::Bound<pyo3::PyAny>, pyo3::PyErr> { │
00:00:24 #765 [Verbose] > │ v0 │
00:00:24 #766 [Verbose] > │ } │
00:00:24 #767 [Verbose] > │ pub fn method13(v0_: LrcPtr<(f64, f64)>, v0__1: ()) │
00:00:24 #768 [Verbose] > │ -> LrcPtr<(LrcPtr<(f64, f64)>, ())> { │
00:00:24 #769 [Verbose] > │ LrcPtr::new((v0_, ())) │
00:00:24 #770 [Verbose] > │ } │
00:00:24 #771 [Verbose] > │ pub fn method14(v0: pyo3::Bound<pyo3::PyAny>) │
00:00:24 #772 [Verbose] > │ -> pyo3::Bound<pyo3::PyAny> { │
00:00:24 #773 [Verbose] > │ v0 │
00:00:24 #774 [Verbose] > │ } │
00:00:24 #775 [Verbose] > │ pub fn method15(v0: pyo3::Bound<pyo3::PyAny>) │
00:00:24 #776 [Verbose] > │ -> pyo3::Bound<pyo3::PyAny> { │
00:00:24 #777 [Verbose] > │ v0 │
00:00:24 #778 [Verbose] > │ } │
00:00:24 #779 [Verbose] > │ pub fn method16(v0: Result<(f64, f64), pyo3::PyErr>) │
00:00:24 #780 [Verbose] > │ -> Result<(f64, f64), pyo3::PyErr> { │
00:00:24 #781 [Verbose] > │ v0 │
00:00:24 #782 [Verbose] > │ } │
00:00:24 #783 [Verbose] > │ pub fn method17(v0: f64) -> f64 { v0 } │
00:00:24 #784 [Verbose] > │ pub fn method18(v0: f64) -> f64 { v0 } │
00:00:24 #785 [Verbose] > │ pub fn method19(v0: Result<num_complex::Complex<f64>, pyo3::PyErr>) │
00:00:24 #786 [Verbose] > │ -> Result<num_complex::Complex<f64>, pyo3::PyErr> { │
00:00:24 #787 [Verbose] > │ v0 │
00:00:24 #788 [Verbose] > │ } │
00:00:24 #789 [Verbose] > │ pub fn method20(v0: bool) -> bool { v0 } │
00:00:24 #790 [Verbose] > │ pub fn method21(v0: Result<(), pyo3::PyErr>) │
00:00:24 #791 [Verbose] > │ -> Result<(), pyo3::PyErr> { │
00:00:24 #792 [Verbose] > │ v0 │
00:00:24 #793 [Verbose] > │ } │
00:00:24 #794 [Verbose] > │ pub fn method22(v0: Result<(), pyo3::PyErr>) │
00:00:24 #795 [Verbose] > │ -> Result<(), pyo3::PyErr> { │
00:00:24 #796 [Verbose] > │ v0 │
00:00:24 #797 [Verbose] > │ } │
00:00:24 #798 [Verbose] > │ pub fn closure0(unitVar: (), unitVar_1: ()) { │
00:00:24 #799 [Verbose] > │ pyo3::prepare_freethreaded_python(); │
00:00:24 #800 [Verbose] > │ let __result = pyo3::Python::with_gil(|py| -> pyo3::PyResult<()> │
00:00:24 #801 [Verbose] > │ { //; │
00:00:24 #802 [Verbose] > │ { │
00:00:24 #803 [Verbose] > │ let v3: pyo3::Python = py; │
00:00:24 #804 [Verbose] > │ let v4: f64 = Spiral_eval::method2(); │
00:00:24 #805 [Verbose] > │ let v5: f64 = Spiral_eval::method3(); │
00:00:24 #806 [Verbose] > │ let v7: num_complex::Complex<f64> = │
00:00:24 #807 [Verbose] > │ num_complex::Complex::new(v4, v5); │
00:00:24 #808 [Verbose] > │ let v20: string = │
00:00:24 #809 [Verbose] > │ Spiral_eval::method5(string("\n"), │
00:00:24 #810 [Verbose] > │ Spiral_eval::method4(new_array(&[ │
00:00:24 #811 [Verbose] > │ string("import mpmath"), │
00:00:24 #812 [Verbose] > │ │
00:00:24 #813 [Verbose] > │ string("def fn(s, _):"), │
00:00:24 #814 [Verbose] > │ │
00:00:24 #815 [Verbose] > │ string(" s = complex(*s)"), │
00:00:24 #816 [Verbose] > │ │
00:00:24 #817 [Verbose] > │ string(" try:"), │
00:00:24 #818 [Verbose] > │ │
00:00:24 #819 [Verbose] > │ string(" s = mpmath.zeta(s)"), │
00:00:24 #820 [Verbose] > │ │
00:00:24 #821 [Verbose] > │ string(" except ValueError as e:"), │
00:00:24 #822 [Verbose] > │ │
00:00:24 #823 [Verbose] > │ string(" if s.real == 1:"), │
00:00:24 #824 [Verbose] > │ │
00:00:24 #825 [Verbose] > │ string(" s = complex(float(\'inf\'), 0)"), │
00:00:24 #826 [Verbose] > │ │
00:00:24 #827 [Verbose] > │ string(" return (s.real, s.imag)")]))); │
00:00:24 #828 [Verbose] > │ let v22: f64 = v7.re; │
00:00:24 #829 [Verbose] > │ let v24: f64 = v7.im; │
00:00:24 #830 [Verbose] > │ let v27: pyo3::Python = Spiral_eval::method7(v3); │
00:00:24 #831 [Verbose] > │ let v28: string = Spiral_eval::method8(v20); │
00:00:24 #832 [Verbose] > │ let v30: &str = │
00:00:24 #833 [Verbose] > │ fable_library_rust::String_::LrcStr::as_str(&v28); │
00:00:24 #834 [Verbose] > │ let v33: │
00:00:24 #835 [Verbose] > │ Result<pyo3::Bound<pyo3::types::PyModule>, │
00:00:24 #836 [Verbose] > │ pyo3::PyErr> = │
00:00:24 #837 [Verbose] > │ │
00:00:24 #838 [Verbose] > │ Spiral_eval::method9(pyo3::types::PyModule::from_code_bound(v27, v30, "", │
00:00:24 #839 [Verbose] > │ "")); │
00:00:24 #840 [Verbose] > │ let v35: pyo3::Bound<pyo3::types::PyModule> = v33.unwrap(); │
00:00:24 #841 [Verbose] > │ let v36: string = Spiral_eval::method10(); │
00:00:24 #842 [Verbose] > │ let v38: &str = │
00:00:24 #843 [Verbose] > │ fable_library_rust::String_::LrcStr::as_str(&v36); │
00:00:24 #844 [Verbose] > │ let v39: pyo3::Bound<pyo3::types::PyModule> = │
00:00:24 #845 [Verbose] > │ Spiral_eval::method11(v35); │
00:00:24 #846 [Verbose] > │ let v42: Result<pyo3::Bound<pyo3::PyAny>, pyo3::PyErr> = │
00:00:24 #847 [Verbose] > │ Spiral_eval::method12(v39.getattr(v38)); │
00:00:24 #848 [Verbose] > │ let v44: pyo3::Bound<pyo3::PyAny> = v42.unwrap(); │
00:00:24 #849 [Verbose] > │ let v45: LrcPtr<(LrcPtr<(f64, f64)>, ())> = │
00:00:24 #850 [Verbose] > │ Spiral_eval::method13((LrcPtr::new((LrcPtr::new((v22, │
00:00:24 #851 [Verbose] > │ v24)), │
00:00:24 #852 [Verbose] > │ ()))).0.clone(), │
00:00:24 #853 [Verbose] > │ ()); │
00:00:24 #854 [Verbose] > │ let v46: pyo3::Bound<pyo3::PyAny> = │
00:00:24 #855 [Verbose] > │ Spiral_eval::method14(v44); │
00:00:24 #856 [Verbose] > │ let v49: Result<pyo3::Bound<pyo3::PyAny>, pyo3::PyErr> = │
00:00:24 #857 [Verbose] > │ │
00:00:24 #858 [Verbose] > │ Spiral_eval::method12(pyo3::prelude::PyAnyMethods::call(&v46, (*(*v45).0, │
00:00:24 #859 [Verbose] > │ ()), None)); │
00:00:24 #860 [Verbose] > │ let v52: pyo3::Bound<pyo3::PyAny> = │
00:00:24 #861 [Verbose] > │ Spiral_eval::method15(v49.unwrap()); │
00:00:24 #862 [Verbose] > │ let v55: Result<(f64, f64), pyo3::PyErr> = │
00:00:24 #863 [Verbose] > │ Spiral_eval::method16(v52.extract()); │
00:00:24 #864 [Verbose] > │ let patternInput: (f64, f64) = v55.unwrap(); │
00:00:24 #865 [Verbose] > │ let v59: f64 = │
00:00:24 #866 [Verbose] > │ Spiral_eval::method17(patternInput.0.clone()); │
00:00:24 #867 [Verbose] > │ let v60: f64 = │
00:00:24 #868 [Verbose] > │ Spiral_eval::method18(patternInput.1.clone()); │
00:00:24 #869 [Verbose] > │ let v64: Result<num_complex::Complex<f64>, pyo3::PyErr> = │
00:00:24 #870 [Verbose] > │ Spiral_eval::method19(Ok::<num_complex::Complex<f64>, │
00:00:24 #871 [Verbose] > │ │
00:00:24 #872 [Verbose] > │ pyo3::PyErr>(num_complex::Complex::new(v59, v60))); │
00:00:24 #873 [Verbose] > │ let v66: num_complex::Complex<f64> = v64.unwrap(); │
00:00:24 #874 [Verbose] > │ let v68: f64 = v66.im; │
00:00:24 #875 [Verbose] > │ let v69: bool = v68 == 0.0_f64; │
00:00:24 #876 [Verbose] > │ if (if v69 { v69 } else { Spiral_eval::method20(v69) }) == │
00:00:24 #877 [Verbose] > │ false { │
00:00:24 #878 [Verbose] > │ panic!("{}", │
00:00:24 #879 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: │
00:00:24 #880 [Verbose] > │ {:?}", v68, 0.0_f64)); │
00:00:24 #881 [Verbose] > │ } │
00:00:24 #882 [Verbose] > │ { │
00:00:24 #883 [Verbose] > │ let v76: f64 = v66.re - 1.6449340668482264_f64; │
00:00:24 #884 [Verbose] > │ let v77: f64 = -v76; │
00:00:24 #885 [Verbose] > │ let v79: f64 = if v76 >= v77 { v76 } else { v77 }; │
00:00:24 #886 [Verbose] > │ let v80: bool = v79 < 0.001_f64; │
00:00:24 #887 [Verbose] > │ if (if v80 { v80 } else { Spiral_eval::method20(v80) }) │
00:00:24 #888 [Verbose] > │ == │
00:00:24 #889 [Verbose] > │ false { │
00:00:24 #890 [Verbose] > │ panic!("{}", │
00:00:24 #891 [Verbose] > │ sprintf!("__expect / actual: {:?} / expected: │
00:00:24 #892 [Verbose] > │ {:?}", v79, 0.001_f64)); │
00:00:24 #893 [Verbose] > │ } │
00:00:24 #894 [Verbose] > │ { │
00:00:24 #895 [Verbose] > │ let v86: Result<(), pyo3::PyErr> = │
00:00:24 #896 [Verbose] > │ Spiral_eval::method21(Ok::<(), │
00:00:24 #897 [Verbose] > │ pyo3::PyErr>(())); │
00:00:24 #898 [Verbose] > │ v86 }}}}); {{{ //; │
00:00:24 #899 [Verbose] > │ { │
00:00:24 #900 [Verbose] > │ let v90: Result<(), pyo3::PyErr> = │
00:00:24 #901 [Verbose] > │ Spiral_eval::method22(__result); │
00:00:24 #902 [Verbose] > │ v90.unwrap(); │
00:00:24 #903 [Verbose] > │ () │
00:00:24 #904 [Verbose] > │ } │
00:00:24 #905 [Verbose] > │ } │
00:00:24 #906 [Verbose] > │ } │
00:00:24 #907 [Verbose] > │ } │
00:00:24 #908 [Verbose] > │ } │
00:00:24 #909 [Verbose] > │ pub fn method1() -> Func0<()> { │
00:00:24 #910 [Verbose] > │ Func0::new(move || Spiral_eval::closure0((), ())) │
00:00:24 #911 [Verbose] > │ } │
00:00:24 #912 [Verbose] > │ pub fn method0() { (Spiral_eval::method1())(); } │
00:00:24 #913 [Verbose] > │ on_startup!(Spiral_eval::method0()); │
00:00:24 #914 [Verbose] > │ } │
00:00:24 #915 [Verbose] > │ } │
00:00:24 #916 [Verbose] > │ pub use module_ccfa04bf::*; │
00:00:24 #917 [Verbose] > │ │
00:00:24 #918 [Verbose] > │ │
00:00:24 #919 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #920 [Verbose] >
00:00:24 #921 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:24 #922 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:24 #923 [Verbose] > │ ## test_zeta_at_2_minus2 │
00:00:24 #924 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:24 #925 [Verbose] >
00:00:24 #926 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:24 #927 [Verbose] > // // test
00:00:24 #928 [Verbose] > // // rust=
00:00:24 #929 [Verbose] > // // print_code=false
00:00:24 #930 [Verbose] >
00:00:24 #931 [Verbose] > types ()
00:00:24 #932 [Verbose] >
00:00:24 #933 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:00:24 #934 [Verbose] > inl s = complex (2f64, -2f64)
00:00:24 #935 [Verbose] > inl result = zeta s
00:00:24 #936 [Verbose] >
00:00:24 #937 [Verbose] > ((result |> re) - 0.8673f64) |> abs
00:00:24 #938 [Verbose] > |> _assert_lt 0.001f64
00:00:24 #939 [Verbose] >
00:00:24 #940 [Verbose] > ((result |> im) - 0.2750f64) |> abs
00:00:24 #941 [Verbose] > |> _assert_lt 0.001f64
00:00:30 #942 [Verbose] >
00:00:31 #943 [Verbose] >
00:00:31 #944 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:31 #945 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:31 #946 [Verbose] > │ ## test_trivial_zero_at_negative_even___ │
00:00:31 #947 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:31 #948 [Verbose] >
00:00:31 #949 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:31 #950 [Verbose] > // // test
00:00:31 #951 [Verbose] > // // rust=
00:00:31 #952 [Verbose] > // // print_code=false
00:00:31 #953 [Verbose] >
00:00:31 #954 [Verbose] > types ()
00:00:31 #955 [Verbose] >
00:00:31 #956 [Verbose] > run_test 3i32 fun zeta, gamma =>
00:00:31 #957 [Verbose] > (join listm'.init_series -2f64 -20 -2)
00:00:31 #958 [Verbose] > |> listm.iter fun n =>
00:00:31 #959 [Verbose] > inl s = complex (n, 0)
00:00:31 #960 [Verbose] > inl result = zeta s
00:00:31 #961 [Verbose] >
00:00:31 #962 [Verbose] > result
00:00:31 #963 [Verbose] > |> re
00:00:31 #964 [Verbose] > |> _assert_eq 0
00:00:31 #965 [Verbose] >
00:00:31 #966 [Verbose] > result
00:00:31 #967 [Verbose] > |> im
00:00:31 #968 [Verbose] > |> _assert_eq 0
00:00:36 #969 [Verbose] >
00:00:36 #970 [Verbose] >
00:00:36 #971 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:36 #972 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:36 #973 [Verbose] > │ ## test_non_trivial_zero___ │
00:00:36 #974 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:36 #975 [Verbose] >
00:00:36 #976 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:36 #977 [Verbose] > // // test
00:00:36 #978 [Verbose] > // // rust=
00:00:36 #979 [Verbose] > // // print_code=false
00:00:36 #980 [Verbose] >
00:00:36 #981 [Verbose] > types ()
00:00:36 #982 [Verbose] >
00:00:36 #983 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:00:36 #984 [Verbose] > ;[[
00:00:36 #985 [Verbose] > complex (0.5, 14.134725)
00:00:36 #986 [Verbose] > complex (0.5, 21.022040)
00:00:36 #987 [Verbose] > complex (0.5, 25.010857)
00:00:36 #988 [Verbose] > ]]
00:00:36 #989 [Verbose] > |> fun x => a x : _ i32 _
00:00:36 #990 [Verbose] > |> am.iter fun x =>
00:00:36 #991 [Verbose] > inl result = zeta x
00:00:36 #992 [Verbose] > result |> re |> abs |> _assert_lt 0.001
00:00:36 #993 [Verbose] > result |> im |> abs |> _assert_lt 0.001
00:00:42 #994 [Verbose] >
00:00:42 #995 [Verbose] >
00:00:42 #996 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:42 #997 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:42 #998 [Verbose] > │ ## test_real_part_greater_than_one___ │
00:00:42 #999 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:42 #1000 [Verbose] >
00:00:42 #1001 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:42 #1002 [Verbose] > // // test
00:00:42 #1003 [Verbose] > // // rust=
00:00:42 #1004 [Verbose] > // // print_code=false
00:00:42 #1005 [Verbose] >
00:00:42 #1006 [Verbose] > types ()
00:00:42 #1007 [Verbose] >
00:00:42 #1008 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:00:42 #1009 [Verbose] > inl points = ;[[2; 3; 4; 5; 10; 20; 50]]
00:00:42 #1010 [Verbose] > (a points : _ i32 _)
00:00:42 #1011 [Verbose] > |> am.iter fun point =>
00:00:42 #1012 [Verbose] > inl s = complex (point, 0)
00:00:42 #1013 [Verbose] > inl result = zeta s
00:00:42 #1014 [Verbose] > result |> re |> _assert_gt 0
00:00:42 #1015 [Verbose] > result |> im |> _assert_eq 0
00:00:48 #1016 [Verbose] >
00:00:48 #1017 [Verbose] >
00:00:48 #1018 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:48 #1019 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:48 #1020 [Verbose] > │ ## test_zeta_at_1___ │
00:00:48 #1021 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:48 #1022 [Verbose] >
00:00:48 #1023 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:48 #1024 [Verbose] > // // test
00:00:48 #1025 [Verbose] > // // rust=
00:00:48 #1026 [Verbose] > // // print_code=false
00:00:48 #1027 [Verbose] >
00:00:48 #1028 [Verbose] > types ()
00:00:48 #1029 [Verbose] >
00:00:48 #1030 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:00:48 #1031 [Verbose] > inl s = complex (1, 0)
00:00:48 #1032 [Verbose] > inl result = zeta s
00:00:48 #1033 [Verbose] > result |> re |> _assert_eq limit.max
00:00:48 #1034 [Verbose] > result |> im |> _assert_eq 0
00:00:54 #1035 [Verbose] >
00:00:54 #1036 [Verbose] >
00:00:54 #1037 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:54 #1038 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:54 #1039 [Verbose] > │ ## test_symmetry_across_real_axis___ │
00:00:54 #1040 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:54 #1041 [Verbose] >
00:00:54 #1042 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:54 #1043 [Verbose] > // // test
00:00:54 #1044 [Verbose] > // // rust=
00:00:54 #1045 [Verbose] > // // print_code=false
00:00:54 #1046 [Verbose] >
00:00:54 #1047 [Verbose] > types ()
00:00:54 #1048 [Verbose] >
00:00:54 #1049 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:00:54 #1050 [Verbose] > inl s = complex (2, 10)
00:00:54 #1051 [Verbose] > inl result_positive_im = zeta s
00:00:54 #1052 [Verbose] > inl result_negative_im = complex (s |> re, s |> im |> (~-)) |> zeta
00:00:54 #1053 [Verbose] > inl conj = result_negative_im |> conj
00:00:54 #1054 [Verbose] > result_positive_im |> re |> _assert_eq (conj |> re)
00:00:54 #1055 [Verbose] > result_positive_im |> im |> _assert_eq (conj |> im)
00:01:00 #1056 [Verbose] >
00:01:00 #1057 [Verbose] >
00:01:00 #1058 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:00 #1059 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:00 #1060 [Verbose] > │ ## test_behavior_near_origin___ │
00:01:00 #1061 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:00 #1062 [Verbose] >
00:01:00 #1063 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:00 #1064 [Verbose] > // // test
00:01:00 #1065 [Verbose] > // // rust=
00:01:00 #1066 [Verbose] > // // print_code=false
00:01:00 #1067 [Verbose] >
00:01:00 #1068 [Verbose] > types ()
00:01:00 #1069 [Verbose] >
00:01:00 #1070 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:01:00 #1071 [Verbose] > inl s = complex (0.01, 0.01)
00:01:00 #1072 [Verbose] > inl result = zeta s
00:01:00 #1073 [Verbose] > result |> re |> _assert_lt limit.max
00:01:00 #1074 [Verbose] > result |> im |> _assert_lt limit.max
00:01:05 #1075 [Verbose] >
00:01:05 #1076 [Verbose] >
00:01:05 #1077 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:05 #1078 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:05 #1079 [Verbose] > │ ## test_zeta_at_minus_1 │
00:01:05 #1080 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 #1081 [Verbose] >
00:01:05 #1082 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:05 #1083 [Verbose] > // // test
00:01:05 #1084 [Verbose] > // // rust=
00:01:05 #1085 [Verbose] > // // print_code=false
00:01:05 #1086 [Verbose] >
00:01:05 #1087 [Verbose] > types ()
00:01:05 #1088 [Verbose] >
00:01:05 #1089 [Verbose] > run_test 5i32 fun zeta, gamma =>
00:01:05 #1090 [Verbose] > inl s = complex (-1, 0)
00:01:05 #1091 [Verbose] > inl result = zeta s
00:01:05 #1092 [Verbose] > (result |> re) + 1f64 / 12f64 |> abs |> _assert_lt 0.001
00:01:05 #1093 [Verbose] > result |> im |> _assert_eq 0
00:01:11 #1094 [Verbose] >
00:01:11 #1095 [Verbose] >
00:01:11 #1096 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:11 #1097 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:11 #1098 [Verbose] > │ ## test_imaginary_axis │
00:01:11 #1099 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:11 #1100 [Verbose] >
00:01:11 #1101 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:11 #1102 [Verbose] > // // test
00:01:11 #1103 [Verbose] > // // rust=
00:01:11 #1104 [Verbose] > // // print_code=false
00:01:11 #1105 [Verbose] >
00:01:11 #1106 [Verbose] > types ()
00:01:11 #1107 [Verbose] >
00:01:11 #1108 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:01:11 #1109 [Verbose] > (join a ;[[10;20; 30; 40; 50; 60; 70; 80; 90; 100]] : _ i32 _)
00:01:11 #1110 [Verbose] > |> am.iter fun s =>
00:01:11 #1111 [Verbose] > inl s = complex (0, s)
00:01:11 #1112 [Verbose] > inl result = zeta s
00:01:11 #1113 [Verbose] > result |> re |> _assert_ne 0
00:01:11 #1114 [Verbose] > result |> im |> _assert_ne 0
00:01:18 #1115 [Verbose] >
00:01:18 #1116 [Verbose] >
00:01:18 #1117 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:18 #1118 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:18 #1119 [Verbose] > │ ## test_critical_strip │
00:01:18 #1120 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:18 #1121 [Verbose] >
00:01:18 #1122 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:18 #1123 [Verbose] > // // test
00:01:18 #1124 [Verbose] > // // rust=
00:01:18 #1125 [Verbose] > // // print_code=false
00:01:18 #1126 [Verbose] >
00:01:18 #1127 [Verbose] > types ()
00:01:18 #1128 [Verbose] >
00:01:18 #1129 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:01:18 #1130 [Verbose] > ;[[
00:01:18 #1131 [Verbose] > complex (0.5, 14.134725)
00:01:18 #1132 [Verbose] > complex (0.75, 20.5)
00:01:18 #1133 [Verbose] > complex (1.25, 30.1)
00:01:18 #1134 [Verbose] > complex (0.25, 40.0)
00:01:18 #1135 [Verbose] > complex (1.0, 50.0)
00:01:18 #1136 [Verbose] > ]]
00:01:18 #1137 [Verbose] > |> fun x => a x : _ i32 _
00:01:18 #1138 [Verbose] > |> am.iter fun s =>
00:01:18 #1139 [Verbose] > inl result = zeta s
00:01:18 #1140 [Verbose] > result |> re |> _assert_ne 0
00:01:18 #1141 [Verbose] > result |> im |> _assert_ne 0
00:01:23 #1142 [Verbose] >
00:01:23 #1143 [Verbose] >
00:01:23 #1144 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:23 #1145 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:23 #1146 [Verbose] > │ ## test_reflection_formula_for_specific_value │
00:01:23 #1147 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:23 #1148 [Verbose] >
00:01:23 #1149 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:23 #1150 [Verbose] > // // test
00:01:23 #1151 [Verbose] > // // rust=
00:01:23 #1152 [Verbose] > // // print_code=false
00:01:23 #1153 [Verbose] >
00:01:23 #1154 [Verbose] > types ()
00:01:23 #1155 [Verbose] >
00:01:23 #1156 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:01:23 #1157 [Verbose] > ;[[
00:01:23 #1158 [Verbose] > complex (3, 4)
00:01:23 #1159 [Verbose] > complex (2.5, -3.5)
00:01:23 #1160 [Verbose] > complex (1.5, 2.5)
00:01:23 #1161 [Verbose] > complex (0.5, 14.134725)
00:01:23 #1162 [Verbose] > ]]
00:01:23 #1163 [Verbose] > |> fun x => a x : _ i32 _
00:01:23 #1164 [Verbose] > |> am.iter fun s =>
00:01:23 #1165 [Verbose] > inl lhs = zeta s
00:01:23 #1166 [Verbose] > inl reflection_coefficient =
00:01:23 #1167 [Verbose] > complex_mult
00:01:23 #1168 [Verbose] > (complex_mult
00:01:23 #1169 [Verbose] > (complex_mult
00:01:23 #1170 [Verbose] > (complex (2, 0) |> powc s)
00:01:23 #1171 [Verbose] > (complex (pi, 0) |> powc (complex_sub s (complex (1,
00:01:23 #1172 [Verbose] > 0))))
00:01:23 #1173 [Verbose] > )
00:01:23 #1174 [Verbose] > (
00:01:23 #1175 [Verbose] > (complex_div
00:01:23 #1176 [Verbose] > (complex_mult
00:01:23 #1177 [Verbose] > (complex (pi, 0))
00:01:23 #1178 [Verbose] > s
00:01:23 #1179 [Verbose] > )
00:01:23 #1180 [Verbose] > (complex (2, 0))
00:01:23 #1181 [Verbose] > )
00:01:23 #1182 [Verbose] > |> complex_sin
00:01:23 #1183 [Verbose] > )
00:01:23 #1184 [Verbose] > )
00:01:23 #1185 [Verbose] > (gamma (complex_sub (complex (1, 0)) s))
00:01:23 #1186 [Verbose] >
00:01:23 #1187 [Verbose] > inl one_minus_s = complex (1 - (s |> re), -(s |> im))
00:01:23 #1188 [Verbose] > inl rhs_calculated = complex_mult reflection_coefficient (zeta
00:01:23 #1189 [Verbose] > one_minus_s)
00:01:23 #1190 [Verbose] >
00:01:23 #1191 [Verbose] > ((lhs |> re) - (rhs_calculated |> re)) |> abs |> _assert_lt 0.01
00:01:23 #1192 [Verbose] > ((lhs |> im) - (rhs_calculated |> im)) |> abs |> _assert_lt 0.01
00:01:30 #1193 [Verbose] >
00:01:30 #1194 [Verbose] >
00:01:30 #1195 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:30 #1196 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:30 #1197 [Verbose] > │ ## test_euler_product_formula │
00:01:30 #1198 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:30 #1199 [Verbose] >
00:01:30 #1200 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:30 #1201 [Verbose] > // // test
00:01:30 #1202 [Verbose] > // // rust=
00:01:30 #1203 [Verbose] > // // print_code=false
00:01:30 #1204 [Verbose] >
00:01:30 #1205 [Verbose] > types ()
00:01:30 #1206 [Verbose] >
00:01:30 #1207 [Verbose] > run_test 4i32 fun zeta, gamma =>
00:01:30 #1208 [Verbose] > inl s_values = ;[[2; 3; 4; 5]]
00:01:30 #1209 [Verbose] > inl primes = ;[[2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 53;
00:01:30 #1210 [Verbose] > 59; 61; 67; 71]]
00:01:30 #1211 [Verbose] > (a s_values : _ i32 _)
00:01:30 #1212 [Verbose] > |> am.iter fun s_re =>
00:01:30 #1213 [Verbose] > inl s = complex (s_re, 0)
00:01:30 #1214 [Verbose] > inl product =
00:01:30 #1215 [Verbose] > (1, (a primes : _ i32 _))
00:01:30 #1216 [Verbose] > ||> am.fold fun acc x =>
00:01:30 #1217 [Verbose] > acc * 1 / (1 - x ** -s_re)
00:01:30 #1218 [Verbose] >
00:01:30 #1219 [Verbose] > inl result = zeta s
00:01:30 #1220 [Verbose] > ((result |> re) - product) |> abs |> _assert_lt 0.01f64
00:01:30 #1221 [Verbose] > result |> im |> _assert_lt 0.01f64
00:01:30 #1222 [Verbose] > result |> im |> _assert_eq 0f64
00:01:36 #1223 [Verbose] >
00:01:38 #1224 [Verbose] > [NbConvertApp] Converting notebook math.dib.ipynb to html
00:01:38 #1225 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:38 #1226 [Verbose] > validate(nb)
00:01:38 #1227 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:01:38 #1228 [Verbose] > return _pygments_highlight(
00:01:39 #1229 [Verbose] > [NbConvertApp] Writing 381251 bytes to math.dib.html
00:01:40 #1230 [Debug] executeAsync / exitCode: 0 / output.Length: 72431
00:01:40 #1231 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] writeDibCode / output: Spi / path: math.dib
00:00:00 #2 [Debug] parseDibCode / output: Spi / file: math.dib
Finished `release` profile [optimized] target(s) in 0.89s
Running unittests math.rs (C:\home\git\polyglot\target\release\deps\math-cec818ec3ad9d901.exe)
running 14 tests
test tests::test_behavior_near_origin___ ... ok
test tests::test_real_part_greater_than_one___ ... ok
test tests::test_high_precision_at_known_value___ ... ok
test tests::test_non_trivial_zero___ ... ok
test tests::test_zeta_at_1___ ... ok
test tests::test_trivial_zero_at_negative_even___ ... ok
test tests::test_symmetry_across_real_axis___ ... ok
test tests::test_zeta_at_2_minus2 ... ok
test tests::test_zeta_at_2___ ... ok
test tests::test_reflection_formula_for_specific_value ... ok
test tests::test_zeta_at_minus_1 ... ok
test tests::test_euler_product_formula ... ok
test tests::test_imaginary_axis ... ok
test tests::test_critical_strip ... ok
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.24s
In [ ]:
{ . "$ScriptDir/../apps/chat/build.ps1" } | Invoke-Block
Finished `release` profile [optimized] target(s) in 1.91s Compiling proc-macro2 v1.0.79 Compiling prost-build v0.9.0 Compiling secp256k1-sys v0.8.1 Compiling quote v1.0.35 Compiling syn v2.0.52 Compiling syn v1.0.109 Compiling proc-macro-error-attr v1.0.4 Compiling near-workspaces v0.10.0 Compiling proc-macro-error v1.0.4 Compiling darling_core v0.20.8 Compiling serde_derive_internals v0.26.0 Compiling borsh-derive-internal v0.9.3 Compiling secp256k1 v0.27.0 Compiling borsh-schema-derive-internal v0.9.3 Compiling prost-derive v0.9.0 Compiling strum_macros v0.24.3 Compiling derive_more v0.99.17 Compiling schemars_derive v0.8.16 Compiling smart-default v0.6.0 Compiling serde_derive v1.0.197 Compiling tokio-macros v2.2.0 Compiling tracing-attributes v0.1.27 Compiling thiserror-impl v1.0.58 Compiling tokio v1.36.0 Compiling syn_derive v0.1.8 Compiling pin-project-internal v1.1.5 Compiling darling_macro v0.20.8 Compiling prost v0.9.0 Compiling prost-types v0.9.0 Compiling serde v1.0.197 Compiling serde_json v1.0.114 Compiling hex v0.4.3 Compiling tracing v0.1.40 Compiling tokio-util v0.7.10 Compiling tokio-stream v0.1.15 Compiling enum-map-derive v0.17.0 Compiling async-trait v0.1.77 Compiling h2 v0.3.24 Compiling derive_arbitrary v1.3.2 Compiling thiserror v1.0.58 Compiling num-rational v0.3.2 Compiling hyper v0.14.28 Compiling strum v0.24.1 Compiling borsh-derive v1.3.1 Compiling serde_repr v0.1.18 Compiling curve25519-dalek-derive v0.1.1 Compiling pin-project v1.1.5 Compiling tonic-build v0.6.2 Compiling enum-map v2.7.3 Compiling uint v0.9.5 Compiling tokio-io-timeout v1.2.0 Compiling async-stream-impl v0.3.5 Compiling hyper-timeout v0.4.1 Compiling darling v0.20.8 Compiling serde_with_macros v3.7.0 Compiling primitive-types v0.10.1 Compiling arbitrary v1.3.2 Compiling opentelemetry v0.17.0 Compiling opentelemetry-otlp v0.10.0 Compiling tower v0.4.13 Compiling tracing-futures v0.2.5 Compiling near-config-utils v0.20.1 Compiling tracing-subscriber v0.3.18 Compiling tokio-util v0.6.10 Compiling serde_yaml v0.9.32 Compiling actix-rt v2.9.0 Compiling curve25519-dalek v4.1.2 Compiling openssl-macros v0.1.1 Compiling ed25519-dalek v2.1.1 Compiling clap_derive v4.5.0 Compiling actix-macros v0.2.4 Compiling actix_derive v0.6.1 Compiling async-stream v0.3.5 Compiling tonic v0.6.2 Compiling tracing-opentelemetry v0.17.4 Compiling borsh v1.3.1 Compiling near-account-id v1.0.0 Compiling openssl v0.10.64 Compiling tracing-appender v0.2.3 Compiling serde_with v3.7.0 Compiling near-crypto v0.20.1 Compiling opentelemetry-semantic-conventions v0.9.0 Compiling prometheus v0.13.3 Compiling near-primitives-core v0.20.1 Compiling actix v0.13.3 Compiling chrono v0.4.35 Compiling semver v1.0.22 Compiling near-fmt v0.20.1 Compiling near-parameters v0.20.1 Compiling url v2.5.0 Compiling toml v0.5.11 Compiling clap v4.5.2 Compiling near-rpc-error-core v0.20.1 Compiling bytesize v1.3.0 Compiling scroll_derive v0.11.1 Compiling schemars v0.8.16 Compiling near-rpc-error-macro v0.20.1 Compiling proc-macro-crate v0.1.5 Compiling camino v1.1.6 Compiling borsh-derive v0.9.3 Compiling native-tls v0.2.11 Compiling near-vm-runner v0.20.1 Compiling tokio-native-tls v0.3.1 Compiling cargo-platform v0.1.7 Compiling string_cache v0.8.7 Compiling ureq v2.9.6 Compiling hyper-tls v0.5.0 Compiling elementtree v0.7.0 Compiling zip v0.5.13 Compiling serde_urlencoded v0.7.1 Compiling clap_derive v3.2.25 Compiling binary-install v0.2.0 Compiling reqwest v0.11.26 Compiling cargo_metadata v0.14.2 Compiling rustc_version v0.4.0 Compiling treediff v4.0.3 Compiling near-sandbox-utils v0.7.0 Compiling json-patch v1.2.0 Compiling cargo_metadata v0.18.1 Compiling near-gas v0.2.5 Compiling scroll v0.11.0 Compiling tokio-retry v0.3.0 Compiling goblin v0.5.4 Compiling near-token v0.2.0 Compiling symbolic-debuginfo v8.8.0 Compiling borsh v0.9.3 Compiling near-abi v0.3.0 Compiling near-o11y v0.20.1 Compiling clap v3.2.25 Compiling near-primitives v0.20.1 Compiling cargo-near v0.3.1 Compiling near-chain-configs v0.20.1 Compiling near-jsonrpc-primitives v0.20.1 Compiling near-jsonrpc-client v0.8.0 Compiling chat_contract_tests v0.0.1 (/mnt/c/home/git/polyglot/apps/chat/contract/tests) Finished `release` profile [optimized] target(s) in 16m 42s Running `/mnt/c/home/git/polyglot/target/release/chat_contract_tests` Updated the logging layer according to `log_config.json` new: ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5283260523066, }, transaction: ExecutionOutcome { transaction_hash: 58kcDj83ShvyB691kF6dvwQMoUhHijCXhZVmPAUGPgJJ, block_hash: 6v56qnqzh8jevcLXzdrKUsK9ekWvGfH2nJauodrhMUDD, logs: [], receipt_ids: [ 5PDpHNVxL6vMMUKnvkC7Zzux4ZhCeuZxpxS5irpitdvG, ], gas_burnt: NearGas { inner: 2427927707802, }, tokens_burnt: NearToken { inner: 242792770780200000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessReceiptId(5PDpHNVxL6vMMUKnvkC7Zzux4ZhCeuZxpxS5irpitdvG), }, receipts: [ ExecutionOutcome { transaction_hash: 5PDpHNVxL6vMMUKnvkC7Zzux4ZhCeuZxpxS5irpitdvG, block_hash: 6v56qnqzh8jevcLXzdrKUsK9ekWvGfH2nJauodrhMUDD, logs: [], receipt_ids: [ GSuaGRkn3YhtoKpNP5J4WXJJmEc4G4PmQSL5mNwTsbKa, ], gas_burnt: NearGas { inner: 2632150252764, }, tokens_burnt: NearToken { inner: 263215025276400000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: GSuaGRkn3YhtoKpNP5J4WXJJmEc4G4PmQSL5mNwTsbKa, block_hash: 5ZGeH8kSA66U1bA5J34LmvrdmWBStBnSJr7GM5sxs7VF, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0035292180294080877 outcome (success: true): outcome_gas_burnt_usd: 0.001621855708811736 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0017582763688463521 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(contract, ''): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5288055422272, }, transaction: ExecutionOutcome { transaction_hash: 9LbyT2p3bnZ3tMyzZRNASSd9SvBDTzE5t9QNfPu2xw5Q, block_hash: 5HM2Wwm998nGyXxTB6a4qDrSREFDH4ccJSPF9TLxqhDL, logs: [], receipt_ids: [ dDFcXaW1ATrYnTTehv53NbYnQFENMj9ZrDoawFSQkiN, ], gas_burnt: NearGas { inner: 2427972426482, }, tokens_burnt: NearToken { inner: 242797242648200000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessReceiptId(dDFcXaW1ATrYnTTehv53NbYnQFENMj9ZrDoawFSQkiN), }, receipts: [ ExecutionOutcome { transaction_hash: dDFcXaW1ATrYnTTehv53NbYnQFENMj9ZrDoawFSQkiN, block_hash: 5HM2Wwm998nGyXxTB6a4qDrSREFDH4ccJSPF9TLxqhDL, logs: [ "claim_alias / alias: \"\" / account_id: AccountId(\n \"dev-20240318112039-61597880917875\",\n) / timestamp: 1710760841747680872", ], receipt_ids: [ DD4aLWgvxdp55P4uT6bSF8VUzHvufNHeufZRTg8G6hVc, ], gas_burnt: NearGas { inner: 2636900433290, }, tokens_burnt: NearToken { inner: 263690043329000000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), }, ExecutionOutcome { transaction_hash: DD4aLWgvxdp55P4uT6bSF8VUzHvufNHeufZRTg8G6hVc, block_hash: 9MnTekHsaWZqpHBN6TCtgguMnehLMHu2UevFJAhQmJZr, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ], status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), } total_gas_burnt_usd: 0.003532421022077696 outcome (success: true): outcome_gas_burnt_usd: 0.001621885580889976 outcome_tokens_burnt_usd: 0.0 outcome (success: false): outcome_gas_burnt_usd: 0.00176144948943772 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 dev_create_account(account1): Account { id: AccountId( "dev-20240318112042-86851683614317", ), } generate_cid_borsh(account1): ViewResultDetails { result: [ 59, 0, 0, 0, 98, 97, 102, 107, 114, 101, 105, 104, 100, 119, 100, 99, 101, 102, 103, 104, 52, 100, 113, 107, 106, 118, 54, 55, 117, 122, 99, 109, 119, 55, 111, 106, 101, 101, 54, 120, 101, 100, 122, 100, 101, 116, 111, 106, 117, 122, 106, 101, 118, 116, 101, 110, 120, 113, 117, 118, 121, 107, 117, ], logs: [], } claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5709883265113, }, transaction: ExecutionOutcome { transaction_hash: Ev6yhAmGFZfdKyPgk6AtpXKr5VNs4Dhf6S22nv97rjSM, block_hash: G7B2DkE6JUYBBnkFQbYbMEHAXKrhBjyr2WKzLvcJcjjp, logs: [], receipt_ids: [ 5rkSe5aHXwMtQbvK2JzwrSvfxT5HSmTnRhqbRtpYaQgC, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessReceiptId(5rkSe5aHXwMtQbvK2JzwrSvfxT5HSmTnRhqbRtpYaQgC), }, receipts: [ ExecutionOutcome { transaction_hash: 5rkSe5aHXwMtQbvK2JzwrSvfxT5HSmTnRhqbRtpYaQgC, block_hash: 4LywUGjBYoepKAwc6nXkSAyADdgWBojaoPh2V6pnDGHU, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240318112042-86851683614317\",\n) / timestamp: 1710760843978488948", ], receipt_ids: [ BDnvdBoJGjAVx6D7r5ZJQeAXQE281qLRWySbNgPyuCTE, ], gas_burnt: NearGas { inner: 3058714860527, }, tokens_burnt: NearToken { inner: 305871486052700000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: BDnvdBoJGjAVx6D7r5ZJQeAXQE281qLRWySbNgPyuCTE, block_hash: 7Djgd7cKHShwdNqPnjGE5sTkiZaHrqnNZ2jduL2pDLUC, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003814202021095484 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002043221526832036 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5534210328178, }, transaction: ExecutionOutcome { transaction_hash: 2UwpPbZSN6imGEXaUdefmTcuzs6tAmy8k5womwQVgMAv, block_hash: CNBGWt7dfu6FrBsB4PEKiP3odaA7pFadC2mabh5sfwbm, logs: [], receipt_ids: [ Gm1d8actDSPAsTXfbCtcdVghwjDgLRSzsfq39Zr6yyjw, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessReceiptId(Gm1d8actDSPAsTXfbCtcdVghwjDgLRSzsfq39Zr6yyjw), }, receipts: [ ExecutionOutcome { transaction_hash: Gm1d8actDSPAsTXfbCtcdVghwjDgLRSzsfq39Zr6yyjw, block_hash: 3bvKoNHUuDKkvpmsEuEgMtpuM5FaYhx7qEH8k77rcbAP, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240318112042-86851683614317\",\n) / timestamp: 1710760844992733737", "Alias already claimed", ], receipt_ids: [ 5DWrxRfkKD8U3uMoKDutAZxGKMkELPiDFahYBcV1RAoN, ], gas_burnt: NearGas { inner: 2883041923592, }, tokens_burnt: NearToken { inner: 288304192359200000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 5DWrxRfkKD8U3uMoKDutAZxGKMkELPiDFahYBcV1RAoN, block_hash: 3MyRj2ZU5hPrcv5thgMV3VyE5J3j3NVrfskq3vR4kYA1, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003696852499222904 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001925872004959456 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1710760843978488948, 0, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240318112042-86851683614317", ): ( 1710760843978488948, 0, ), }, ) dev_create_account(account2): Account { id: AccountId( "dev-20240318112045-87848402560532", ), } claim_alias(alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5797233044743, }, transaction: ExecutionOutcome { transaction_hash: 6KTCHiaGxvftmzuLYEVMYN5aad1KRKufLuz49dnLx7GQ, block_hash: Ce7RL8JYgZPYUEse5hwizZjVx6kCaBw1C9GX2ZC9RM42, logs: [], receipt_ids: [ 9kWEbBaHboEdk2bXU4wZFYoCbv51ci8vzVnPL9D576bM, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112045-87848402560532", ), status: SuccessReceiptId(9kWEbBaHboEdk2bXU4wZFYoCbv51ci8vzVnPL9D576bM), }, receipts: [ ExecutionOutcome { transaction_hash: 9kWEbBaHboEdk2bXU4wZFYoCbv51ci8vzVnPL9D576bM, block_hash: 3W93xMCc3Ki44zme4QdTxw4XA6c5GXKNyvYrpU7dCtaN, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240318112045-87848402560532\",\n) / timestamp: 1710760847030666320", ], receipt_ids: [ 62yVREAgSGAKwEW7kuJnTTRixRzME2H6HWvPfE1T5LcR, ], gas_burnt: NearGas { inner: 3146064640157, }, tokens_burnt: NearToken { inner: 314606464015700000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 62yVREAgSGAKwEW7kuJnTTRixRzME2H6HWvPfE1T5LcR, block_hash: 62LzQ4z6CwR2XcWfMQ6qPi4ewfQCKgkbtVvetfDf928Q, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112045-87848402560532", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003872551673888324 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0021015711796248757 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias2", ( 1710760847030666320, 0, ), ), ) get_alias_map_borsh(alias2): Some( { AccountId( "dev-20240318112045-87848402560532", ): ( 1710760847030666320, 0, ), }, ) claim_alias(account2, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6101325373942, }, transaction: ExecutionOutcome { transaction_hash: 8EoJkDdEA4Zo9nuusnrJskweqDaWVnUsvxTZzt6re7EZ, block_hash: 9mMyZrXRHWWA8NFwdDVq9iv23euWr1aVvX8CMHS4YGGR, logs: [], receipt_ids: [ 3x9kNgkox7K8Q8TaZcP7dVXegAfaMZse1NQRy9XwCrHE, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112045-87848402560532", ), status: SuccessReceiptId(3x9kNgkox7K8Q8TaZcP7dVXegAfaMZse1NQRy9XwCrHE), }, receipts: [ ExecutionOutcome { transaction_hash: 3x9kNgkox7K8Q8TaZcP7dVXegAfaMZse1NQRy9XwCrHE, block_hash: AVkG1frqwTndHJvKXdy2LPLLQvMvCgLj6PxUTJJ2aHS2, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240318112045-87848402560532\",\n) / timestamp: 1710760848050902704", ], receipt_ids: [ Fk5ax4LiheyfhWXZdwAqSWGbMrR5s4RKNNwSZfcAKzhN, ], gas_burnt: NearGas { inner: 3450156969356, }, tokens_burnt: NearToken { inner: 345015696935600000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: Fk5ax4LiheyfhWXZdwAqSWGbMrR5s4RKNNwSZfcAKzhN, block_hash: 4EY2KnEvwKVrLChdFMMq9ANZ2rnCZCUUhKy6RuXXtdCS, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112045-87848402560532", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004075685349793256 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002304704855529808 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias1", ( 1710760848050902704, 1, ), ), ) get_alias_map(account2, alias1): Some( { AccountId( "dev-20240318112042-86851683614317", ): ( 1710760843978488948, 0, ), AccountId( "dev-20240318112045-87848402560532", ): ( 1710760848050902704, 1, ), }, ) get_alias_map(account2, alias2): Some( {}, ) claim_alias(account1, alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6095976637186, }, transaction: ExecutionOutcome { transaction_hash: 7HnNMs57XMdbEk9iwHANdcSFZfffaMcHiFDnC3BTbEu8, block_hash: EosCjhK3sG4YBvGTB5copoAMm7ktQALpUSXkAGbM7AMH, logs: [], receipt_ids: [ 3hxBJp1e43uFNw4N6TD1iUUzVJ2hZyuPZXk3pdJWN1Qz, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessReceiptId(3hxBJp1e43uFNw4N6TD1iUUzVJ2hZyuPZXk3pdJWN1Qz), }, receipts: [ ExecutionOutcome { transaction_hash: 3hxBJp1e43uFNw4N6TD1iUUzVJ2hZyuPZXk3pdJWN1Qz, block_hash: 2WUV9M1PwVuh2STyXq2TkpSipDNvevjVNXBmRPu7wUzt, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240318112042-86851683614317\",\n) / timestamp: 1710760849061977288", ], receipt_ids: [ HAutzaSFdXoMEBR7QaWzwzthj968D9KDWe5W3B8QEQN9, ], gas_burnt: NearGas { inner: 3444808232600, }, tokens_burnt: NearToken { inner: 344480823260000000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: HAutzaSFdXoMEBR7QaWzwzthj968D9KDWe5W3B8QEQN9, block_hash: JB93B5tunK9HpqZZrmCPMMHNqLwkyEsq9H79gtQ4ADLK, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004072112393640247 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0023011318993767997 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias2", ( 1710760849061977288, 0, ), ), ) get_alias_map(account1, alias2): Some( { AccountId( "dev-20240318112042-86851683614317", ): ( 1710760849061977288, 0, ), }, ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240318112045-87848402560532", ): ( 1710760848050902704, 1, ), }, ) claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6101325373942, }, transaction: ExecutionOutcome { transaction_hash: Br8xC84AGCFoKxxeGkqnVFf2Z4PVPobGyN1XmjTZrwQq, block_hash: C2Rh5tkYni9HJsN7KTx2NGRhUitTEwMeF9KowG4MMn4H, logs: [], receipt_ids: [ AsHbCygT3fLWsuiBB2kPpMHqpeRVcmwiykzmN3q8Ycnc, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessReceiptId(AsHbCygT3fLWsuiBB2kPpMHqpeRVcmwiykzmN3q8Ycnc), }, receipts: [ ExecutionOutcome { transaction_hash: AsHbCygT3fLWsuiBB2kPpMHqpeRVcmwiykzmN3q8Ycnc, block_hash: 2FrU7S9ZXhfTdqgsUxvVi6m5q4SzVwFLXKCvbnwC5kgS, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240318112042-86851683614317\",\n) / timestamp: 1710760850077698672", ], receipt_ids: [ DNk7SxRoM1BiwoXmrjq9mjPNcX8E8zAGdiz9sc6fq13d, ], gas_burnt: NearGas { inner: 3450156969356, }, tokens_burnt: NearToken { inner: 345015696935600000000, }, executor_id: AccountId( "dev-20240318112039-61597880917875", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: DNk7SxRoM1BiwoXmrjq9mjPNcX8E8zAGdiz9sc6fq13d, block_hash: AATMtgwCwHfXAAc96BDRw2sDGUnZhwEXsaEPQ4pfR8Tc, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240318112042-86851683614317", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004075685349793256 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002304704855529808 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1710760850077698672, 1, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240318112042-86851683614317", ): ( 1710760850077698672, 1, ), AccountId( "dev-20240318112045-87848402560532", ): ( 1710760848050902704, 0, ), }, ) get_alias_map(account1, alias2): Some( {}, )
In [ ]:
{ . "$ScriptDir/../apps/spiral/temp/extension/build.ps1" } | Invoke-Block
Lockfile is up to date, resolution step is skipped Already up to date Done in 4.7s [INFO]: 🎯 Checking for the Wasm target... [INFO]: 🌀 Compiling to Wasm... Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.76s [INFO]: ⬇️ Installing wasm-bindgen... [INFO]: origin crate has no LICENSE [INFO]: ✨ Done in 8.26s [INFO]: 📦 Your wasm pkg is ready to publish at C:\home\git\polyglot\apps\spiral\temp\extension\pkg. ▲ [WARNING] "import.meta" is not available with the "iife" output format and will be empty [empty-import-meta] pkg/spiral_temp_extension.js:1496:57: 1496 │ ...put = new URL('spiral_temp_extension_bg.wasm', import.meta.url); ╵ ~~~~~~~~~~~ You need to set the output format to "esm" for "import.meta" to work correctly. 1 warning dist\spiral_temp_extension_bg-5FSUQGXS.wasm 4.5mb ⚠️ dist\devtools.js 29.0kb dist\content_script.js 27.2kb dist\service_worker.js 2.2kb ⚡ Done in 238ms > polyglot@ test:e2e C:\home\git\polyglot\apps\spiral\temp\extension > playwright test [WebServer] (node:24168) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Running 3 tests using 3 workers [1/3] [Desktop Chrome] › extension.spec.ts:8:5 › popup extension [2/3] [Desktop Chrome] › extension.spec.ts:13:5 › libgen [3/3] [Desktop Chrome] › extension.spec.ts:3:5 › popup localhost 3 passed (28.3s) To open last HTML report run: pnpm exec playwright show-report
In [ ]:
{ . "$ScriptDir/../apps/perf/build.ps1" } | Invoke-Block
00:00:00 #1 [Debug] runWithTimeoutAsync / timeout: 60
00:00:00 #2 [Debug] executeAsync / options: { Command = "pwsh -c "../../scripts/invoke-dib.ps1 Perf.dib""
WorkingDirectory = None
CancellationToken = Some System.Threading.CancellationToken
OnLine = None }
00:00:04 #3 [Verbose] >
00:00:04 #4 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:04 #5 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:04 #6 [Verbose] > │ ## Perf (Polyglot) │
00:00:04 #7 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:04 #8 [Verbose] >
00:00:04 #9 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:04 #10 [Verbose] > // // test
00:00:04 #11 [Verbose] >
00:00:04 #12 [Verbose] > open testing
00:00:04 #13 [Verbose] > open benchmark
00:00:10 #14 [Verbose] >
00:00:10 #15 [Verbose] > ╭─[ 5.89s - stdout ]───────────────────────────────────────────────────────────╮
00:00:10 #16 [Verbose] > │ () │
00:00:10 #17 [Verbose] > │ │
00:00:10 #18 [Verbose] > │ │
00:00:10 #19 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #20 [Verbose] >
00:00:10 #21 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:10 #22 [Verbose] > inl (/@) x = listm'.(/@) x
00:00:10 #23 [Verbose] >
00:00:10 #24 [Verbose] > ╭─[ 220.02ms - stdout ]────────────────────────────────────────────────────────╮
00:00:10 #25 [Verbose] > │ () │
00:00:10 #26 [Verbose] > │ │
00:00:10 #27 [Verbose] > │ │
00:00:10 #28 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #29 [Verbose] >
00:00:10 #30 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:10 #31 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:10 #32 [Verbose] > │ ## TestCaseResult │
00:00:10 #33 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:10 #34 [Verbose] >
00:00:10 #35 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:10 #36 [Verbose] > type TestCaseResult =
00:00:10 #37 [Verbose] > {
00:00:10 #38 [Verbose] > Input: string
00:00:10 #39 [Verbose] > Expected: string
00:00:10 #40 [Verbose] > Result: string
00:00:10 #41 [Verbose] > TimeList: int64 list
00:00:10 #42 [Verbose] > }
00:00:10 #43 [Verbose] >
00:00:10 #44 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:10 #45 [Verbose] > #r
00:00:10 #46 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:10 #47 [Verbose] > spNetCore.Html.Abstractions.dll"
00:00:10 #48 [Verbose] > #r
00:00:10 #49 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:10 #50 [Verbose] > otNet.Interactive.dll"
00:00:10 #51 [Verbose] > #r
00:00:10 #52 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:10 #53 [Verbose] > otNet.Interactive.FSharp.dll"
00:00:10 #54 [Verbose] > #r
00:00:10 #55 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:10 #56 [Verbose] > otNet.Interactive.Formatting.dll"
00:00:10 #57 [Verbose] > open System
00:00:10 #58 [Verbose] > open System.IO
00:00:10 #59 [Verbose] > open System.Text
00:00:10 #60 [Verbose] > open Microsoft.DotNet.Interactive.Formatting
00:00:12 #61 [Verbose] >
00:00:12 #62 [Verbose] > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:12 #63 [Verbose] > #r
00:00:12 #64 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:12 #65 [Verbose] > otNet.Interactive.FSharp.dll"
00:00:12 #66 [Verbose] > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:12 #67 [Verbose] > #r
00:00:12 #68 [Verbose] > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:12 #69 [Verbose] > otNet.Interactive.dll"
00:00:12 #70 [Verbose] > open type Microsoft.DotNet.Interactive.Kernel
00:00:13 #71 [Verbose] >
00:00:13 #72 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:13 #73 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:13 #74 [Verbose] > │ ## run │
00:00:13 #75 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:13 #76 [Verbose] >
00:00:13 #77 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:13 #78 [Verbose] > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input,
00:00:13 #79 [Verbose] > expected) =
00:00:13 #80 [Verbose] > let inputStr =
00:00:13 #81 [Verbose] > match box input with
00:00:13 #82 [Verbose] > | :? System.Collections.ICollection as input ->
00:00:13 #83 [Verbose] > System.Linq.Enumerable.Cast<obj> input
00:00:13 #84 [Verbose] > |> Seq.map string
00:00:13 #85 [Verbose] > |> String.concat ","
00:00:13 #86 [Verbose] > | _ -> input.ToString ()
00:00:13 #87 [Verbose] >
00:00:13 #88 [Verbose] > printfn ""
00:00:13 #89 [Verbose] > printfn $"Solution: {inputStr} "
00:00:13 #90 [Verbose] >
00:00:13 #91 [Verbose] > let performanceInvoke (fn: unit -> 'T) =
00:00:13 #92 [Verbose] > GC.Collect ()
00:00:13 #93 [Verbose] > let stopwatch = System.Diagnostics.Stopwatch ()
00:00:13 #94 [Verbose] > stopwatch.Start ()
00:00:13 #95 [Verbose] > let time1 = stopwatch.ElapsedMilliseconds
00:00:13 #96 [Verbose] >
00:00:13 #97 [Verbose] > let result =
00:00:13 #98 [Verbose] > [[| 0 .. count |]]
00:00:13 #99 [Verbose] > |> Array.Parallel.map (fun _ ->
00:00:13 #100 [Verbose] > fn ()
00:00:13 #101 [Verbose] > )
00:00:13 #102 [Verbose] > |> Array.last
00:00:13 #103 [Verbose] >
00:00:13 #104 [Verbose] > let time2 = stopwatch.ElapsedMilliseconds - time1
00:00:13 #105 [Verbose] >
00:00:13 #106 [Verbose] > result, time2
00:00:13 #107 [Verbose] >
00:00:13 #108 [Verbose] > let resultsWithTime =
00:00:13 #109 [Verbose] > solutions
00:00:13 #110 [Verbose] > |> List.mapi (fun i (testName, solution) ->
00:00:13 #111 [Verbose] > let result, time = performanceInvoke (fun () -> solution input)
00:00:13 #112 [Verbose] > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} "
00:00:13 #113 [Verbose] > result, time
00:00:13 #114 [Verbose] > )
00:00:13 #115 [Verbose] >
00:00:13 #116 [Verbose] >
00:00:13 #117 [Verbose] > match resultsWithTime |> List.map fst with
00:00:13 #118 [Verbose] > | ([[]] | [[ _ ]]) -> ()
00:00:13 #119 [Verbose] > | (head :: tail) when tail |> List.forall ((=) head) -> ()
00:00:13 #120 [Verbose] > | results -> failwithf $"Challenge error: %A{results}"
00:00:13 #121 [Verbose] >
00:00:13 #122 [Verbose] > {
00:00:13 #123 [Verbose] > Input = inputStr
00:00:13 #124 [Verbose] > Expected = expected.ToString ()
00:00:13 #125 [Verbose] > Result = resultsWithTime |> Seq.map fst |> Seq.head |> fun x ->
00:00:13 #126 [Verbose] > x.ToString ()
00:00:13 #127 [Verbose] > TimeList = resultsWithTime |> List.map snd
00:00:13 #128 [Verbose] > }
00:00:14 #129 [Verbose] >
00:00:14 #130 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #131 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #132 [Verbose] > │ ## runAll │
00:00:14 #133 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #134 [Verbose] >
00:00:14 #135 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:14 #136 [Verbose] > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list)
00:00:14 #137 [Verbose] > testCases =
00:00:14 #138 [Verbose] > printfn ""
00:00:14 #139 [Verbose] > printfn ""
00:00:14 #140 [Verbose] > printfn $"Test: {testName}"
00:00:14 #141 [Verbose] > testCases
00:00:14 #142 [Verbose] > |> Seq.map (run count solutions)
00:00:14 #143 [Verbose] > |> Seq.toList
00:00:14 #144 [Verbose] >
00:00:14 #145 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #146 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #147 [Verbose] > │ ## sortResultList │
00:00:14 #148 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #149 [Verbose] >
00:00:14 #150 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:14 #151 [Verbose] > let sortResultList resultList =
00:00:14 #152 [Verbose] > let table =
00:00:14 #153 [Verbose] > let rows =
00:00:14 #154 [Verbose] > resultList
00:00:14 #155 [Verbose] > |> List.map (fun result ->
00:00:14 #156 [Verbose] > let best =
00:00:14 #157 [Verbose] > result.TimeList
00:00:14 #158 [Verbose] > |> List.mapi (fun i time ->
00:00:14 #159 [Verbose] > i + 1, time
00:00:14 #160 [Verbose] > )
00:00:14 #161 [Verbose] > |> List.sortBy snd
00:00:14 #162 [Verbose] > |> List.head
00:00:14 #163 [Verbose] > |> fun x -> x.ToString ()
00:00:14 #164 [Verbose] > let row =
00:00:14 #165 [Verbose] > [[
00:00:14 #166 [Verbose] > result.Input
00:00:14 #167 [Verbose] > result.Expected
00:00:14 #168 [Verbose] > result.Result
00:00:14 #169 [Verbose] > best
00:00:14 #170 [Verbose] > ]]
00:00:14 #171 [Verbose] > let color =
00:00:14 #172 [Verbose] > match result.Expected = result.Result with
00:00:14 #173 [Verbose] > | true -> Some ConsoleColor.DarkGreen
00:00:14 #174 [Verbose] > | false -> Some ConsoleColor.DarkRed
00:00:14 #175 [Verbose] > row, color
00:00:14 #176 [Verbose] > )
00:00:14 #177 [Verbose] > let header =
00:00:14 #178 [Verbose] > [[
00:00:14 #179 [Verbose] > [[
00:00:14 #180 [Verbose] > "Input"
00:00:14 #181 [Verbose] > "Expected"
00:00:14 #182 [Verbose] > "Result"
00:00:14 #183 [Verbose] > "Best"
00:00:14 #184 [Verbose] > ]]
00:00:14 #185 [Verbose] > [[
00:00:14 #186 [Verbose] > "---"
00:00:14 #187 [Verbose] > "---"
00:00:14 #188 [Verbose] > "---"
00:00:14 #189 [Verbose] > "---"
00:00:14 #190 [Verbose] > ]]
00:00:14 #191 [Verbose] > ]]
00:00:14 #192 [Verbose] > |> List.map (fun row -> row, None)
00:00:14 #193 [Verbose] > header @ rows
00:00:14 #194 [Verbose] >
00:00:14 #195 [Verbose] > let formattedTable =
00:00:14 #196 [Verbose] > let lengthMap =
00:00:14 #197 [Verbose] > table
00:00:14 #198 [Verbose] > |> List.map fst
00:00:14 #199 [Verbose] > |> List.transpose
00:00:14 #200 [Verbose] > |> List.map (fun column ->
00:00:14 #201 [Verbose] > column
00:00:14 #202 [Verbose] > |> List.map String.length
00:00:14 #203 [Verbose] > |> List.sortDescending
00:00:14 #204 [Verbose] > |> List.tryHead
00:00:14 #205 [Verbose] > |> Option.defaultValue 0
00:00:14 #206 [Verbose] > )
00:00:14 #207 [Verbose] > |> List.indexed
00:00:14 #208 [Verbose] > |> Map.ofList
00:00:14 #209 [Verbose] > table
00:00:14 #210 [Verbose] > |> List.map (fun (row, color) ->
00:00:14 #211 [Verbose] > let newRow =
00:00:14 #212 [Verbose] > row
00:00:14 #213 [Verbose] > |> List.mapi (fun i cell ->
00:00:14 #214 [Verbose] > cell.PadRight lengthMap.[[i]]
00:00:14 #215 [Verbose] > )
00:00:14 #216 [Verbose] > newRow, color
00:00:14 #217 [Verbose] > )
00:00:14 #218 [Verbose] >
00:00:14 #219 [Verbose] > printfn ""
00:00:14 #220 [Verbose] > formattedTable
00:00:14 #221 [Verbose] > |> List.iter (fun (row, color) ->
00:00:14 #222 [Verbose] > match color with
00:00:14 #223 [Verbose] > | Some color -> Console.ForegroundColor <- color
00:00:14 #224 [Verbose] > | None -> Console.ResetColor ()
00:00:14 #225 [Verbose] >
00:00:14 #226 [Verbose] > printfn "%s" (String.Join ("\t| ", row))
00:00:14 #227 [Verbose] >
00:00:14 #228 [Verbose] > Console.ResetColor ()
00:00:14 #229 [Verbose] > )
00:00:14 #230 [Verbose] >
00:00:14 #231 [Verbose] > let averages =
00:00:14 #232 [Verbose] > resultList
00:00:14 #233 [Verbose] > |> List.map (fun result -> result.TimeList |> List.map float)
00:00:14 #234 [Verbose] > |> List.transpose
00:00:14 #235 [Verbose] > |> List.map List.average
00:00:14 #236 [Verbose] > |> List.map int64
00:00:14 #237 [Verbose] > |> List.indexed
00:00:14 #238 [Verbose] >
00:00:14 #239 [Verbose] > printfn ""
00:00:14 #240 [Verbose] > printfn "Average Ranking "
00:00:14 #241 [Verbose] > averages
00:00:14 #242 [Verbose] > |> List.sortBy snd
00:00:14 #243 [Verbose] > |> List.iter (fun (i, avg) ->
00:00:14 #244 [Verbose] > printfn $"Test case %d{i + 1}. Average Time: %A{avg} "
00:00:14 #245 [Verbose] > )
00:00:14 #246 [Verbose] >
00:00:14 #247 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:14 #248 [Verbose] > let mutable _count =
00:00:14 #249 [Verbose] > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}")
00:00:14 #250 [Verbose] > <> "<null>"
00:00:14 #251 [Verbose] > then 2000000
00:00:14 #252 [Verbose] > else 2000
00:00:14 #253 [Verbose] >
00:00:14 #254 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:14 #255 [Verbose] > inl is_fast () =
00:00:14 #256 [Verbose] > false
00:00:14 #257 [Verbose] >
00:00:14 #258 [Verbose] > ╭─[ 215.08ms - stdout ]────────────────────────────────────────────────────────╮
00:00:14 #259 [Verbose] > │ () │
00:00:14 #260 [Verbose] > │ │
00:00:14 #261 [Verbose] > │ │
00:00:14 #262 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #263 [Verbose] >
00:00:14 #264 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #265 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #266 [Verbose] > │ ## empty3Tests │
00:00:14 #267 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #268 [Verbose] >
00:00:14 #269 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:14 #270 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:14 #271 [Verbose] > │ Test: Empty3 │
00:00:14 #272 [Verbose] > │ │
00:00:14 #273 [Verbose] > │ Solution: (a, a) │
00:00:14 #274 [Verbose] > │ Test case 1. A. Time: 91L │
00:00:14 #275 [Verbose] > │ │
00:00:14 #276 [Verbose] > │ Solution: (a, a) │
00:00:14 #277 [Verbose] > │ Test case 1. A. Time: 56L │
00:00:14 #278 [Verbose] > │ │
00:00:14 #279 [Verbose] > │ Input | Expected | Result | Best │
00:00:14 #280 [Verbose] > │ --- | --- | --- | --- │
00:00:14 #281 [Verbose] > │ (a, a) | a | a | (1, 91) │
00:00:14 #282 [Verbose] > │ (a, a) | a | a | (1, 56) │
00:00:14 #283 [Verbose] > │ │
00:00:14 #284 [Verbose] > │ Averages │
00:00:14 #285 [Verbose] > │ Test case 1. Average Time: 73L │
00:00:14 #286 [Verbose] > │ │
00:00:14 #287 [Verbose] > │ Ranking │
00:00:14 #288 [Verbose] > │ Test case 1. Average Time: 73L │
00:00:14 #289 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:14 #290 [Verbose] >
00:00:14 #291 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:14 #292 [Verbose] > //// test
00:00:14 #293 [Verbose] >
00:00:14 #294 [Verbose] > let solutions = [[
00:00:14 #295 [Verbose] > "A",
00:00:14 #296 [Verbose] > fun (a, _b) ->
00:00:14 #297 [Verbose] > a
00:00:14 #298 [Verbose] > ]]
00:00:14 #299 [Verbose] > let testCases = seq {
00:00:14 #300 [Verbose] > ("a", "a"), "a"
00:00:14 #301 [Verbose] > ("a", "a"), "a"
00:00:14 #302 [Verbose] > }
00:00:14 #303 [Verbose] > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases
00:00:14 #304 [Verbose] > empty3Tests
00:00:14 #305 [Verbose] > |> sortResultList
00:00:15 #306 [Verbose] >
00:00:15 #307 [Verbose] > ╭─[ 417.24ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #308 [Verbose] > │ │
00:00:15 #309 [Verbose] > │ │
00:00:15 #310 [Verbose] > │ Test: empty3Tests │
00:00:15 #311 [Verbose] > │ │
00:00:15 #312 [Verbose] > │ Solution: (a, a) │
00:00:15 #313 [Verbose] > │ Test case 1. A. Time: 1L │
00:00:15 #314 [Verbose] > │ │
00:00:15 #315 [Verbose] > │ Solution: (a, a) │
00:00:15 #316 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:15 #317 [Verbose] > │ │
00:00:15 #318 [Verbose] > │ Input | Expected | Result | Best │
00:00:15 #319 [Verbose] > │ --- | --- | --- | --- │
00:00:15 #320 [Verbose] > │ (a, a) | a | a | (1, 1) │
00:00:15 #321 [Verbose] > │ (a, a) | a | a | (1, 0) │
00:00:15 #322 [Verbose] > │ │
00:00:15 #323 [Verbose] > │ Average Ranking │
00:00:15 #324 [Verbose] > │ Test case 1. Average Time: 0L │
00:00:15 #325 [Verbose] > │ │
00:00:15 #326 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #327 [Verbose] >
00:00:15 #328 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #329 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #330 [Verbose] > │ ## empty2Tests │
00:00:15 #331 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #332 [Verbose] >
00:00:15 #333 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #334 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #335 [Verbose] > │ Test: Empty2 │
00:00:15 #336 [Verbose] > │ │
00:00:15 #337 [Verbose] > │ Solution: (a, a) │
00:00:15 #338 [Verbose] > │ Test case 1. A. Time: 59L │
00:00:15 #339 [Verbose] > │ │
00:00:15 #340 [Verbose] > │ Solution: (a, a) │
00:00:15 #341 [Verbose] > │ Test case 1. A. Time: 53L │
00:00:15 #342 [Verbose] > │ │
00:00:15 #343 [Verbose] > │ Input | Expected | Result | Best │
00:00:15 #344 [Verbose] > │ --- | --- | --- | --- │
00:00:15 #345 [Verbose] > │ (a, a) | a | a | (1, 59) │
00:00:15 #346 [Verbose] > │ (a, a) | a | a | (1, 53) │
00:00:15 #347 [Verbose] > │ │
00:00:15 #348 [Verbose] > │ Averages │
00:00:15 #349 [Verbose] > │ Test case 1. Average Time: 56L │
00:00:15 #350 [Verbose] > │ │
00:00:15 #351 [Verbose] > │ Ranking │
00:00:15 #352 [Verbose] > │ Test case 1. Average Time: 56L │
00:00:15 #353 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #354 [Verbose] >
00:00:15 #355 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:15 #356 [Verbose] > //// test
00:00:15 #357 [Verbose] >
00:00:15 #358 [Verbose] > let solutions = [[
00:00:15 #359 [Verbose] > "A",
00:00:15 #360 [Verbose] > fun (a, _b) ->
00:00:15 #361 [Verbose] > a
00:00:15 #362 [Verbose] > ]]
00:00:15 #363 [Verbose] > let testCases = seq {
00:00:15 #364 [Verbose] > ("a", "a"), "a"
00:00:15 #365 [Verbose] > ("a", "a"), "a"
00:00:15 #366 [Verbose] > }
00:00:15 #367 [Verbose] > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases
00:00:15 #368 [Verbose] > empty2Tests
00:00:15 #369 [Verbose] > |> sortResultList
00:00:15 #370 [Verbose] >
00:00:15 #371 [Verbose] > ╭─[ 458.01ms - stdout ]────────────────────────────────────────────────────────╮
00:00:15 #372 [Verbose] > │ │
00:00:15 #373 [Verbose] > │ │
00:00:15 #374 [Verbose] > │ Test: empty2Tests │
00:00:15 #375 [Verbose] > │ │
00:00:15 #376 [Verbose] > │ Solution: (a, a) │
00:00:15 #377 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:15 #378 [Verbose] > │ │
00:00:15 #379 [Verbose] > │ Solution: (a, a) │
00:00:15 #380 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:15 #381 [Verbose] > │ │
00:00:15 #382 [Verbose] > │ Input | Expected | Result | Best │
00:00:15 #383 [Verbose] > │ --- | --- | --- | --- │
00:00:15 #384 [Verbose] > │ (a, a) | a | a | (1, 0) │
00:00:15 #385 [Verbose] > │ (a, a) | a | a | (1, 0) │
00:00:15 #386 [Verbose] > │ │
00:00:15 #387 [Verbose] > │ Average Ranking │
00:00:15 #388 [Verbose] > │ Test case 1. Average Time: 0L │
00:00:15 #389 [Verbose] > │ │
00:00:15 #390 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #391 [Verbose] >
00:00:15 #392 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #393 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #394 [Verbose] > │ ## emptyTests │
00:00:15 #395 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #396 [Verbose] >
00:00:15 #397 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:15 #398 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:15 #399 [Verbose] > │ Test: Empty │
00:00:15 #400 [Verbose] > │ │
00:00:15 #401 [Verbose] > │ Solution: 0 │
00:00:15 #402 [Verbose] > │ Test case 1. A. Time: 61L │
00:00:15 #403 [Verbose] > │ │
00:00:15 #404 [Verbose] > │ Solution: 2 │
00:00:15 #405 [Verbose] > │ Test case 1. A. Time: 62L │
00:00:15 #406 [Verbose] > │ │
00:00:15 #407 [Verbose] > │ Solution: 5 │
00:00:15 #408 [Verbose] > │ Test case 1. A. Time: 70L │
00:00:15 #409 [Verbose] > │ │
00:00:15 #410 [Verbose] > │ Input | Expected | Result | Best │
00:00:15 #411 [Verbose] > │ --- | --- | --- | --- │
00:00:15 #412 [Verbose] > │ 0 | 0 | 0 | (1, 61) │
00:00:15 #413 [Verbose] > │ 2 | 2 | 2 | (1, 62) │
00:00:15 #414 [Verbose] > │ 5 | 5 | 5 | (1, 70) │
00:00:15 #415 [Verbose] > │ │
00:00:15 #416 [Verbose] > │ Averages │
00:00:15 #417 [Verbose] > │ Test case 1. Average Time: 64L │
00:00:15 #418 [Verbose] > │ │
00:00:15 #419 [Verbose] > │ Ranking │
00:00:15 #420 [Verbose] > │ Test case 1. Average Time: 64L │
00:00:15 #421 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:15 #422 [Verbose] >
00:00:15 #423 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:15 #424 [Verbose] > //// test
00:00:15 #425 [Verbose] >
00:00:15 #426 [Verbose] > let solutions = [[
00:00:15 #427 [Verbose] > "A",
00:00:15 #428 [Verbose] > fun n ->
00:00:15 #429 [Verbose] > n + 0
00:00:15 #430 [Verbose] > ]]
00:00:15 #431 [Verbose] > let testCases = seq {
00:00:15 #432 [Verbose] > 0, 0
00:00:15 #433 [Verbose] > 2, 2
00:00:15 #434 [Verbose] > 5, 5
00:00:15 #435 [Verbose] > }
00:00:15 #436 [Verbose] > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases
00:00:15 #437 [Verbose] > emptyTests
00:00:15 #438 [Verbose] > |> sortResultList
00:00:16 #439 [Verbose] >
00:00:16 #440 [Verbose] > ╭─[ 660.25ms - stdout ]────────────────────────────────────────────────────────╮
00:00:16 #441 [Verbose] > │ │
00:00:16 #442 [Verbose] > │ │
00:00:16 #443 [Verbose] > │ Test: emptyTests │
00:00:16 #444 [Verbose] > │ │
00:00:16 #445 [Verbose] > │ Solution: 0 │
00:00:16 #446 [Verbose] > │ Test case 1. A. Time: 6L │
00:00:16 #447 [Verbose] > │ │
00:00:16 #448 [Verbose] > │ Solution: 2 │
00:00:16 #449 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:16 #450 [Verbose] > │ │
00:00:16 #451 [Verbose] > │ Solution: 5 │
00:00:16 #452 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:16 #453 [Verbose] > │ │
00:00:16 #454 [Verbose] > │ Input | Expected | Result | Best │
00:00:16 #455 [Verbose] > │ --- | --- | --- | --- │
00:00:16 #456 [Verbose] > │ 0 | 0 | 0 | (1, 6) │
00:00:16 #457 [Verbose] > │ 2 | 2 | 2 | (1, 0) │
00:00:16 #458 [Verbose] > │ 5 | 5 | 5 | (1, 0) │
00:00:16 #459 [Verbose] > │ │
00:00:16 #460 [Verbose] > │ Average Ranking │
00:00:16 #461 [Verbose] > │ Test case 1. Average Time: 2L │
00:00:16 #462 [Verbose] > │ │
00:00:16 #463 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #464 [Verbose] >
00:00:16 #465 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #466 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #467 [Verbose] > │ ## uniqueLettersTests │
00:00:16 #468 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #469 [Verbose] >
00:00:16 #470 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:16 #471 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:16 #472 [Verbose] > │ Test: UniqueLetters │
00:00:16 #473 [Verbose] > │ │
00:00:16 #474 [Verbose] > │ Solution: abc │
00:00:16 #475 [Verbose] > │ Test case 1. A. Time: 1512L │
00:00:16 #476 [Verbose] > │ Test case 2. B. Time: 1947L │
00:00:16 #477 [Verbose] > │ Test case 3. C. Time: 2023L │
00:00:16 #478 [Verbose] > │ Test case 4. D. Time: 1358L │
00:00:16 #479 [Verbose] > │ Test case 5. E. Time: 1321L │
00:00:16 #480 [Verbose] > │ Test case 6. F. Time: 1346L │
00:00:16 #481 [Verbose] > │ Test case 7. G. Time: 1304L │
00:00:16 #482 [Verbose] > │ Test case 8. H. Time: 1383L │
00:00:16 #483 [Verbose] > │ Test case 9. I. Time: 1495L │
00:00:16 #484 [Verbose] > │ Test case 10. J. Time: 1245L │
00:00:16 #485 [Verbose] > │ Test case 11. K. Time: 1219L │
00:00:16 #486 [Verbose] > │ │
00:00:16 #487 [Verbose] > │ Solution: accabb │
00:00:16 #488 [Verbose] > │ Test case 1. A. Time: 1648L │
00:00:16 #489 [Verbose] > │ Test case 2. B. Time: 2061L │
00:00:16 #490 [Verbose] > │ Test case 3. C. Time: 2413L │
00:00:16 #491 [Verbose] > │ Test case 4. D. Time: 1561L │
00:00:16 #492 [Verbose] > │ Test case 5. E. Time: 1593L │
00:00:16 #493 [Verbose] > │ Test case 6. F. Time: 1518L │
00:00:16 #494 [Verbose] > │ Test case 7. G. Time: 1415L │
00:00:16 #495 [Verbose] > │ Test case 8. H. Time: 1510L │
00:00:16 #496 [Verbose] > │ Test case 9. I. Time: 1445L │
00:00:16 #497 [Verbose] > │ Test case 10. J. Time: 1636L │
00:00:16 #498 [Verbose] > │ Test case 11. K. Time: 1317L │
00:00:16 #499 [Verbose] > │ │
00:00:16 #500 [Verbose] > │ Solution: pprrqqpp │
00:00:16 #501 [Verbose] > │ Test case 1. A. Time: 2255L │
00:00:16 #502 [Verbose] > │ Test case 2. B. Time: 2408L │
00:00:16 #503 [Verbose] > │ Test case 3. C. Time: 2393L │
00:00:16 #504 [Verbose] > │ Test case 4. D. Time: 1675L │
00:00:16 #505 [Verbose] > │ Test case 5. E. Time: 1911L │
00:00:16 #506 [Verbose] > │ Test case 6. F. Time: 2126L │
00:00:16 #507 [Verbose] > │ Test case 7. G. Time: 1504L │
00:00:16 #508 [Verbose] > │ Test case 8. H. Time: 1715L │
00:00:16 #509 [Verbose] > │ Test case 9. I. Time: 1537L │
00:00:16 #510 [Verbose] > │ Test case 10. J. Time: 1522L │
00:00:16 #511 [Verbose] > │ Test case 11. K. Time: 1322L │
00:00:16 #512 [Verbose] > │ │
00:00:16 #513 [Verbose] > │ Solution: │
00:00:16 #514 [Verbose] > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:16 #515 [Verbose] > │ bbb │
00:00:16 #516 [Verbose] > │ Test case 1. A. Time: 13073L │
00:00:16 #517 [Verbose] > │ Test case 2. B. Time: 11519L │
00:00:16 #518 [Verbose] > │ Test case 3. C. Time: 8373L │
00:00:16 #519 [Verbose] > │ Test case 4. D. Time: 5860L │
00:00:16 #520 [Verbose] > │ Test case 5. E. Time: 6490L │
00:00:16 #521 [Verbose] > │ Test case 6. F. Time: 6325L │
00:00:16 #522 [Verbose] > │ Test case 7. G. Time: 5799L │
00:00:16 #523 [Verbose] > │ Test case 8. H. Time: 7099L │
00:00:16 #524 [Verbose] > │ Test case 9. I. Time: 6133L │
00:00:16 #525 [Verbose] > │ Test case 10. J. Time: 5993L │
00:00:16 #526 [Verbose] > │ Test case 11. K. Time: 2040L │
00:00:16 #527 [Verbose] > │ │
00:00:16 #528 [Verbose] > │ Input │
00:00:16 #529 [Verbose] > │ | Expected | Result | Best │
00:00:16 #530 [Verbose] > │ --- │
00:00:16 #531 [Verbose] > │ │
00:00:16 #532 [Verbose] > │ | --- | --- | --- │
00:00:16 #533 [Verbose] > │ abc │
00:00:16 #534 [Verbose] > │ │
00:00:16 #535 [Verbose] > │ | abc | abc | (11, 1219) │
00:00:16 #536 [Verbose] > │ accabb │
00:00:16 #537 [Verbose] > │ | acb | acb | (11, 1317) │
00:00:16 #538 [Verbose] > │ pprrqqpp │
00:00:16 #539 [Verbose] > │ | prq | prq | (11, 1322) │
00:00:16 #540 [Verbose] > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:16 #541 [Verbose] > │ bbb | acb | acb | (11, 2040) │
00:00:16 #542 [Verbose] > │ │
00:00:16 #543 [Verbose] > │ Averages │
00:00:16 #544 [Verbose] > │ Test case 1. Average Time: 4622L │
00:00:16 #545 [Verbose] > │ Test case 2. Average Time: 4483L │
00:00:16 #546 [Verbose] > │ Test case 3. Average Time: 3800L │
00:00:16 #547 [Verbose] > │ Test case 4. Average Time: 2613L │
00:00:16 #548 [Verbose] > │ Test case 5. Average Time: 2828L │
00:00:16 #549 [Verbose] > │ Test case 6. Average Time: 2828L │
00:00:16 #550 [Verbose] > │ Test case 7. Average Time: 2505L │
00:00:16 #551 [Verbose] > │ Test case 8. Average Time: 2926L │
00:00:16 #552 [Verbose] > │ Test case 9. Average Time: 2652L │
00:00:16 #553 [Verbose] > │ Test case 10. Average Time: 2599L │
00:00:16 #554 [Verbose] > │ Test case 11. Average Time: 1474L │
00:00:16 #555 [Verbose] > │ │
00:00:16 #556 [Verbose] > │ Ranking │
00:00:16 #557 [Verbose] > │ Test case 1. Average Time: 4622L │
00:00:16 #558 [Verbose] > │ Test case 2. Average Time: 4483L │
00:00:16 #559 [Verbose] > │ Test case 3. Average Time: 3800L │
00:00:16 #560 [Verbose] > │ Test case 8. Average Time: 2926L │
00:00:16 #561 [Verbose] > │ Test case 5. Average Time: 2828L │
00:00:16 #562 [Verbose] > │ Test case 6. Average Time: 2828L │
00:00:16 #563 [Verbose] > │ Test case 9. Average Time: 2652L │
00:00:16 #564 [Verbose] > │ Test case 4. Average Time: 2613L │
00:00:16 #565 [Verbose] > │ Test case 10. Average Time: 2599L │
00:00:16 #566 [Verbose] > │ Test case 7. Average Time: 2505L │
00:00:16 #567 [Verbose] > │ Test case 11. Average Time: 1474L │
00:00:16 #568 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:16 #569 [Verbose] >
00:00:16 #570 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:16 #571 [Verbose] > //// test
00:00:16 #572 [Verbose] >
00:00:16 #573 [Verbose] > let solutions = [[
00:00:16 #574 [Verbose] > "A",
00:00:16 #575 [Verbose] > fun input ->
00:00:16 #576 [Verbose] > input
00:00:16 #577 [Verbose] > |> Seq.toList
00:00:16 #578 [Verbose] > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[
00:00:16 #579 [Verbose] > x ]]) [[]]
00:00:16 #580 [Verbose] > |> Seq.toArray
00:00:16 #581 [Verbose] > |> String
00:00:16 #582 [Verbose] >
00:00:16 #583 [Verbose] > "B",
00:00:16 #584 [Verbose] > fun input ->
00:00:16 #585 [Verbose] > input
00:00:16 #586 [Verbose] > |> Seq.rev
00:00:16 #587 [Verbose] > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then
00:00:16 #588 [Verbose] > acc else x :: acc) list [[]]
00:00:16 #589 [Verbose] > |> Seq.rev
00:00:16 #590 [Verbose] > |> Seq.toArray
00:00:16 #591 [Verbose] > |> String
00:00:16 #592 [Verbose] >
00:00:16 #593 [Verbose] > "C",
00:00:16 #594 [Verbose] > fun input ->
00:00:16 #595 [Verbose] > input
00:00:16 #596 [Verbose] > |> Seq.rev
00:00:16 #597 [Verbose] > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set
00:00:16 #598 [Verbose] > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]])
00:00:16 #599 [Verbose] > |> snd
00:00:16 #600 [Verbose] > |> Seq.rev
00:00:16 #601 [Verbose] > |> Seq.toArray
00:00:16 #602 [Verbose] > |> String
00:00:16 #603 [Verbose] >
00:00:16 #604 [Verbose] > "D",
00:00:16 #605 [Verbose] > fun input ->
00:00:16 #606 [Verbose] > input
00:00:16 #607 [Verbose] > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:16 #608 [Verbose] > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]])
00:00:16 #609 [Verbose] > |> snd
00:00:16 #610 [Verbose] > |> String
00:00:16 #611 [Verbose] >
00:00:16 #612 [Verbose] > "E",
00:00:16 #613 [Verbose] > fun input ->
00:00:16 #614 [Verbose] > input
00:00:16 #615 [Verbose] > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:16 #616 [Verbose] > else set.Add x, x :: acc) (Set.empty, [[]])
00:00:16 #617 [Verbose] > |> snd
00:00:16 #618 [Verbose] > |> List.rev
00:00:16 #619 [Verbose] > |> List.toArray
00:00:16 #620 [Verbose] > |> String
00:00:16 #621 [Verbose] >
00:00:16 #622 [Verbose] > "F",
00:00:16 #623 [Verbose] > fun input ->
00:00:16 #624 [Verbose] > input
00:00:16 #625 [Verbose] > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:16 #626 [Verbose] > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]])
00:00:16 #627 [Verbose] > |> snd
00:00:16 #628 [Verbose] > |> List.toArray
00:00:16 #629 [Verbose] > |> String
00:00:16 #630 [Verbose] >
00:00:16 #631 [Verbose] > "G",
00:00:16 #632 [Verbose] > fun input ->
00:00:16 #633 [Verbose] > input
00:00:16 #634 [Verbose] > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:00:16 #635 [Verbose] > else set.Add x, x :: acc) (Set.empty, [[]])
00:00:16 #636 [Verbose] > |> snd
00:00:16 #637 [Verbose] > |> List.toArray
00:00:16 #638 [Verbose] > |> Array.rev
00:00:16 #639 [Verbose] > |> String
00:00:16 #640 [Verbose] >
00:00:16 #641 [Verbose] > "H",
00:00:16 #642 [Verbose] > fun input ->
00:00:16 #643 [Verbose] > input
00:00:16 #644 [Verbose] > |> Seq.toList
00:00:16 #645 [Verbose] > |> fun list ->
00:00:16 #646 [Verbose] > let rec loop set = function
00:00:16 #647 [Verbose] > | head :: tail when Set.contains head set -> loop set tail
00:00:16 #648 [Verbose] > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]]
00:00:16 #649 [Verbose] > | [[]] -> [[]]
00:00:16 #650 [Verbose] > loop Set.empty list
00:00:16 #651 [Verbose] > |> List.rev
00:00:16 #652 [Verbose] > |> List.toArray
00:00:16 #653 [Verbose] > |> String
00:00:16 #654 [Verbose] >
00:00:16 #655 [Verbose] > "I",
00:00:16 #656 [Verbose] > fun input ->
00:00:16 #657 [Verbose] > input
00:00:16 #658 [Verbose] > |> Seq.toList
00:00:16 #659 [Verbose] > |> fun list ->
00:00:16 #660 [Verbose] > let rec loop set = function
00:00:16 #661 [Verbose] > | head :: tail when Set.contains head set -> loop set tail
00:00:16 #662 [Verbose] > | head :: tail -> loop (set.Add head) tail |> Array.append [[|
00:00:16 #663 [Verbose] > head |]]
00:00:16 #664 [Verbose] > | [[]] -> [[||]]
00:00:16 #665 [Verbose] > loop Set.empty list
00:00:16 #666 [Verbose] > |> String
00:00:16 #667 [Verbose] >
00:00:16 #668 [Verbose] > "J",
00:00:16 #669 [Verbose] > fun input ->
00:00:16 #670 [Verbose] > input
00:00:16 #671 [Verbose] > |> Seq.toList
00:00:16 #672 [Verbose] > |> fun list ->
00:00:16 #673 [Verbose] > let rec loop set = function
00:00:16 #674 [Verbose] > | head :: tail when Set.contains head set -> loop set tail
00:00:16 #675 [Verbose] > | head :: tail -> head :: loop (set.Add head) tail
00:00:16 #676 [Verbose] > | [[]] -> [[]]
00:00:16 #677 [Verbose] > loop Set.empty list
00:00:16 #678 [Verbose] > |> List.toArray
00:00:16 #679 [Verbose] > |> String
00:00:16 #680 [Verbose] >
00:00:16 #681 [Verbose] > "K",
00:00:16 #682 [Verbose] > fun input ->
00:00:16 #683 [Verbose] > input
00:00:16 #684 [Verbose] > |> Seq.distinct
00:00:16 #685 [Verbose] > |> Seq.toArray
00:00:16 #686 [Verbose] > |> String
00:00:16 #687 [Verbose] > ]]
00:00:16 #688 [Verbose] > let testCases = seq {
00:00:16 #689 [Verbose] > "abc", "abc"
00:00:16 #690 [Verbose] > "accabb", "acb"
00:00:16 #691 [Verbose] > "pprrqqpp", "prq"
00:00:16 #692 [Verbose] >
00:00:16 #693 [Verbose] > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb
00:00:16 #694 [Verbose] > ", "acb"
00:00:16 #695 [Verbose] > }
00:00:16 #696 [Verbose] > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions
00:00:16 #697 [Verbose] > testCases
00:00:16 #698 [Verbose] > uniqueLettersTests
00:00:16 #699 [Verbose] > |> sortResultList
00:00:25 #700 [Verbose] >
00:00:25 #701 [Verbose] > ╭─[ 8.56s - stdout ]───────────────────────────────────────────────────────────╮
00:00:25 #702 [Verbose] > │ │
00:00:25 #703 [Verbose] > │ │
00:00:25 #704 [Verbose] > │ Test: uniqueLettersTests │
00:00:25 #705 [Verbose] > │ │
00:00:25 #706 [Verbose] > │ Solution: abc │
00:00:25 #707 [Verbose] > │ Test case 1. A. Time: 9L │
00:00:25 #708 [Verbose] > │ Test case 2. B. Time: 7L │
00:00:25 #709 [Verbose] > │ Test case 3. C. Time: 9L │
00:00:25 #710 [Verbose] > │ Test case 4. D. Time: 28L │
00:00:25 #711 [Verbose] > │ Test case 5. E. Time: 16L │
00:00:25 #712 [Verbose] > │ Test case 6. F. Time: 3L │
00:00:25 #713 [Verbose] > │ Test case 7. G. Time: 2L │
00:00:25 #714 [Verbose] > │ Test case 8. H. Time: 3L │
00:00:25 #715 [Verbose] > │ Test case 9. I. Time: 2L │
00:00:25 #716 [Verbose] > │ Test case 10. J. Time: 2L │
00:00:25 #717 [Verbose] > │ Test case 11. K. Time: 3L │
00:00:25 #718 [Verbose] > │ │
00:00:25 #719 [Verbose] > │ Solution: accabb │
00:00:25 #720 [Verbose] > │ Test case 1. A. Time: 2L │
00:00:25 #721 [Verbose] > │ Test case 2. B. Time: 1L │
00:00:25 #722 [Verbose] > │ Test case 3. C. Time: 3L │
00:00:25 #723 [Verbose] > │ Test case 4. D. Time: 1L │
00:00:25 #724 [Verbose] > │ Test case 5. E. Time: 2L │
00:00:25 #725 [Verbose] > │ Test case 6. F. Time: 1L │
00:00:25 #726 [Verbose] > │ Test case 7. G. Time: 1L │
00:00:25 #727 [Verbose] > │ Test case 8. H. Time: 1L │
00:00:25 #728 [Verbose] > │ Test case 9. I. Time: 0L │
00:00:25 #729 [Verbose] > │ Test case 10. J. Time: 1L │
00:00:25 #730 [Verbose] > │ Test case 11. K. Time: 1L │
00:00:25 #731 [Verbose] > │ │
00:00:25 #732 [Verbose] > │ Solution: pprrqqpp │
00:00:25 #733 [Verbose] > │ Test case 1. A. Time: 1L │
00:00:25 #734 [Verbose] > │ Test case 2. B. Time: 1L │
00:00:25 #735 [Verbose] > │ Test case 3. C. Time: 3L │
00:00:25 #736 [Verbose] > │ Test case 4. D. Time: 1L │
00:00:25 #737 [Verbose] > │ Test case 5. E. Time: 1L │
00:00:25 #738 [Verbose] > │ Test case 6. F. Time: 1L │
00:00:25 #739 [Verbose] > │ Test case 7. G. Time: 1L │
00:00:25 #740 [Verbose] > │ Test case 8. H. Time: 1L │
00:00:25 #741 [Verbose] > │ Test case 9. I. Time: 1L │
00:00:25 #742 [Verbose] > │ Test case 10. J. Time: 1L │
00:00:25 #743 [Verbose] > │ Test case 11. K. Time: 1L │
00:00:25 #744 [Verbose] > │ │
00:00:25 #745 [Verbose] > │ Solution: │
00:00:25 #746 [Verbose] > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:25 #747 [Verbose] > │ bbb │
00:00:25 #748 [Verbose] > │ Test case 1. A. Time: 14L │
00:00:25 #749 [Verbose] > │ Test case 2. B. Time: 19L │
00:00:25 #750 [Verbose] > │ Test case 3. C. Time: 17L │
00:00:25 #751 [Verbose] > │ Test case 4. D. Time: 11L │
00:00:25 #752 [Verbose] > │ Test case 5. E. Time: 13L │
00:00:25 #753 [Verbose] > │ Test case 6. F. Time: 11L │
00:00:25 #754 [Verbose] > │ Test case 7. G. Time: 8L │
00:00:25 #755 [Verbose] > │ Test case 8. H. Time: 10L │
00:00:25 #756 [Verbose] > │ Test case 9. I. Time: 8L │
00:00:25 #757 [Verbose] > │ Test case 10. J. Time: 14L │
00:00:25 #758 [Verbose] > │ Test case 11. K. Time: 5L │
00:00:25 #759 [Verbose] > │ │
00:00:25 #760 [Verbose] > │ Input │
00:00:25 #761 [Verbose] > │ | Expected | Result | Best │
00:00:25 #762 [Verbose] > │ --- │
00:00:25 #763 [Verbose] > │ | --- | --- | --- │
00:00:25 #764 [Verbose] > │ abc │
00:00:25 #765 [Verbose] > │ | abc | abc | (7, 2) │
00:00:25 #766 [Verbose] > │ accabb │
00:00:25 #767 [Verbose] > │ | acb | acb | (9, 0) │
00:00:25 #768 [Verbose] > │ pprrqqpp │
00:00:25 #769 [Verbose] > │ | prq | prq | (1, 1) │
00:00:25 #770 [Verbose] > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:00:25 #771 [Verbose] > │ bbb | acb | acb | (11, 5) │
00:00:25 #772 [Verbose] > │ │
00:00:25 #773 [Verbose] > │ Average Ranking │
00:00:25 #774 [Verbose] > │ Test case 9. Average Time: 2L │
00:00:25 #775 [Verbose] > │ Test case 11. Average Time: 2L │
00:00:25 #776 [Verbose] > │ Test case 7. Average Time: 3L │
00:00:25 #777 [Verbose] > │ Test case 8. Average Time: 3L │
00:00:25 #778 [Verbose] > │ Test case 6. Average Time: 4L │
00:00:25 #779 [Verbose] > │ Test case 10. Average Time: 4L │
00:00:25 #780 [Verbose] > │ Test case 1. Average Time: 6L │
00:00:25 #781 [Verbose] > │ Test case 2. Average Time: 7L │
00:00:25 #782 [Verbose] > │ Test case 3. Average Time: 8L │
00:00:25 #783 [Verbose] > │ Test case 5. Average Time: 8L │
00:00:25 #784 [Verbose] > │ Test case 4. Average Time: 10L │
00:00:25 #785 [Verbose] > │ │
00:00:25 #786 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #787 [Verbose] >
00:00:25 #788 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:25 #789 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:25 #790 [Verbose] > │ ## rotateStringsTests │
00:00:25 #791 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #792 [Verbose] >
00:00:25 #793 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:25 #794 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:25 #795 [Verbose] > │ https://www.hackerrank.com/challenges/rotate-string/forum │
00:00:25 #796 [Verbose] > │ │
00:00:25 #797 [Verbose] > │ Test: RotateStrings │
00:00:25 #798 [Verbose] > │ │
00:00:25 #799 [Verbose] > │ Solution: abc │
00:00:25 #800 [Verbose] > │ Test case 1. A. Time: 1842L │
00:00:25 #801 [Verbose] > │ Test case 2. B. Time: 1846L │
00:00:25 #802 [Verbose] > │ Test case 3. C. Time: 1936L │
00:00:25 #803 [Verbose] > │ Test case 4. CA. Time: 2224L │
00:00:25 #804 [Verbose] > │ Test case 5. CB. Time: 2329L │
00:00:25 #805 [Verbose] > │ Test case 6. D. Time: 2474L │
00:00:25 #806 [Verbose] > │ Test case 7. E. Time: 1664L │
00:00:25 #807 [Verbose] > │ Test case 8. F. Time: 1517L │
00:00:25 #808 [Verbose] > │ Test case 9. FA. Time: 1651L │
00:00:25 #809 [Verbose] > │ Test case 10. FB. Time: 3764L │
00:00:25 #810 [Verbose] > │ Test case 11. FC. Time: 5415L │
00:00:25 #811 [Verbose] > │ │
00:00:25 #812 [Verbose] > │ Solution: abcde │
00:00:25 #813 [Verbose] > │ Test case 1. A. Time: 3356L │
00:00:25 #814 [Verbose] > │ Test case 2. B. Time: 2592L │
00:00:25 #815 [Verbose] > │ Test case 3. C. Time: 2346L │
00:00:25 #816 [Verbose] > │ Test case 4. CA. Time: 2997L │
00:00:25 #817 [Verbose] > │ Test case 5. CB. Time: 3061L │
00:00:25 #818 [Verbose] > │ Test case 6. D. Time: 4051L │
00:00:25 #819 [Verbose] > │ Test case 7. E. Time: 1905L │
00:00:25 #820 [Verbose] > │ Test case 8. F. Time: 1771L │
00:00:25 #821 [Verbose] > │ Test case 9. FA. Time: 2175L │
00:00:25 #822 [Verbose] > │ Test case 10. FB. Time: 3275L │
00:00:25 #823 [Verbose] > │ Test case 11. FC. Time: 5266L │
00:00:25 #824 [Verbose] > │ │
00:00:25 #825 [Verbose] > │ Solution: abcdefghi │
00:00:25 #826 [Verbose] > │ Test case 1. A. Time: 4492L │
00:00:25 #827 [Verbose] > │ Test case 2. B. Time: 3526L │
00:00:25 #828 [Verbose] > │ Test case 3. C. Time: 3583L │
00:00:25 #829 [Verbose] > │ Test case 4. CA. Time: 3711L │
00:00:25 #830 [Verbose] > │ Test case 5. CB. Time: 4783L │
00:00:25 #831 [Verbose] > │ Test case 6. D. Time: 7557L │
00:00:25 #832 [Verbose] > │ Test case 7. E. Time: 3452L │
00:00:25 #833 [Verbose] > │ Test case 8. F. Time: 3050L │
00:00:25 #834 [Verbose] > │ Test case 9. FA. Time: 3275L │
00:00:25 #835 [Verbose] > │ Test case 10. FB. Time: 4635L │
00:00:25 #836 [Verbose] > │ Test case 11. FC. Time: 5616L │
00:00:25 #837 [Verbose] > │ │
00:00:25 #838 [Verbose] > │ Solution: abab │
00:00:25 #839 [Verbose] > │ Test case 1. A. Time: 2093L │
00:00:25 #840 [Verbose] > │ Test case 2. B. Time: 1843L │
00:00:25 #841 [Verbose] > │ Test case 3. C. Time: 1746L │
00:00:25 #842 [Verbose] > │ Test case 4. CA. Time: 2085L │
00:00:25 #843 [Verbose] > │ Test case 5. CB. Time: 2139L │
00:00:25 #844 [Verbose] > │ Test case 6. D. Time: 2095L │
00:00:25 #845 [Verbose] > │ Test case 7. E. Time: 1723L │
00:00:25 #846 [Verbose] > │ Test case 8. F. Time: 1558L │
00:00:25 #847 [Verbose] > │ Test case 9. FA. Time: 1620L │
00:00:25 #848 [Verbose] > │ Test case 10. FB. Time: 2319L │
00:00:25 #849 [Verbose] > │ Test case 11. FC. Time: 3918L │
00:00:25 #850 [Verbose] > │ │
00:00:25 #851 [Verbose] > │ Solution: aa │
00:00:25 #852 [Verbose] > │ Test case 1. A. Time: 1107L │
00:00:25 #853 [Verbose] > │ Test case 2. B. Time: 1241L │
00:00:25 #854 [Verbose] > │ Test case 3. C. Time: 1183L │
00:00:25 #855 [Verbose] > │ Test case 4. CA. Time: 1563L │
00:00:25 #856 [Verbose] > │ Test case 5. CB. Time: 1525L │
00:00:25 #857 [Verbose] > │ Test case 6. D. Time: 1591L │
00:00:25 #858 [Verbose] > │ Test case 7. E. Time: 1327L │
00:00:25 #859 [Verbose] > │ Test case 8. F. Time: 1151L │
00:00:25 #860 [Verbose] > │ Test case 9. FA. Time: 1180L │
00:00:25 #861 [Verbose] > │ Test case 10. FB. Time: 1733L │
00:00:25 #862 [Verbose] > │ Test case 11. FC. Time: 2817L │
00:00:25 #863 [Verbose] > │ │
00:00:25 #864 [Verbose] > │ Solution: z │
00:00:25 #865 [Verbose] > │ Test case 1. A. Time: 816L │
00:00:25 #866 [Verbose] > │ Test case 2. B. Time: 745L │
00:00:25 #867 [Verbose] > │ Test case 3. C. Time: 928L │
00:00:25 #868 [Verbose] > │ Test case 4. CA. Time: 1375L │
00:00:25 #869 [Verbose] > │ Test case 5. CB. Time: 1029L │
00:00:25 #870 [Verbose] > │ Test case 6. D. Time: 852L │
00:00:25 #871 [Verbose] > │ Test case 7. E. Time: 712L │
00:00:25 #872 [Verbose] > │ Test case 8. F. Time: 263L │
00:00:25 #873 [Verbose] > │ Test case 9. FA. Time: 232L │
00:00:25 #874 [Verbose] > │ Test case 10. FB. Time: 773L │
00:00:25 #875 [Verbose] > │ Test case 11. FC. Time: 1789L │
00:00:25 #876 [Verbose] > │ │
00:00:25 #877 [Verbose] > │ Input | Expected │
00:00:25 #878 [Verbose] > │ │
00:00:25 #879 [Verbose] > │ | Result │
00:00:25 #880 [Verbose] > │ │
00:00:25 #881 [Verbose] > │ | Best │
00:00:25 #882 [Verbose] > │ --- | --- │
00:00:25 #883 [Verbose] > │ │
00:00:25 #884 [Verbose] > │ | --- │
00:00:25 #885 [Verbose] > │ │
00:00:25 #886 [Verbose] > │ | --- │
00:00:25 #887 [Verbose] > │ abc | bca cab abc │
00:00:25 #888 [Verbose] > │ │
00:00:25 #889 [Verbose] > │ | bca cab abc │
00:00:25 #890 [Verbose] > │ │
00:00:25 #891 [Verbose] > │ | (8, 1517) │
00:00:25 #892 [Verbose] > │ abcde | bcdea cdeab deabc eabcd abcde │
00:00:25 #893 [Verbose] > │ | bcdea cdeab deabc eabcd abcde │
00:00:25 #894 [Verbose] > │ | (8, 1771) │
00:00:25 #895 [Verbose] > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │
00:00:25 #896 [Verbose] > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │
00:00:25 #897 [Verbose] > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │
00:00:25 #898 [Verbose] > │ | (8, 3050) │
00:00:25 #899 [Verbose] > │ abab | baba abab baba abab │
00:00:25 #900 [Verbose] > │ │
00:00:25 #901 [Verbose] > │ | baba abab baba abab │
00:00:25 #902 [Verbose] > │ │
00:00:25 #903 [Verbose] > │ | (8, 1558) │
00:00:25 #904 [Verbose] > │ aa | aa aa │
00:00:25 #905 [Verbose] > │ │
00:00:25 #906 [Verbose] > │ | aa aa │
00:00:25 #907 [Verbose] > │ │
00:00:25 #908 [Verbose] > │ | (1, 1107) │
00:00:25 #909 [Verbose] > │ z | z │
00:00:25 #910 [Verbose] > │ │
00:00:25 #911 [Verbose] > │ | z │
00:00:25 #912 [Verbose] > │ │
00:00:25 #913 [Verbose] > │ | (9, 232) │
00:00:25 #914 [Verbose] > │ │
00:00:25 #915 [Verbose] > │ Averages │
00:00:25 #916 [Verbose] > │ Test case 1. Average Time: 2284L │
00:00:25 #917 [Verbose] > │ Test case 2. Average Time: 1965L │
00:00:25 #918 [Verbose] > │ Test case 3. Average Time: 1953L │
00:00:25 #919 [Verbose] > │ Test case 4. Average Time: 2325L │
00:00:25 #920 [Verbose] > │ Test case 5. Average Time: 2477L │
00:00:25 #921 [Verbose] > │ Test case 6. Average Time: 3103L │
00:00:25 #922 [Verbose] > │ Test case 7. Average Time: 1797L │
00:00:25 #923 [Verbose] > │ Test case 8. Average Time: 1551L │
00:00:25 #924 [Verbose] > │ Test case 9. Average Time: 1688L │
00:00:25 #925 [Verbose] > │ Test case 10. Average Time: 2749L │
00:00:25 #926 [Verbose] > │ Test case 11. Average Time: 4136L │
00:00:25 #927 [Verbose] > │ │
00:00:25 #928 [Verbose] > │ Ranking │
00:00:25 #929 [Verbose] > │ Test case 11. Average Time: 4136L │
00:00:25 #930 [Verbose] > │ Test case 6. Average Time: 3103L │
00:00:25 #931 [Verbose] > │ Test case 10. Average Time: 2749L │
00:00:25 #932 [Verbose] > │ Test case 5. Average Time: 2477L │
00:00:25 #933 [Verbose] > │ Test case 4. Average Time: 2325L │
00:00:25 #934 [Verbose] > │ Test case 1. Average Time: 2284L │
00:00:25 #935 [Verbose] > │ Test case 2. Average Time: 1965L │
00:00:25 #936 [Verbose] > │ Test case 3. Average Time: 1953L │
00:00:25 #937 [Verbose] > │ Test case 7. Average Time: 1797L │
00:00:25 #938 [Verbose] > │ Test case 9. Average Time: 1688L │
00:00:25 #939 [Verbose] > │ Test case 8. Average Time: 1551L │
00:00:25 #940 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:25 #941 [Verbose] >
00:00:25 #942 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:25 #943 [Verbose] > //// test
00:00:25 #944 [Verbose] >
00:00:25 #945 [Verbose] > let solutions = [[
00:00:25 #946 [Verbose] > "A",
00:00:25 #947 [Verbose] > fun (input: string) ->
00:00:25 #948 [Verbose] > let resultList =
00:00:25 #949 [Verbose] > List.fold (fun acc x ->
00:00:25 #950 [Verbose] > let rotate (text: string) (letter: string) = text.Substring (1,
00:00:25 #951 [Verbose] > input.Length - 1) + letter
00:00:25 #952 [Verbose] > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x)
00:00:25 #953 [Verbose] > ]] @ acc
00:00:25 #954 [Verbose] > ) [[]] (Seq.toList input)
00:00:25 #955 [Verbose] >
00:00:25 #956 [Verbose] > List.foldBack (fun acc x -> x + acc + " ") resultList ""
00:00:25 #957 [Verbose] > |> fun x -> x.TrimEnd ()
00:00:25 #958 [Verbose] >
00:00:25 #959 [Verbose] > "B",
00:00:25 #960 [Verbose] > fun input ->
00:00:25 #961 [Verbose] > input
00:00:25 #962 [Verbose] > |> Seq.toList
00:00:25 #963 [Verbose] > |> List.fold (fun (acc: string list) letter ->
00:00:25 #964 [Verbose] > let last =
00:00:25 #965 [Verbose] > if acc.IsEmpty
00:00:25 #966 [Verbose] > then input
00:00:25 #967 [Verbose] > else acc.Head
00:00:25 #968 [Verbose] >
00:00:25 #969 [Verbose] > let item = last.[[1 .. input.Length - 1]] + string letter
00:00:25 #970 [Verbose] >
00:00:25 #971 [Verbose] > item :: acc
00:00:25 #972 [Verbose] > ) [[]]
00:00:25 #973 [Verbose] > |> List.rev
00:00:25 #974 [Verbose] > |> String.concat " "
00:00:25 #975 [Verbose] >
00:00:25 #976 [Verbose] > "C",
00:00:25 #977 [Verbose] > fun input ->
00:00:25 #978 [Verbose] > input
00:00:25 #979 [Verbose] > |> Seq.toList
00:00:25 #980 [Verbose] > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:00:25 #981 [Verbose] > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:25 #982 [Verbose] > |> List.rev
00:00:25 #983 [Verbose] > |> List.skip 1
00:00:25 #984 [Verbose] > |> String.concat " "
00:00:25 #985 [Verbose] >
00:00:25 #986 [Verbose] > "CA",
00:00:25 #987 [Verbose] > fun input ->
00:00:25 #988 [Verbose] > input
00:00:25 #989 [Verbose] > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:00:25 #990 [Verbose] > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:25 #991 [Verbose] > |> Seq.rev
00:00:25 #992 [Verbose] > |> Seq.skip 1
00:00:25 #993 [Verbose] > |> String.concat " "
00:00:25 #994 [Verbose] >
00:00:25 #995 [Verbose] > "CB",
00:00:25 #996 [Verbose] > fun input ->
00:00:25 #997 [Verbose] > input
00:00:25 #998 [Verbose] > |> Seq.toArray
00:00:25 #999 [Verbose] > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[|
00:00:25 #1000 [Verbose] > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]]
00:00:25 #1001 [Verbose] > |> Array.rev
00:00:25 #1002 [Verbose] > |> Array.skip 1
00:00:25 #1003 [Verbose] > |> String.concat " "
00:00:25 #1004 [Verbose] >
00:00:25 #1005 [Verbose] > "D",
00:00:25 #1006 [Verbose] > fun input ->
00:00:25 #1007 [Verbose] > input
00:00:25 #1008 [Verbose] > |> Seq.toList
00:00:25 #1009 [Verbose] > |> fun list ->
00:00:25 #1010 [Verbose] > let rec loop (acc: char list list) = function
00:00:25 #1011 [Verbose] > | _ when acc.Length = list.Length -> acc
00:00:25 #1012 [Verbose] > | head :: tail ->
00:00:25 #1013 [Verbose] > let item = tail @ [[ head ]]
00:00:25 #1014 [Verbose] > loop (item :: acc) item
00:00:25 #1015 [Verbose] > | [[]] -> [[]]
00:00:25 #1016 [Verbose] > loop [[]] list
00:00:25 #1017 [Verbose] > |> List.rev
00:00:25 #1018 [Verbose] > |> List.map (List.toArray >> String)
00:00:25 #1019 [Verbose] > |> String.concat " "
00:00:25 #1020 [Verbose] >
00:00:25 #1021 [Verbose] > "E",
00:00:25 #1022 [Verbose] > fun input ->
00:00:25 #1023 [Verbose] > input
00:00:25 #1024 [Verbose] > |> Seq.toList
00:00:25 #1025 [Verbose] > |> fun list ->
00:00:25 #1026 [Verbose] > let rec loop (last: string) = function
00:00:25 #1027 [Verbose] > | head :: tail ->
00:00:25 #1028 [Verbose] > let item = last.[[1 .. input.Length - 1]] + string head
00:00:25 #1029 [Verbose] > item :: loop item tail
00:00:25 #1030 [Verbose] > | [[]] -> [[]]
00:00:25 #1031 [Verbose] > loop input list
00:00:25 #1032 [Verbose] > |> String.concat " "
00:00:25 #1033 [Verbose] >
00:00:25 #1034 [Verbose] > "F",
00:00:25 #1035 [Verbose] > fun input ->
00:00:25 #1036 [Verbose] > Array.singleton 0
00:00:25 #1037 [Verbose] > |> Array.append [[| 1 .. input.Length - 1 |]]
00:00:25 #1038 [Verbose] > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:25 #1039 [Verbose] > |> String.concat " "
00:00:25 #1040 [Verbose] >
00:00:25 #1041 [Verbose] > "FA",
00:00:25 #1042 [Verbose] > fun input ->
00:00:25 #1043 [Verbose] > List.singleton 0
00:00:25 #1044 [Verbose] > |> List.append [[ 1 .. input.Length - 1 ]]
00:00:25 #1045 [Verbose] > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:25 #1046 [Verbose] > |> String.concat " "
00:00:25 #1047 [Verbose] >
00:00:25 #1048 [Verbose] > "FB",
00:00:25 #1049 [Verbose] > fun input ->
00:00:25 #1050 [Verbose] > Seq.singleton 0
00:00:25 #1051 [Verbose] > |> Seq.append (seq { 1 .. input.Length - 1 })
00:00:25 #1052 [Verbose] > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:25 #1053 [Verbose] > |> String.concat " "
00:00:25 #1054 [Verbose] >
00:00:25 #1055 [Verbose] > "FC",
00:00:25 #1056 [Verbose] > fun input ->
00:00:25 #1057 [Verbose] > Array.singleton 0
00:00:25 #1058 [Verbose] > |> Array.append [[| 1 .. input.Length - 1 |]]
00:00:25 #1059 [Verbose] > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:25 #1060 [Verbose] > |> String.concat " "
00:00:25 #1061 [Verbose] > ]]
00:00:25 #1062 [Verbose] > let testCases = seq {
00:00:25 #1063 [Verbose] > "abc", "bca cab abc"
00:00:25 #1064 [Verbose] > "abcde", "bcdea cdeab deabc eabcd abcde"
00:00:25 #1065 [Verbose] > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef
00:00:25 #1066 [Verbose] > hiabcdefg iabcdefgh abcdefghi"
00:00:25 #1067 [Verbose] > "abab", "baba abab baba abab"
00:00:25 #1068 [Verbose] > "aa", "aa aa"
00:00:25 #1069 [Verbose] > "z", "z"
00:00:25 #1070 [Verbose] > }
00:00:25 #1071 [Verbose] > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions
00:00:25 #1072 [Verbose] > testCases
00:00:25 #1073 [Verbose] > rotateStringsTests
00:00:25 #1074 [Verbose] > |> sortResultList
00:00:37 #1075 [Verbose] >
00:00:37 #1076 [Verbose] > ╭─[ 12.12s - stdout ]──────────────────────────────────────────────────────────╮
00:00:37 #1077 [Verbose] > │ │
00:00:37 #1078 [Verbose] > │ │
00:00:37 #1079 [Verbose] > │ Test: rotateStringsTests │
00:00:37 #1080 [Verbose] > │ │
00:00:37 #1081 [Verbose] > │ Solution: abc │
00:00:37 #1082 [Verbose] > │ Test case 1. A. Time: 2L │
00:00:37 #1083 [Verbose] > │ Test case 2. B. Time: 2L │
00:00:37 #1084 [Verbose] > │ Test case 3. C. Time: 2L │
00:00:37 #1085 [Verbose] > │ Test case 4. CA. Time: 6L │
00:00:37 #1086 [Verbose] > │ Test case 5. CB. Time: 3L │
00:00:37 #1087 [Verbose] > │ Test case 6. D. Time: 3L │
00:00:37 #1088 [Verbose] > │ Test case 7. E. Time: 2L │
00:00:37 #1089 [Verbose] > │ Test case 8. F. Time: 3L │
00:00:37 #1090 [Verbose] > │ Test case 9. FA. Time: 4L │
00:00:37 #1091 [Verbose] > │ Test case 10. FB. Time: 12L │
00:00:37 #1092 [Verbose] > │ Test case 11. FC. Time: 15L │
00:00:37 #1093 [Verbose] > │ │
00:00:37 #1094 [Verbose] > │ Solution: abcde │
00:00:37 #1095 [Verbose] > │ Test case 1. A. Time: 3L │
00:00:37 #1096 [Verbose] > │ Test case 2. B. Time: 1L │
00:00:37 #1097 [Verbose] > │ Test case 3. C. Time: 2L │
00:00:37 #1098 [Verbose] > │ Test case 4. CA. Time: 2L │
00:00:37 #1099 [Verbose] > │ Test case 5. CB. Time: 2L │
00:00:37 #1100 [Verbose] > │ Test case 6. D. Time: 6L │
00:00:37 #1101 [Verbose] > │ Test case 7. E. Time: 1L │
00:00:37 #1102 [Verbose] > │ Test case 8. F. Time: 0L │
00:00:37 #1103 [Verbose] > │ Test case 9. FA. Time: 1L │
00:00:37 #1104 [Verbose] > │ Test case 10. FB. Time: 8L │
00:00:37 #1105 [Verbose] > │ Test case 11. FC. Time: 7L │
00:00:37 #1106 [Verbose] > │ │
00:00:37 #1107 [Verbose] > │ Solution: abcdefghi │
00:00:37 #1108 [Verbose] > │ Test case 1. A. Time: 4L │
00:00:37 #1109 [Verbose] > │ Test case 2. B. Time: 5L │
00:00:37 #1110 [Verbose] > │ Test case 3. C. Time: 3L │
00:00:37 #1111 [Verbose] > │ Test case 4. CA. Time: 6L │
00:00:37 #1112 [Verbose] > │ Test case 5. CB. Time: 3L │
00:00:37 #1113 [Verbose] > │ Test case 6. D. Time: 13L │
00:00:37 #1114 [Verbose] > │ Test case 7. E. Time: 4L │
00:00:37 #1115 [Verbose] > │ Test case 8. F. Time: 5L │
00:00:37 #1116 [Verbose] > │ Test case 9. FA. Time: 7L │
00:00:37 #1117 [Verbose] > │ Test case 10. FB. Time: 8L │
00:00:37 #1118 [Verbose] > │ Test case 11. FC. Time: 12L │
00:00:37 #1119 [Verbose] > │ │
00:00:37 #1120 [Verbose] > │ Solution: abab │
00:00:37 #1121 [Verbose] > │ Test case 1. A. Time: 1L │
00:00:37 #1122 [Verbose] > │ Test case 2. B. Time: 1L │
00:00:37 #1123 [Verbose] > │ Test case 3. C. Time: 2L │
00:00:37 #1124 [Verbose] > │ Test case 4. CA. Time: 2L │
00:00:37 #1125 [Verbose] > │ Test case 5. CB. Time: 1L │
00:00:37 #1126 [Verbose] > │ Test case 6. D. Time: 3L │
00:00:37 #1127 [Verbose] > │ Test case 7. E. Time: 1L │
00:00:37 #1128 [Verbose] > │ Test case 8. F. Time: 1L │
00:00:37 #1129 [Verbose] > │ Test case 9. FA. Time: 2L │
00:00:37 #1130 [Verbose] > │ Test case 10. FB. Time: 1L │
00:00:37 #1131 [Verbose] > │ Test case 11. FC. Time: 6L │
00:00:37 #1132 [Verbose] > │ │
00:00:37 #1133 [Verbose] > │ Solution: aa │
00:00:37 #1134 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:37 #1135 [Verbose] > │ Test case 2. B. Time: 0L │
00:00:37 #1136 [Verbose] > │ Test case 3. C. Time: 0L │
00:00:37 #1137 [Verbose] > │ Test case 4. CA. Time: 0L │
00:00:37 #1138 [Verbose] > │ Test case 5. CB. Time: 0L │
00:00:37 #1139 [Verbose] > │ Test case 6. D. Time: 0L │
00:00:37 #1140 [Verbose] > │ Test case 7. E. Time: 0L │
00:00:37 #1141 [Verbose] > │ Test case 8. F. Time: 0L │
00:00:37 #1142 [Verbose] > │ Test case 9. FA. Time: 0L │
00:00:37 #1143 [Verbose] > │ Test case 10. FB. Time: 1L │
00:00:37 #1144 [Verbose] > │ Test case 11. FC. Time: 8L │
00:00:37 #1145 [Verbose] > │ │
00:00:37 #1146 [Verbose] > │ Solution: z │
00:00:37 #1147 [Verbose] > │ Test case 1. A. Time: 0L │
00:00:37 #1148 [Verbose] > │ Test case 2. B. Time: 0L │
00:00:37 #1149 [Verbose] > │ Test case 3. C. Time: 0L │
00:00:37 #1150 [Verbose] > │ Test case 4. CA. Time: 1L │
00:00:37 #1151 [Verbose] > │ Test case 5. CB. Time: 0L │
00:00:37 #1152 [Verbose] > │ Test case 6. D. Time: 0L │
00:00:37 #1153 [Verbose] > │ Test case 7. E. Time: 0L │
00:00:37 #1154 [Verbose] > │ Test case 8. F. Time: 0L │
00:00:37 #1155 [Verbose] > │ Test case 9. FA. Time: 0L │
00:00:37 #1156 [Verbose] > │ Test case 10. FB. Time: 1L │
00:00:37 #1157 [Verbose] > │ Test case 11. FC. Time: 4L │
00:00:37 #1158 [Verbose] > │ │
00:00:37 #1159 [Verbose] > │ Input | Expected │
00:00:37 #1160 [Verbose] > │ │
00:00:37 #1161 [Verbose] > │ | Result │
00:00:37 #1162 [Verbose] > │ │
00:00:37 #1163 [Verbose] > │ | Best │
00:00:37 #1164 [Verbose] > │ --- | --- │
00:00:37 #1165 [Verbose] > │ │
00:00:37 #1166 [Verbose] > │ | --- │
00:00:37 #1167 [Verbose] > │ │
00:00:37 #1168 [Verbose] > │ | --- │
00:00:37 #1169 [Verbose] > │ abc | bca cab abc │
00:00:37 #1170 [Verbose] > │ │
00:00:37 #1171 [Verbose] > │ | bca cab abc │
00:00:37 #1172 [Verbose] > │ │
00:00:37 #1173 [Verbose] > │ | (1, 2) │
00:00:37 #1174 [Verbose] > │ abcde | bcdea cdeab deabc eabcd abcde │
00:00:37 #1175 [Verbose] > │ | bcdea cdeab deabc eabcd abcde │
00:00:37 #1176 [Verbose] > │ | (8, 0) │
00:00:37 #1177 [Verbose] > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:00:37 #1178 [Verbose] > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │
00:00:37 #1179 [Verbose] > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (3, 3) │
00:00:37 #1180 [Verbose] > │ abab | baba abab baba abab │
00:00:37 #1181 [Verbose] > │ | baba abab baba abab │
00:00:37 #1182 [Verbose] > │ | (1, 1) │
00:00:37 #1183 [Verbose] > │ aa | aa aa │
00:00:37 #1184 [Verbose] > │ │
00:00:37 #1185 [Verbose] > │ | aa aa │
00:00:37 #1186 [Verbose] > │ │
00:00:37 #1187 [Verbose] > │ | (1, 0) │
00:00:37 #1188 [Verbose] > │ z | z │
00:00:37 #1189 [Verbose] > │ │
00:00:37 #1190 [Verbose] > │ | z │
00:00:37 #1191 [Verbose] > │ │
00:00:37 #1192 [Verbose] > │ | (1, 0) │
00:00:37 #1193 [Verbose] > │ │
00:00:37 #1194 [Verbose] > │ Average Ranking │
00:00:37 #1195 [Verbose] > │ Test case 1. Average Time: 1L │
00:00:37 #1196 [Verbose] > │ Test case 2. Average Time: 1L │
00:00:37 #1197 [Verbose] > │ Test case 3. Average Time: 1L │
00:00:37 #1198 [Verbose] > │ Test case 5. Average Time: 1L │
00:00:37 #1199 [Verbose] > │ Test case 7. Average Time: 1L │
00:00:37 #1200 [Verbose] > │ Test case 8. Average Time: 1L │
00:00:37 #1201 [Verbose] > │ Test case 4. Average Time: 2L │
00:00:37 #1202 [Verbose] > │ Test case 9. Average Time: 2L │
00:00:37 #1203 [Verbose] > │ Test case 6. Average Time: 4L │
00:00:37 #1204 [Verbose] > │ Test case 10. Average Time: 5L │
00:00:37 #1205 [Verbose] > │ Test case 11. Average Time: 8L │
00:00:37 #1206 [Verbose] > │ │
00:00:37 #1207 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:37 #1208 [Verbose] >
00:00:37 #1209 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:00:37 #1210 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:37 #1211 [Verbose] > │ ## rotate_strings_tests │
00:00:37 #1212 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:37 #1213 [Verbose] >
00:00:37 #1214 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:37 #1215 [Verbose] > // // test
00:00:37 #1216 [Verbose] > // // timeout=60000
00:00:37 #1217 [Verbose] > // // print_code=true
00:00:37 #1218 [Verbose] >
00:00:37 #1219 [Verbose] > inl get_solutions () =
00:00:37 #1220 [Verbose] > [[
00:00:37 #1221 [Verbose] > // "A",
00:00:37 #1222 [Verbose] > // fun (input : string) =>
00:00:37 #1223 [Verbose] > // let resultList =
00:00:37 #1224 [Verbose] > // List.fold (fun acc x =>
00:00:37 #1225 [Verbose] > // let rotate (text : string) (letter : string) =
00:00:37 #1226 [Verbose] > text.Substring (1, input.Length - 1) + letter
00:00:37 #1227 [Verbose] > // [[ rotate (if acc.IsEmpty then input else acc.Head)
00:00:37 #1228 [Verbose] > (string x) ]] /@ acc
00:00:37 #1229 [Verbose] > // ) [[]] (Seq.toList input)
00:00:37 #1230 [Verbose] >
00:00:37 #1231 [Verbose] > // List.foldBack (fun acc x => x + acc + " ") resultList ""
00:00:37 #1232 [Verbose] > // |> fun x => x.TrimEnd ()
00:00:37 #1233 [Verbose] >
00:00:37 #1234 [Verbose] > // "B",
00:00:37 #1235 [Verbose] > // fun input =>
00:00:37 #1236 [Verbose] > // input
00:00:37 #1237 [Verbose] > // |> Seq.toList
00:00:37 #1238 [Verbose] > // |> List.fold (fun (acc : string list) letter =>
00:00:37 #1239 [Verbose] > // let last =
00:00:37 #1240 [Verbose] > // if acc.IsEmpty
00:00:37 #1241 [Verbose] > // then input
00:00:37 #1242 [Verbose] > // else acc.Head
00:00:37 #1243 [Verbose] >
00:00:37 #1244 [Verbose] > // let item = last.[[1 .. input.Length - 1]] + string letter
00:00:37 #1245 [Verbose] >
00:00:37 #1246 [Verbose] > // item :: acc
00:00:37 #1247 [Verbose] > // ) [[]]
00:00:37 #1248 [Verbose] > // |> List.rev
00:00:37 #1249 [Verbose] > // |> String.concat " "
00:00:37 #1250 [Verbose] >
00:00:37 #1251 [Verbose] > // "C",
00:00:37 #1252 [Verbose] > // fun input =>
00:00:37 #1253 [Verbose] > // input
00:00:37 #1254 [Verbose] > // |> Seq.toList
00:00:37 #1255 [Verbose] > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:00:37 #1256 [Verbose] > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:37 #1257 [Verbose] > // |> List.rev
00:00:37 #1258 [Verbose] > // |> List.skip 1
00:00:37 #1259 [Verbose] > // |> String.concat " "
00:00:37 #1260 [Verbose] >
00:00:37 #1261 [Verbose] > // "CA",
00:00:37 #1262 [Verbose] > // fun input =>
00:00:37 #1263 [Verbose] > // input
00:00:37 #1264 [Verbose] > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:00:37 #1265 [Verbose] > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:00:37 #1266 [Verbose] > // |> Seq.rev
00:00:37 #1267 [Verbose] > // |> Seq.skip 1
00:00:37 #1268 [Verbose] > // |> String.concat " "
00:00:37 #1269 [Verbose] >
00:00:37 #1270 [Verbose] > // "CB",
00:00:37 #1271 [Verbose] > // fun input =>
00:00:37 #1272 [Verbose] > // input
00:00:37 #1273 [Verbose] > // |> Seq.toArray
00:00:37 #1274 [Verbose] > // |> Array.fold (fun (acc : a _ string) letter => acc |>
00:00:37 #1275 [Verbose] > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]]))
00:00:37 #1276 [Verbose] > (a ;[[ input ]])
00:00:37 #1277 [Verbose] > // |> Array.rev
00:00:37 #1278 [Verbose] > // |> Array.skip 1
00:00:37 #1279 [Verbose] > // |> String.concat " "
00:00:37 #1280 [Verbose] >
00:00:37 #1281 [Verbose] > // "D",
00:00:37 #1282 [Verbose] > // fun input =>
00:00:37 #1283 [Verbose] > // input
00:00:37 #1284 [Verbose] > // |> Seq.toList
00:00:37 #1285 [Verbose] > // |> fun list =>
00:00:37 #1286 [Verbose] > // let rec loop (acc : list (list char)) = function
00:00:37 #1287 [Verbose] > // | _ when acc.Length = list.Length => acc
00:00:37 #1288 [Verbose] > // | head :: tail =>
00:00:37 #1289 [Verbose] > // let item = tail /@ [[ head ]]
00:00:37 #1290 [Verbose] > // loop (item :: acc) item
00:00:37 #1291 [Verbose] > // | [[]] => [[]]
00:00:37 #1292 [Verbose] > // loop [[]] list
00:00:37 #1293 [Verbose] > // |> List.rev
00:00:37 #1294 [Verbose] > // |> List.map (List.toArray >> String)
00:00:37 #1295 [Verbose] > // |> String.concat " "
00:00:37 #1296 [Verbose] >
00:00:37 #1297 [Verbose] > // "E",
00:00:37 #1298 [Verbose] > // fun input =>
00:00:37 #1299 [Verbose] > // input
00:00:37 #1300 [Verbose] > // |> Seq.toList
00:00:37 #1301 [Verbose] > // |> fun list =>
00:00:37 #1302 [Verbose] > // let rec loop (last : string) = function
00:00:37 #1303 [Verbose] > // | head :: tail =>
00:00:37 #1304 [Verbose] > // let item = last.[[1 .. input.Length - 1]] + string
00:00:37 #1305 [Verbose] > head
00:00:37 #1306 [Verbose] > // item :: loop item tail
00:00:37 #1307 [Verbose] > // | [[]] => [[]]
00:00:37 #1308 [Verbose] > // loop input list
00:00:37 #1309 [Verbose] > // |> String.concat " "
00:00:37 #1310 [Verbose] >
00:00:37 #1311 [Verbose] > "F",
00:00:37 #1312 [Verbose] > fun input =>
00:00:37 #1313 [Verbose] > // Array.singleton 0
00:00:37 #1314 [Verbose] > // |> Array.append [[| 1 .. input.Length - 1 |]]
00:00:37 #1315 [Verbose] > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:37 #1316 [Verbose] > // |> String.concat " "
00:00:37 #1317 [Verbose] > inl input_length = input |> sm.length
00:00:37 #1318 [Verbose] > am.singleton 0i32
00:00:37 #1319 [Verbose] > |> am.append (am'.init_series 1 (input_length - 1) 1)
00:00:37 #1320 [Verbose] > |> am.map (fun i =>
00:00:37 #1321 [Verbose] > inl a = sm.slice input { from = i; to = input_length - 1 } :
00:00:37 #1322 [Verbose] > string
00:00:37 #1323 [Verbose] > inl b = sm.slice input { from = 0; to = i - 1 } : string
00:00:37 #1324 [Verbose] > $"!a + !b" : string
00:00:37 #1325 [Verbose] > )
00:00:37 #1326 [Verbose] > |> sm'.concat " "
00:00:37 #1327 [Verbose] >
00:00:37 #1328 [Verbose] > "FA",
00:00:37 #1329 [Verbose] > fun input =>
00:00:37 #1330 [Verbose] > // List.singleton 0
00:00:37 #1331 [Verbose] > // |> List.append [[ 1 .. input.Length - 1 ]]
00:00:37 #1332 [Verbose] > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:37 #1333 [Verbose] > // |> String.concat " "
00:00:37 #1334 [Verbose] > inl input_length = input |> sm.length
00:00:37 #1335 [Verbose] > listm.singleton 0i32
00:00:37 #1336 [Verbose] > |> listm.append (listm'.init_series 1 (input_length - 1) 1)
00:00:37 #1337 [Verbose] > |> listm.map (fun i =>
00:00:37 #1338 [Verbose] > inl a = sm.slice input { from = i; to = input_length - 1 } :
00:00:37 #1339 [Verbose] > string
00:00:37 #1340 [Verbose] > inl b = if i = 0 then "" else sm.slice input { from = 0; to = i
00:00:37 #1341 [Verbose] > - 1 } : string
00:00:37 #1342 [Verbose] > $"!a + !b" : string
00:00:37 #1343 [Verbose] > )
00:00:37 #1344 [Verbose] > |> listm.toArray
00:00:37 #1345 [Verbose] > |> fun x => x : a i32 _
00:00:37 #1346 [Verbose] > |> sm'.concat " "
00:00:37 #1347 [Verbose] >
00:00:37 #1348 [Verbose] > // "FB",
00:00:37 #1349 [Verbose] > // fun input =>
00:00:37 #1350 [Verbose] > // Seq.singleton 0
00:00:37 #1351 [Verbose] > // // |> Seq.append (seq { 1 .. input.Length - 1 })
00:00:37 #1352 [Verbose] > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:00:37 #1353 [Verbose] > // |> String.concat " "
00:00:37 #1354 [Verbose] >
00:00:37 #1355 [Verbose] > // "FC",
00:00:37 #1356 [Verbose] > // fun input =>
00:00:37 #1357 [Verbose] > // Array.singleton 0
00:00:37 #1358 [Verbose] > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]])
00:00:37 #1359 [Verbose] > // // |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ ..
00:00:37 #1360 [Verbose] > i - 1 ]])
00:00:37 #1361 [Verbose] > // |> String.concat " "
00:00:37 #1362 [Verbose] > ]]
00:00:37 #1363 [Verbose] >
00:00:37 #1364 [Verbose] > inl rec rotate_strings_tests () =
00:00:37 #1365 [Verbose] > inl test_cases = [[
00:00:37 #1366 [Verbose] > "abc", "bca cab abc"
00:00:37 #1367 [Verbose] > "abcde", "bcdea cdeab deabc eabcd abcde"
00:00:37 #1368 [Verbose] > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde
00:00:37 #1369 [Verbose] > ghiabcdef hiabcdefg iabcdefgh abcdefghi"
00:00:37 #1370 [Verbose] > "abab", "baba abab baba abab"
00:00:37 #1371 [Verbose] > "aa", "aa aa"
00:00:37 #1372 [Verbose] > "z", "z"
00:00:37 #1373 [Verbose] > ]]
00:00:37 #1374 [Verbose] >
00:00:37 #1375 [Verbose] > inl solutions = get_solutions ()
00:00:37 #1376 [Verbose] >
00:00:37 #1377 [Verbose] > // inl is_fast () = true
00:00:37 #1378 [Verbose] >
00:00:37 #1379 [Verbose] > inl count =
00:00:37 #1380 [Verbose] > if is_fast ()
00:00:37 #1381 [Verbose] > then 1000i32
00:00:37 #1382 [Verbose] > else 2000000i32
00:00:37 #1383 [Verbose] >
00:00:37 #1384 [Verbose] > run_all (nameof rotate_strings_tests) count solutions test_cases
00:00:37 #1385 [Verbose] > |> sort_result_list
00:00:37 #1386 [Verbose] >
00:00:37 #1387 [Verbose] > rotate_strings_tests ()
00:01:10 #1388 [Verbose] >
00:01:11 #1389 [Verbose] > ╭─[ 33.47s - stdout ]──────────────────────────────────────────────────────────╮
00:01:11 #1390 [Verbose] > │ type UH0 = │
00:01:11 #1391 [Verbose] > │ | UH0_0 of string * string * UH0 │
00:01:11 #1392 [Verbose] > │ | UH0_1 │
00:01:11 #1393 [Verbose] > │ and Mut0 = {mutable l0 : uint64} │
00:01:11 #1394 [Verbose] > │ and Mut1 = {mutable l0 : int32} │
00:01:11 #1395 [Verbose] > │ and UH1 = │
00:01:11 #1396 [Verbose] > │ | UH1_0 of int32 * UH1 │
00:01:11 #1397 [Verbose] > │ | UH1_1 │
00:01:11 #1398 [Verbose] > │ and UH2 = │
00:01:11 #1399 [Verbose] > │ | UH2_0 of string * UH2 │
00:01:11 #1400 [Verbose] > │ | UH2_1 │
00:01:11 #1401 [Verbose] > │ and UH3 = │
00:01:11 #1402 [Verbose] > │ | UH3_0 of int32 * string * (string -> string) * UH3 │
00:01:11 #1403 [Verbose] > │ | UH3_1 │
00:01:11 #1404 [Verbose] > │ and [<Struct>] US0 = │
00:01:11 #1405 [Verbose] > │ | US0_0 │
00:01:11 #1406 [Verbose] > │ | US0_1 of f1_0 : System.ConsoleColor │
00:01:11 #1407 [Verbose] > │ and UH4 = │
00:01:11 #1408 [Verbose] > │ | UH4_0 of int64 * int64 * UH4 │
00:01:11 #1409 [Verbose] > │ | UH4_1 │
00:01:11 #1410 [Verbose] > │ and Mut2 = {mutable l0 : uint64; mutable l1 : UH4; mutable l2 : int64} │
00:01:11 #1411 [Verbose] > │ and UH5 = │
00:01:11 #1412 [Verbose] > │ | UH5_0 of UH2 * US0 * UH5 │
00:01:11 #1413 [Verbose] > │ | UH5_1 │
00:01:11 #1414 [Verbose] > │ and [<Struct>] US1 = │
00:01:11 #1415 [Verbose] > │ | US1_0 │
00:01:11 #1416 [Verbose] > │ | US1_1 of f1_0 : int64 │
00:01:11 #1417 [Verbose] > │ and UH6 = │
00:01:11 #1418 [Verbose] > │ | UH6_0 of int32 * int64 * UH6 │
00:01:11 #1419 [Verbose] > │ | UH6_1 │
00:01:11 #1420 [Verbose] > │ and Mut3 = {mutable l0 : uint64; mutable l1 : UH6; mutable l2 : int32} │
00:01:11 #1421 [Verbose] > │ and UH7 = │
00:01:11 #1422 [Verbose] > │ | UH7_0 of int32 * string * UH7 │
00:01:11 #1423 [Verbose] > │ | UH7_1 │
00:01:11 #1424 [Verbose] > │ let rec method2 (v0 : UH0, v1 : uint64) : uint64 = │
00:01:11 #1425 [Verbose] > │ match v0 with │
00:01:11 #1426 [Verbose] > │ | UH0_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1427 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:01:11 #1428 [Verbose] > │ method2(v4, v5) │
00:01:11 #1429 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:01:11 #1430 [Verbose] > │ v1 │
00:01:11 #1431 [Verbose] > │ and method3 (v0 : (struct (string * string) []), v1 : UH0, v2 : uint64) : │
00:01:11 #1432 [Verbose] > │ uint64 = │
00:01:11 #1433 [Verbose] > │ match v1 with │
00:01:11 #1434 [Verbose] > │ | UH0_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1435 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:11 #1436 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:01:11 #1437 [Verbose] > │ method3(v0, v5, v6) │
00:01:11 #1438 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:01:11 #1439 [Verbose] > │ v2 │
00:01:11 #1440 [Verbose] > │ and method1 (v0 : UH0) : (struct (string * string) []) = │
00:01:11 #1441 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:11 #1442 [Verbose] > │ let v2 : uint64 = method2(v0, v1) │
00:01:11 #1443 [Verbose] > │ let v3 : (struct (string * string) []) = Array.zeroCreate<struct (string │
00:01:11 #1444 [Verbose] > │ * string)> (System.Convert.ToInt32(v2)) │
00:01:11 #1445 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:11 #1446 [Verbose] > │ let v5 : uint64 = method3(v3, v0, v4) │
00:01:11 #1447 [Verbose] > │ v3 │
00:01:11 #1448 [Verbose] > │ and method4 (v0 : uint64, v1 : Mut0) : bool = │
00:01:11 #1449 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:11 #1450 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:11 #1451 [Verbose] > │ v3 │
00:01:11 #1452 [Verbose] > │ and method5 (v0 : int32, v1 : Mut1) : bool = │
00:01:11 #1453 [Verbose] > │ let v2 : int32 = v1.l0 │
00:01:11 #1454 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:11 #1455 [Verbose] > │ v3 │
00:01:11 #1456 [Verbose] > │ and closure1 () (v0 : string) : string = │
00:01:11 #1457 [Verbose] > │ let v1 : int32 = v0.Length │
00:01:11 #1458 [Verbose] > │ let v2 : (int32 []) = Array.zeroCreate<int32> (1) │
00:01:11 #1459 [Verbose] > │ v2.[int 0] <- 0 │
00:01:11 #1460 [Verbose] > │ let v3 : int32 = v1 - 1 │
00:01:11 #1461 [Verbose] > │ let v4 : int32 = v3 - 1 │
00:01:11 #1462 [Verbose] > │ let v5 : int32 = v4 + 1 │
00:01:11 #1463 [Verbose] > │ let v6 : (int32 []) = Array.zeroCreate<int32> (v5) │
00:01:11 #1464 [Verbose] > │ let v7 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #1465 [Verbose] > │ while method5(v5, v7) do │
00:01:11 #1466 [Verbose] > │ let v9 : int32 = v7.l0 │
00:01:11 #1467 [Verbose] > │ let v10 : int32 = 1 + v9 │
00:01:11 #1468 [Verbose] > │ v6.[int v9] <- v10 │
00:01:11 #1469 [Verbose] > │ let v11 : int32 = v9 + 1 │
00:01:11 #1470 [Verbose] > │ v7.l0 <- v11 │
00:01:11 #1471 [Verbose] > │ () │
00:01:11 #1472 [Verbose] > │ let v12 : int32 = v6.Length │
00:01:11 #1473 [Verbose] > │ let v13 : int32 = v2.Length │
00:01:11 #1474 [Verbose] > │ let v14 : int32 = v12 + v13 │
00:01:11 #1475 [Verbose] > │ let v15 : (int32 []) = Array.zeroCreate<int32> (v14) │
00:01:11 #1476 [Verbose] > │ let v16 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #1477 [Verbose] > │ while method5(v14, v16) do │
00:01:11 #1478 [Verbose] > │ let v18 : int32 = v16.l0 │
00:01:11 #1479 [Verbose] > │ let v19 : bool = v18 < v12 │
00:01:11 #1480 [Verbose] > │ let v23 : int32 = │
00:01:11 #1481 [Verbose] > │ if v19 then │
00:01:11 #1482 [Verbose] > │ let v20 : int32 = v6.[int v18] │
00:01:11 #1483 [Verbose] > │ v20 │
00:01:11 #1484 [Verbose] > │ else │
00:01:11 #1485 [Verbose] > │ let v21 : int32 = v18 - v12 │
00:01:11 #1486 [Verbose] > │ let v22 : int32 = v2.[int v21] │
00:01:11 #1487 [Verbose] > │ v22 │
00:01:11 #1488 [Verbose] > │ v15.[int v18] <- v23 │
00:01:11 #1489 [Verbose] > │ let v24 : int32 = v18 + 1 │
00:01:11 #1490 [Verbose] > │ v16.l0 <- v24 │
00:01:11 #1491 [Verbose] > │ () │
00:01:11 #1492 [Verbose] > │ let v25 : int32 = v15.Length │
00:01:11 #1493 [Verbose] > │ let v26 : (string []) = Array.zeroCreate<string> (v25) │
00:01:11 #1494 [Verbose] > │ let v27 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #1495 [Verbose] > │ while method5(v25, v27) do │
00:01:11 #1496 [Verbose] > │ let v29 : int32 = v27.l0 │
00:01:11 #1497 [Verbose] > │ let v30 : int32 = v15.[int v29] │
00:01:11 #1498 [Verbose] > │ let v31 : string = v0.[int v30..int v3] │
00:01:11 #1499 [Verbose] > │ let v32 : int32 = v30 - 1 │
00:01:11 #1500 [Verbose] > │ let v33 : string = v0.[int 0..int v32] │
00:01:11 #1501 [Verbose] > │ let v34 : string = v31 + v33 │
00:01:11 #1502 [Verbose] > │ v26.[int v29] <- v34 │
00:01:11 #1503 [Verbose] > │ let v35 : int32 = v29 + 1 │
00:01:11 #1504 [Verbose] > │ v27.l0 <- v35 │
00:01:11 #1505 [Verbose] > │ () │
00:01:11 #1506 [Verbose] > │ let v36 : string = " " │
00:01:11 #1507 [Verbose] > │ let v37 : string = v26 |> String.concat v36 │
00:01:11 #1508 [Verbose] > │ v37 │
00:01:11 #1509 [Verbose] > │ and method6 (v0 : float, v1 : float) : UH1 = │
00:01:11 #1510 [Verbose] > │ let v2 : bool = v1 < v0 │
00:01:11 #1511 [Verbose] > │ if v2 then │
00:01:11 #1512 [Verbose] > │ let v3 : int32 = int32 v1 │
00:01:11 #1513 [Verbose] > │ let v4 : int32 = 1 + v3 │
00:01:11 #1514 [Verbose] > │ let v5 : float = v1 + 1.0 │
00:01:11 #1515 [Verbose] > │ let v6 : UH1 = method6(v0, v5) │
00:01:11 #1516 [Verbose] > │ UH1_0(v4, v6) │
00:01:11 #1517 [Verbose] > │ else │
00:01:11 #1518 [Verbose] > │ UH1_1 │
00:01:11 #1519 [Verbose] > │ and method7 (v0 : UH1, v1 : UH1) : UH1 = │
00:01:11 #1520 [Verbose] > │ match v0 with │
00:01:11 #1521 [Verbose] > │ | UH1_0(v2, v3) -> (* Cons *) │
00:01:11 #1522 [Verbose] > │ let v4 : UH1 = method7(v3, v1) │
00:01:11 #1523 [Verbose] > │ UH1_0(v2, v4) │
00:01:11 #1524 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:01:11 #1525 [Verbose] > │ v1 │
00:01:11 #1526 [Verbose] > │ and method8 (v0 : string, v1 : int32, v2 : UH1, v3 : UH2) : UH2 = │
00:01:11 #1527 [Verbose] > │ match v2 with │
00:01:11 #1528 [Verbose] > │ | UH1_0(v4, v5) -> (* Cons *) │
00:01:11 #1529 [Verbose] > │ let v6 : UH2 = method8(v0, v1, v5, v3) │
00:01:11 #1530 [Verbose] > │ let v7 : int32 = v1 - 1 │
00:01:11 #1531 [Verbose] > │ let v8 : string = v0.[int v4..int v7] │
00:01:11 #1532 [Verbose] > │ let v9 : bool = v4 = 0 │
00:01:11 #1533 [Verbose] > │ let v13 : string = │
00:01:11 #1534 [Verbose] > │ if v9 then │
00:01:11 #1535 [Verbose] > │ let v10 : string = "" │
00:01:11 #1536 [Verbose] > │ v10 │
00:01:11 #1537 [Verbose] > │ else │
00:01:11 #1538 [Verbose] > │ let v11 : int32 = v4 - 1 │
00:01:11 #1539 [Verbose] > │ let v12 : string = v0.[int 0..int v11] │
00:01:11 #1540 [Verbose] > │ v12 │
00:01:11 #1541 [Verbose] > │ let v14 : string = v8 + v13 │
00:01:11 #1542 [Verbose] > │ UH2_0(v14, v6) │
00:01:11 #1543 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:01:11 #1544 [Verbose] > │ v3 │
00:01:11 #1545 [Verbose] > │ and method10 (v0 : UH2, v1 : int32) : int32 = │
00:01:11 #1546 [Verbose] > │ match v0 with │
00:01:11 #1547 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:01:11 #1548 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:01:11 #1549 [Verbose] > │ method10(v3, v4) │
00:01:11 #1550 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:11 #1551 [Verbose] > │ v1 │
00:01:11 #1552 [Verbose] > │ and method11 (v0 : (string []), v1 : UH2, v2 : int32) : int32 = │
00:01:11 #1553 [Verbose] > │ match v1 with │
00:01:11 #1554 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:11 #1555 [Verbose] > │ v0.[int v2] <- v3 │
00:01:11 #1556 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:01:11 #1557 [Verbose] > │ method11(v0, v4, v5) │
00:01:11 #1558 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:11 #1559 [Verbose] > │ v2 │
00:01:11 #1560 [Verbose] > │ and method9 (v0 : UH2) : (string []) = │
00:01:11 #1561 [Verbose] > │ let v1 : int32 = 0 │
00:01:11 #1562 [Verbose] > │ let v2 : int32 = method10(v0, v1) │
00:01:11 #1563 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> (v2) │
00:01:11 #1564 [Verbose] > │ let v4 : int32 = 0 │
00:01:11 #1565 [Verbose] > │ let v5 : int32 = method11(v3, v0, v4) │
00:01:11 #1566 [Verbose] > │ v3 │
00:01:11 #1567 [Verbose] > │ and closure2 () (v0 : string) : string = │
00:01:11 #1568 [Verbose] > │ let v1 : int32 = v0.Length │
00:01:11 #1569 [Verbose] > │ let v2 : int32 = v1 - 1 │
00:01:11 #1570 [Verbose] > │ let v3 : int32 = v2 - 1 │
00:01:11 #1571 [Verbose] > │ let v4 : float = float v3 │
00:01:11 #1572 [Verbose] > │ let v5 : float = v4 + 1.0 │
00:01:11 #1573 [Verbose] > │ let v6 : float = 0.0 │
00:01:11 #1574 [Verbose] > │ let v7 : UH1 = method6(v5, v6) │
00:01:11 #1575 [Verbose] > │ let v8 : int32 = 0 │
00:01:11 #1576 [Verbose] > │ let v9 : UH1 = UH1_1 │
00:01:11 #1577 [Verbose] > │ let v10 : UH1 = UH1_0(v8, v9) │
00:01:11 #1578 [Verbose] > │ let v11 : UH1 = method7(v7, v10) │
00:01:11 #1579 [Verbose] > │ let v12 : UH2 = UH2_1 │
00:01:11 #1580 [Verbose] > │ let v13 : UH2 = method8(v0, v1, v11, v12) │
00:01:11 #1581 [Verbose] > │ let v14 : (string []) = method9(v13) │
00:01:11 #1582 [Verbose] > │ let v15 : string = " " │
00:01:11 #1583 [Verbose] > │ let v16 : string = v14 |> String.concat v15 │
00:01:11 #1584 [Verbose] > │ v16 │
00:01:11 #1585 [Verbose] > │ and method13 (v0 : UH3, v1 : uint64) : uint64 = │
00:01:11 #1586 [Verbose] > │ match v0 with │
00:01:11 #1587 [Verbose] > │ | UH3_0(v2, v3, v4, v5) -> (* Cons *) │
00:01:11 #1588 [Verbose] > │ let v6 : uint64 = v1 + 1UL │
00:01:11 #1589 [Verbose] > │ method13(v5, v6) │
00:01:11 #1590 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:01:11 #1591 [Verbose] > │ v1 │
00:01:11 #1592 [Verbose] > │ and method14 (v0 : (struct (int32 * string * (string -> string)) []), v1 : │
00:01:11 #1593 [Verbose] > │ UH3, v2 : uint64) : uint64 = │
00:01:11 #1594 [Verbose] > │ match v1 with │
00:01:11 #1595 [Verbose] > │ | UH3_0(v3, v4, v5, v6) -> (* Cons *) │
00:01:11 #1596 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5) │
00:01:11 #1597 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:01:11 #1598 [Verbose] > │ method14(v0, v6, v7) │
00:01:11 #1599 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:01:11 #1600 [Verbose] > │ v2 │
00:01:11 #1601 [Verbose] > │ and method12 (v0 : UH3) : (struct (int32 * string * (string -> string)) []) │
00:01:11 #1602 [Verbose] > │ = │
00:01:11 #1603 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:11 #1604 [Verbose] > │ let v2 : uint64 = method13(v0, v1) │
00:01:11 #1605 [Verbose] > │ let v3 : (struct (int32 * string * (string -> string)) []) = │
00:01:11 #1606 [Verbose] > │ Array.zeroCreate<struct (int32 * string * (string -> string))> │
00:01:11 #1607 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:11 #1608 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:11 #1609 [Verbose] > │ let v5 : uint64 = method14(v3, v0, v4) │
00:01:11 #1610 [Verbose] > │ v3 │
00:01:11 #1611 [Verbose] > │ and method15 (v0 : Mut1) : bool = │
00:01:11 #1612 [Verbose] > │ let v1 : int32 = v0.l0 │
00:01:11 #1613 [Verbose] > │ let v2 : bool = v1 < 2000001 │
00:01:11 #1614 [Verbose] > │ v2 │
00:01:11 #1615 [Verbose] > │ and closure3 (v0 : string, v1 : (string -> string)) (v2 : int32) : string = │
00:01:11 #1616 [Verbose] > │ v1 v0 │
00:01:11 #1617 [Verbose] > │ and method16 (v0 : string, v1 : (string []), v2 : uint64) : bool = │
00:01:11 #1618 [Verbose] > │ let v3 : uint64 = System.Convert.ToUInt64 v1.Length │
00:01:11 #1619 [Verbose] > │ let v4 : bool = v2 < v3 │
00:01:11 #1620 [Verbose] > │ if v4 then │
00:01:11 #1621 [Verbose] > │ let v5 : string = v1.[int v2] │
00:01:11 #1622 [Verbose] > │ let v6 : bool = v0 = v5 │
00:01:11 #1623 [Verbose] > │ if v6 then │
00:01:11 #1624 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:01:11 #1625 [Verbose] > │ method16(v0, v1, v7) │
00:01:11 #1626 [Verbose] > │ else │
00:01:11 #1627 [Verbose] > │ false │
00:01:11 #1628 [Verbose] > │ else │
00:01:11 #1629 [Verbose] > │ true │
00:01:11 #1630 [Verbose] > │ and method17 (v0 : uint64, v1 : Mut2) : bool = │
00:01:11 #1631 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:11 #1632 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:11 #1633 [Verbose] > │ v3 │
00:01:11 #1634 [Verbose] > │ and method18 (v0 : UH4, v1 : UH4) : UH4 = │
00:01:11 #1635 [Verbose] > │ match v0 with │
00:01:11 #1636 [Verbose] > │ | UH4_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1637 [Verbose] > │ let v5 : UH4 = UH4_0(v2, v3, v1) │
00:01:11 #1638 [Verbose] > │ method18(v4, v5) │
00:01:11 #1639 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:01:11 #1640 [Verbose] > │ v1 │
00:01:11 #1641 [Verbose] > │ and method20 (v0 : UH4, v1 : int32) : int32 = │
00:01:11 #1642 [Verbose] > │ match v0 with │
00:01:11 #1643 [Verbose] > │ | UH4_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1644 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:01:11 #1645 [Verbose] > │ method20(v4, v5) │
00:01:11 #1646 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:01:11 #1647 [Verbose] > │ v1 │
00:01:11 #1648 [Verbose] > │ and method21 (v0 : (struct (int64 * int64) []), v1 : UH4, v2 : int32) : │
00:01:11 #1649 [Verbose] > │ int32 = │
00:01:11 #1650 [Verbose] > │ match v1 with │
00:01:11 #1651 [Verbose] > │ | UH4_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1652 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:11 #1653 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:01:11 #1654 [Verbose] > │ method21(v0, v5, v6) │
00:01:11 #1655 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:01:11 #1656 [Verbose] > │ v2 │
00:01:11 #1657 [Verbose] > │ and method19 (v0 : UH4) : (struct (int64 * int64) []) = │
00:01:11 #1658 [Verbose] > │ let v1 : int32 = 0 │
00:01:11 #1659 [Verbose] > │ let v2 : int32 = method20(v0, v1) │
00:01:11 #1660 [Verbose] > │ let v3 : (struct (int64 * int64) []) = Array.zeroCreate<struct (int64 * │
00:01:11 #1661 [Verbose] > │ int64)> (v2) │
00:01:11 #1662 [Verbose] > │ let v4 : int32 = 0 │
00:01:11 #1663 [Verbose] > │ let v5 : int32 = method21(v3, v0, v4) │
00:01:11 #1664 [Verbose] > │ v3 │
00:01:11 #1665 [Verbose] > │ and closure4 () struct (v0 : int64, v1 : int64) : int64 = │
00:01:11 #1666 [Verbose] > │ v1 │
00:01:11 #1667 [Verbose] > │ and method23 (v0 : UH5, v1 : uint64) : uint64 = │
00:01:11 #1668 [Verbose] > │ match v0 with │
00:01:11 #1669 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1670 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:01:11 #1671 [Verbose] > │ method23(v4, v5) │
00:01:11 #1672 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:11 #1673 [Verbose] > │ v1 │
00:01:11 #1674 [Verbose] > │ and method24 (v0 : (struct (UH2 * US0) []), v1 : UH5, v2 : uint64) : uint64 │
00:01:11 #1675 [Verbose] > │ = │
00:01:11 #1676 [Verbose] > │ match v1 with │
00:01:11 #1677 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1678 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:11 #1679 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:01:11 #1680 [Verbose] > │ method24(v0, v5, v6) │
00:01:11 #1681 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:11 #1682 [Verbose] > │ v2 │
00:01:11 #1683 [Verbose] > │ and method22 (v0 : UH5) : (struct (UH2 * US0) []) = │
00:01:11 #1684 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:11 #1685 [Verbose] > │ let v2 : uint64 = method23(v0, v1) │
00:01:11 #1686 [Verbose] > │ let v3 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * US0)> │
00:01:11 #1687 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:11 #1688 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:11 #1689 [Verbose] > │ let v5 : uint64 = method24(v3, v0, v4) │
00:01:11 #1690 [Verbose] > │ v3 │
00:01:11 #1691 [Verbose] > │ and method26 (v0 : UH2, v1 : uint64) : uint64 = │
00:01:11 #1692 [Verbose] > │ match v0 with │
00:01:11 #1693 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:01:11 #1694 [Verbose] > │ let v4 : uint64 = v1 + 1UL │
00:01:11 #1695 [Verbose] > │ method26(v3, v4) │
00:01:11 #1696 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:11 #1697 [Verbose] > │ v1 │
00:01:11 #1698 [Verbose] > │ and method27 (v0 : (string []), v1 : UH2, v2 : uint64) : uint64 = │
00:01:11 #1699 [Verbose] > │ match v1 with │
00:01:11 #1700 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:11 #1701 [Verbose] > │ v0.[int v2] <- v3 │
00:01:11 #1702 [Verbose] > │ let v5 : uint64 = v2 + 1UL │
00:01:11 #1703 [Verbose] > │ method27(v0, v4, v5) │
00:01:11 #1704 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:11 #1705 [Verbose] > │ v2 │
00:01:11 #1706 [Verbose] > │ and method25 (v0 : UH2) : (string []) = │
00:01:11 #1707 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:11 #1708 [Verbose] > │ let v2 : uint64 = method26(v0, v1) │
00:01:11 #1709 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> │
00:01:11 #1710 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:11 #1711 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:11 #1712 [Verbose] > │ let v5 : uint64 = method27(v3, v0, v4) │
00:01:11 #1713 [Verbose] > │ v3 │
00:01:11 #1714 [Verbose] > │ and closure5 () (v0 : int64) : US1 = │
00:01:11 #1715 [Verbose] > │ US1_1(v0) │
00:01:11 #1716 [Verbose] > │ and method28 (v0 : uint64, v1 : Mut3) : bool = │
00:01:11 #1717 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:11 #1718 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:11 #1719 [Verbose] > │ v3 │
00:01:11 #1720 [Verbose] > │ and method29 (v0 : UH6, v1 : UH6) : UH6 = │
00:01:11 #1721 [Verbose] > │ match v0 with │
00:01:11 #1722 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1723 [Verbose] > │ let v5 : UH6 = UH6_0(v2, v3, v1) │
00:01:11 #1724 [Verbose] > │ method29(v4, v5) │
00:01:11 #1725 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:11 #1726 [Verbose] > │ v1 │
00:01:11 #1727 [Verbose] > │ and method31 (v0 : UH6, v1 : int32) : int32 = │
00:01:11 #1728 [Verbose] > │ match v0 with │
00:01:11 #1729 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1730 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:01:11 #1731 [Verbose] > │ method31(v4, v5) │
00:01:11 #1732 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:11 #1733 [Verbose] > │ v1 │
00:01:11 #1734 [Verbose] > │ and method32 (v0 : (struct (int32 * int64) []), v1 : UH6, v2 : int32) : │
00:01:11 #1735 [Verbose] > │ int32 = │
00:01:11 #1736 [Verbose] > │ match v1 with │
00:01:11 #1737 [Verbose] > │ | UH6_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1738 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:11 #1739 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:01:11 #1740 [Verbose] > │ method32(v0, v5, v6) │
00:01:11 #1741 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:11 #1742 [Verbose] > │ v2 │
00:01:11 #1743 [Verbose] > │ and method30 (v0 : UH6) : (struct (int32 * int64) []) = │
00:01:11 #1744 [Verbose] > │ let v1 : int32 = 0 │
00:01:11 #1745 [Verbose] > │ let v2 : int32 = method31(v0, v1) │
00:01:11 #1746 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:01:11 #1747 [Verbose] > │ int64)> (v2) │
00:01:11 #1748 [Verbose] > │ let v4 : int32 = 0 │
00:01:11 #1749 [Verbose] > │ let v5 : int32 = method32(v3, v0, v4) │
00:01:11 #1750 [Verbose] > │ v3 │
00:01:11 #1751 [Verbose] > │ and method33 (v0 : UH2, v1 : UH7, v2 : int32) : struct (UH7 * int32) = │
00:01:11 #1752 [Verbose] > │ match v0 with │
00:01:11 #1753 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:11 #1754 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:01:11 #1755 [Verbose] > │ let v6 : UH7 = UH7_0(v2, v3, v1) │
00:01:11 #1756 [Verbose] > │ method33(v4, v6, v5) │
00:01:11 #1757 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:11 #1758 [Verbose] > │ struct (v1, v2) │
00:01:11 #1759 [Verbose] > │ and method34 (v0 : UH7, v1 : UH7) : UH7 = │
00:01:11 #1760 [Verbose] > │ match v0 with │
00:01:11 #1761 [Verbose] > │ | UH7_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1762 [Verbose] > │ let v5 : UH7 = UH7_0(v2, v3, v1) │
00:01:11 #1763 [Verbose] > │ method34(v4, v5) │
00:01:11 #1764 [Verbose] > │ | UH7_1 -> (* Nil *) │
00:01:11 #1765 [Verbose] > │ v1 │
00:01:11 #1766 [Verbose] > │ and method35 (v0 : Map<int32, int64>, v1 : UH7, v2 : UH2) : UH2 = │
00:01:11 #1767 [Verbose] > │ match v1 with │
00:01:11 #1768 [Verbose] > │ | UH7_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1769 [Verbose] > │ let v6 : UH2 = method35(v0, v5, v2) │
00:01:11 #1770 [Verbose] > │ let v7 : int64 = v0.[v3] │
00:01:11 #1771 [Verbose] > │ let v8 : int32 = int32 v7 │
00:01:11 #1772 [Verbose] > │ let v9 : string = v4.PadRight v8 │
00:01:11 #1773 [Verbose] > │ UH2_0(v9, v6) │
00:01:11 #1774 [Verbose] > │ | UH7_1 -> (* Nil *) │
00:01:11 #1775 [Verbose] > │ v2 │
00:01:11 #1776 [Verbose] > │ and method37 (v0 : UH6, v1 : uint64) : uint64 = │
00:01:11 #1777 [Verbose] > │ match v0 with │
00:01:11 #1778 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:01:11 #1779 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:01:11 #1780 [Verbose] > │ method37(v4, v5) │
00:01:11 #1781 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:11 #1782 [Verbose] > │ v1 │
00:01:11 #1783 [Verbose] > │ and method38 (v0 : (struct (int32 * int64) []), v1 : UH6, v2 : uint64) : │
00:01:11 #1784 [Verbose] > │ uint64 = │
00:01:11 #1785 [Verbose] > │ match v1 with │
00:01:11 #1786 [Verbose] > │ | UH6_0(v3, v4, v5) -> (* Cons *) │
00:01:11 #1787 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:11 #1788 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:01:11 #1789 [Verbose] > │ method38(v0, v5, v6) │
00:01:11 #1790 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:11 #1791 [Verbose] > │ v2 │
00:01:11 #1792 [Verbose] > │ and method36 (v0 : UH6) : (struct (int32 * int64) []) = │
00:01:11 #1793 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:11 #1794 [Verbose] > │ let v2 : uint64 = method37(v0, v1) │
00:01:11 #1795 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:01:11 #1796 [Verbose] > │ int64)> (System.Convert.ToInt32(v2)) │
00:01:11 #1797 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:11 #1798 [Verbose] > │ let v5 : uint64 = method38(v3, v0, v4) │
00:01:11 #1799 [Verbose] > │ v3 │
00:01:11 #1800 [Verbose] > │ and closure6 () struct (v0 : int32, v1 : int64) : int64 = │
00:01:11 #1801 [Verbose] > │ v1 │
00:01:11 #1802 [Verbose] > │ and closure0 () () : unit = │
00:01:11 #1803 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:01:11 #1804 [Verbose] > │ let v1 : string = nameof v0 │
00:01:11 #1805 [Verbose] > │ let v2 : string = "" │
00:01:11 #1806 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #1807 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #1808 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:01:11 #1809 [Verbose] > │ System.Console.WriteLine v3 │
00:01:11 #1810 [Verbose] > │ let v4 : string = "abc" │
00:01:11 #1811 [Verbose] > │ let v5 : string = "bca cab abc" │
00:01:11 #1812 [Verbose] > │ let v6 : string = "abcde" │
00:01:11 #1813 [Verbose] > │ let v7 : string = "bcdea cdeab deabc eabcd abcde" │
00:01:11 #1814 [Verbose] > │ let v8 : string = "abcdefghi" │
00:01:11 #1815 [Verbose] > │ let v9 : string = "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │
00:01:11 #1816 [Verbose] > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi" │
00:01:11 #1817 [Verbose] > │ let v10 : string = "abab" │
00:01:11 #1818 [Verbose] > │ let v11 : string = "baba abab baba abab" │
00:01:11 #1819 [Verbose] > │ let v12 : string = "aa" │
00:01:11 #1820 [Verbose] > │ let v13 : string = "aa aa" │
00:01:11 #1821 [Verbose] > │ let v14 : string = "z" │
00:01:11 #1822 [Verbose] > │ let v15 : UH0 = UH0_1 │
00:01:11 #1823 [Verbose] > │ let v16 : UH0 = UH0_0(v14, v14, v15) │
00:01:11 #1824 [Verbose] > │ let v17 : UH0 = UH0_0(v12, v13, v16) │
00:01:11 #1825 [Verbose] > │ let v18 : UH0 = UH0_0(v10, v11, v17) │
00:01:11 #1826 [Verbose] > │ let v19 : UH0 = UH0_0(v8, v9, v18) │
00:01:11 #1827 [Verbose] > │ let v20 : UH0 = UH0_0(v6, v7, v19) │
00:01:11 #1828 [Verbose] > │ let v21 : UH0 = UH0_0(v4, v5, v20) │
00:01:11 #1829 [Verbose] > │ let v22 : (struct (string * string) []) = method1(v21) │
00:01:11 #1830 [Verbose] > │ let v23 : uint64 = System.Convert.ToUInt64 v22.Length │
00:01:11 #1831 [Verbose] > │ let v24 : (struct (string * string * string * (int64 [])) []) = │
00:01:11 #1832 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:01:11 #1833 [Verbose] > │ (System.Convert.ToInt32(v23)) │
00:01:11 #1834 [Verbose] > │ let v25 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1835 [Verbose] > │ while method4(v23, v25) do │
00:01:11 #1836 [Verbose] > │ let v27 : uint64 = v25.l0 │
00:01:11 #1837 [Verbose] > │ let struct (v28 : string, v29 : string) = v22.[int v27] │
00:01:11 #1838 [Verbose] > │ let v30 : string = $"%A{v28}" │
00:01:11 #1839 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #1840 [Verbose] > │ let v31 : string = $"Solution: {v30} " │
00:01:11 #1841 [Verbose] > │ System.Console.WriteLine v31 │
00:01:11 #1842 [Verbose] > │ let v32 : int32 = 0 │
00:01:11 #1843 [Verbose] > │ let v33 : string = "F" │
00:01:11 #1844 [Verbose] > │ let v34 : (string -> string) = closure1() │
00:01:11 #1845 [Verbose] > │ let v35 : int32 = 1 │
00:01:11 #1846 [Verbose] > │ let v36 : string = "FA" │
00:01:11 #1847 [Verbose] > │ let v37 : (string -> string) = closure2() │
00:01:11 #1848 [Verbose] > │ let v38 : UH3 = UH3_1 │
00:01:11 #1849 [Verbose] > │ let v39 : UH3 = UH3_0(v35, v36, v37, v38) │
00:01:11 #1850 [Verbose] > │ let v40 : UH3 = UH3_0(v32, v33, v34, v39) │
00:01:11 #1851 [Verbose] > │ let v41 : (struct (int32 * string * (string -> string)) []) = │
00:01:11 #1852 [Verbose] > │ method12(v40) │
00:01:11 #1853 [Verbose] > │ let v42 : uint64 = System.Convert.ToUInt64 v41.Length │
00:01:11 #1854 [Verbose] > │ let v43 : (struct (string * int64) []) = Array.zeroCreate<struct │
00:01:11 #1855 [Verbose] > │ (string * int64)> (System.Convert.ToInt32(v42)) │
00:01:11 #1856 [Verbose] > │ let v44 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1857 [Verbose] > │ while method4(v42, v44) do │
00:01:11 #1858 [Verbose] > │ let v46 : uint64 = v44.l0 │
00:01:11 #1859 [Verbose] > │ let struct (v47 : int32, v48 : string, v49 : (string -> string)) │
00:01:11 #1860 [Verbose] > │ = v41.[int v46] │
00:01:11 #1861 [Verbose] > │ let mutable result = None │
00:01:11 #1862 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #1863 [Verbose] > │ #if !WASM │
00:01:11 #1864 [Verbose] > │ () │
00:01:11 #1865 [Verbose] > │ #else │
00:01:11 #1866 [Verbose] > │ () │
00:01:11 #1867 [Verbose] > │ #endif │
00:01:11 #1868 [Verbose] > │ #else │
00:01:11 #1869 [Verbose] > │ System.GC.Collect () │
00:01:11 #1870 [Verbose] > │ () │
00:01:11 #1871 [Verbose] > │ #endif │
00:01:11 #1872 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #1873 [Verbose] > │ result |> Option.get │
00:01:11 #1874 [Verbose] > │ let v50 : (unit -> System.Diagnostics.Stopwatch) = │
00:01:11 #1875 [Verbose] > │ System.Diagnostics.Stopwatch │
00:01:11 #1876 [Verbose] > │ let v51 : System.Diagnostics.Stopwatch = v50 () │
00:01:11 #1877 [Verbose] > │ v51.Start () │
00:01:11 #1878 [Verbose] > │ let v52 : int64 = v51.ElapsedMilliseconds │
00:01:11 #1879 [Verbose] > │ let v53 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:01:11 #1880 [Verbose] > │ let v54 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #1881 [Verbose] > │ while method15(v54) do │
00:01:11 #1882 [Verbose] > │ let v56 : int32 = v54.l0 │
00:01:11 #1883 [Verbose] > │ v53.[int v56] <- v56 │
00:01:11 #1884 [Verbose] > │ let v57 : int32 = v56 + 1 │
00:01:11 #1885 [Verbose] > │ v54.l0 <- v57 │
00:01:11 #1886 [Verbose] > │ () │
00:01:11 #1887 [Verbose] > │ let v58 : (int32 -> string) = closure3(v28, v49) │
00:01:11 #1888 [Verbose] > │ let v59 : (string []) = v53 |> Array.Parallel.map v58 │
00:01:11 #1889 [Verbose] > │ let v60 : int32 = v59.Length │
00:01:11 #1890 [Verbose] > │ let v61 : int32 = v60 - 1 │
00:01:11 #1891 [Verbose] > │ let v62 : string = v59.[int v61] │
00:01:11 #1892 [Verbose] > │ let v63 : int64 = v51.ElapsedMilliseconds │
00:01:11 #1893 [Verbose] > │ let v64 : int64 = v63 - v52 │
00:01:11 #1894 [Verbose] > │ let v65 : string = $"Test case {v47 + 1}. {v48}. Time: {v64} " │
00:01:11 #1895 [Verbose] > │ System.Console.WriteLine v65 │
00:01:11 #1896 [Verbose] > │ v43.[int v46] <- struct (v62, v64) │
00:01:11 #1897 [Verbose] > │ let v66 : uint64 = v46 + 1UL │
00:01:11 #1898 [Verbose] > │ v44.l0 <- v66 │
00:01:11 #1899 [Verbose] > │ () │
00:01:11 #1900 [Verbose] > │ let v67 : uint64 = System.Convert.ToUInt64 v43.Length │
00:01:11 #1901 [Verbose] > │ let v68 : (string []) = Array.zeroCreate<string> │
00:01:11 #1902 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #1903 [Verbose] > │ let v69 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1904 [Verbose] > │ while method4(v67, v69) do │
00:01:11 #1905 [Verbose] > │ let v71 : uint64 = v69.l0 │
00:01:11 #1906 [Verbose] > │ let struct (v72 : string, v73 : int64) = v43.[int v71] │
00:01:11 #1907 [Verbose] > │ v68.[int v71] <- v72 │
00:01:11 #1908 [Verbose] > │ let v74 : uint64 = v71 + 1UL │
00:01:11 #1909 [Verbose] > │ v69.l0 <- v74 │
00:01:11 #1910 [Verbose] > │ () │
00:01:11 #1911 [Verbose] > │ let v75 : uint64 = System.Convert.ToUInt64 v68.Length │
00:01:11 #1912 [Verbose] > │ let v76 : bool = v75 <= 1UL │
00:01:11 #1913 [Verbose] > │ if v76 then │
00:01:11 #1914 [Verbose] > │ () │
00:01:11 #1915 [Verbose] > │ else │
00:01:11 #1916 [Verbose] > │ let v77 : string = v68.[int 0UL] │
00:01:11 #1917 [Verbose] > │ let v78 : uint64 = 0UL │
00:01:11 #1918 [Verbose] > │ let v79 : bool = method16(v77, v68, v78) │
00:01:11 #1919 [Verbose] > │ if v79 then │
00:01:11 #1920 [Verbose] > │ () │
00:01:11 #1921 [Verbose] > │ else │
00:01:11 #1922 [Verbose] > │ let v80 : string = $"Challenge error: {v68}" │
00:01:11 #1923 [Verbose] > │ failwith<unit> v80 │
00:01:11 #1924 [Verbose] > │ let v81 : string = $"%A{v29}" │
00:01:11 #1925 [Verbose] > │ let v82 : (string []) = Array.zeroCreate<string> │
00:01:11 #1926 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #1927 [Verbose] > │ let v83 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1928 [Verbose] > │ while method4(v67, v83) do │
00:01:11 #1929 [Verbose] > │ let v85 : uint64 = v83.l0 │
00:01:11 #1930 [Verbose] > │ let struct (v86 : string, v87 : int64) = v43.[int v85] │
00:01:11 #1931 [Verbose] > │ v82.[int v85] <- v86 │
00:01:11 #1932 [Verbose] > │ let v88 : uint64 = v85 + 1UL │
00:01:11 #1933 [Verbose] > │ v83.l0 <- v88 │
00:01:11 #1934 [Verbose] > │ () │
00:01:11 #1935 [Verbose] > │ let v89 : string = v82.[int 0UL] │
00:01:11 #1936 [Verbose] > │ let v90 : string = $"%A{v89}" │
00:01:11 #1937 [Verbose] > │ let v91 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #1938 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #1939 [Verbose] > │ let v92 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1940 [Verbose] > │ while method4(v67, v92) do │
00:01:11 #1941 [Verbose] > │ let v94 : uint64 = v92.l0 │
00:01:11 #1942 [Verbose] > │ let struct (v95 : string, v96 : int64) = v43.[int v94] │
00:01:11 #1943 [Verbose] > │ v91.[int v94] <- v96 │
00:01:11 #1944 [Verbose] > │ let v97 : uint64 = v94 + 1UL │
00:01:11 #1945 [Verbose] > │ v92.l0 <- v97 │
00:01:11 #1946 [Verbose] > │ () │
00:01:11 #1947 [Verbose] > │ v24.[int v27] <- struct (v81, v30, v90, v91) │
00:01:11 #1948 [Verbose] > │ let v98 : uint64 = v27 + 1UL │
00:01:11 #1949 [Verbose] > │ v25.l0 <- v98 │
00:01:11 #1950 [Verbose] > │ () │
00:01:11 #1951 [Verbose] > │ let v99 : uint64 = System.Convert.ToUInt64 v24.Length │
00:01:11 #1952 [Verbose] > │ let v100 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:01:11 #1953 [Verbose] > │ US0)> (System.Convert.ToInt32(v99)) │
00:01:11 #1954 [Verbose] > │ let v101 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #1955 [Verbose] > │ while method4(v99, v101) do │
00:01:11 #1956 [Verbose] > │ let v103 : uint64 = v101.l0 │
00:01:11 #1957 [Verbose] > │ let struct (v104 : string, v105 : string, v106 : string, v107 : │
00:01:11 #1958 [Verbose] > │ (int64 [])) = v24.[int v103] │
00:01:11 #1959 [Verbose] > │ let v108 : uint64 = System.Convert.ToUInt64 v107.Length │
00:01:11 #1960 [Verbose] > │ let v109 : UH4 = UH4_1 │
00:01:11 #1961 [Verbose] > │ let v110 : Mut2 = {l0 = 0UL; l1 = v109; l2 = 0L} : Mut2 │
00:01:11 #1962 [Verbose] > │ while method17(v108, v110) do │
00:01:11 #1963 [Verbose] > │ let v112 : uint64 = v110.l0 │
00:01:11 #1964 [Verbose] > │ let struct (v113 : UH4, v114 : int64) = v110.l1, v110.l2 │
00:01:11 #1965 [Verbose] > │ let v115 : int64 = v107.[int v112] │
00:01:11 #1966 [Verbose] > │ let v116 : int64 = v114 + 1L │
00:01:11 #1967 [Verbose] > │ let v117 : uint64 = v112 + 1UL │
00:01:11 #1968 [Verbose] > │ let v118 : UH4 = UH4_0(v114, v115, v113) │
00:01:11 #1969 [Verbose] > │ v110.l0 <- v117 │
00:01:11 #1970 [Verbose] > │ v110.l1 <- v118 │
00:01:11 #1971 [Verbose] > │ v110.l2 <- v116 │
00:01:11 #1972 [Verbose] > │ () │
00:01:11 #1973 [Verbose] > │ let struct (v119 : UH4, v120 : int64) = v110.l1, v110.l2 │
00:01:11 #1974 [Verbose] > │ let v121 : UH4 = UH4_1 │
00:01:11 #1975 [Verbose] > │ let v122 : UH4 = method18(v119, v121) │
00:01:11 #1976 [Verbose] > │ let v123 : (struct (int64 * int64) []) = method19(v122) │
00:01:11 #1977 [Verbose] > │ let v124 : int32 = v123.Length │
00:01:11 #1978 [Verbose] > │ let v125 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:01:11 #1979 [Verbose] > │ (int64 * int64)> (v124) │
00:01:11 #1980 [Verbose] > │ let v126 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #1981 [Verbose] > │ while method5(v124, v126) do │
00:01:11 #1982 [Verbose] > │ let v128 : int32 = v126.l0 │
00:01:11 #1983 [Verbose] > │ let struct (v129 : int64, v130 : int64) = v123.[int v128] │
00:01:11 #1984 [Verbose] > │ let v131 : int64 = v129 + 1L │
00:01:11 #1985 [Verbose] > │ v125.[int v128] <- struct (v131, v130) │
00:01:11 #1986 [Verbose] > │ let v132 : int32 = v128 + 1 │
00:01:11 #1987 [Verbose] > │ v126.l0 <- v132 │
00:01:11 #1988 [Verbose] > │ () │
00:01:11 #1989 [Verbose] > │ let v133 : (struct (int64 * int64) -> int64) = closure4() │
00:01:11 #1990 [Verbose] > │ let v134 : (struct (int64 * int64) []) = v125 |> Array.sortBy v133 │
00:01:11 #1991 [Verbose] > │ let struct (v135 : int64, v136 : int64) = v134.[int 0] │
00:01:11 #1992 [Verbose] > │ let v137 : string = $"%A{struct (v135, v136)}" │
00:01:11 #1993 [Verbose] > │ let v138 : bool = v104 = v106 │
00:01:11 #1994 [Verbose] > │ let v143 : US0 = │
00:01:11 #1995 [Verbose] > │ if v138 then │
00:01:11 #1996 [Verbose] > │ let v139 : System.ConsoleColor = │
00:01:11 #1997 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:01:11 #1998 [Verbose] > │ US0_1(v139) │
00:01:11 #1999 [Verbose] > │ else │
00:01:11 #2000 [Verbose] > │ let v141 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:01:11 #2001 [Verbose] > │ US0_1(v141) │
00:01:11 #2002 [Verbose] > │ let v144 : UH2 = UH2_1 │
00:01:11 #2003 [Verbose] > │ let v145 : UH2 = UH2_0(v137, v144) │
00:01:11 #2004 [Verbose] > │ let v146 : UH2 = UH2_0(v106, v145) │
00:01:11 #2005 [Verbose] > │ let v147 : UH2 = UH2_0(v104, v146) │
00:01:11 #2006 [Verbose] > │ let v148 : UH2 = UH2_0(v105, v147) │
00:01:11 #2007 [Verbose] > │ v100.[int v103] <- struct (v148, v143) │
00:01:11 #2008 [Verbose] > │ let v149 : uint64 = v103 + 1UL │
00:01:11 #2009 [Verbose] > │ v101.l0 <- v149 │
00:01:11 #2010 [Verbose] > │ () │
00:01:11 #2011 [Verbose] > │ let v150 : string = "Input" │
00:01:11 #2012 [Verbose] > │ let v151 : string = "Expected" │
00:01:11 #2013 [Verbose] > │ let v152 : string = "Result" │
00:01:11 #2014 [Verbose] > │ let v153 : string = "Best" │
00:01:11 #2015 [Verbose] > │ let v154 : UH2 = UH2_1 │
00:01:11 #2016 [Verbose] > │ let v155 : UH2 = UH2_0(v153, v154) │
00:01:11 #2017 [Verbose] > │ let v156 : UH2 = UH2_0(v152, v155) │
00:01:11 #2018 [Verbose] > │ let v157 : UH2 = UH2_0(v151, v156) │
00:01:11 #2019 [Verbose] > │ let v158 : UH2 = UH2_0(v150, v157) │
00:01:11 #2020 [Verbose] > │ let v159 : US0 = US0_0 │
00:01:11 #2021 [Verbose] > │ let v160 : string = "---" │
00:01:11 #2022 [Verbose] > │ let v161 : UH2 = UH2_1 │
00:01:11 #2023 [Verbose] > │ let v162 : UH2 = UH2_0(v160, v161) │
00:01:11 #2024 [Verbose] > │ let v163 : UH2 = UH2_0(v160, v162) │
00:01:11 #2025 [Verbose] > │ let v164 : UH2 = UH2_0(v160, v163) │
00:01:11 #2026 [Verbose] > │ let v165 : UH2 = UH2_0(v160, v164) │
00:01:11 #2027 [Verbose] > │ let v166 : US0 = US0_0 │
00:01:11 #2028 [Verbose] > │ let v167 : UH5 = UH5_1 │
00:01:11 #2029 [Verbose] > │ let v168 : UH5 = UH5_0(v165, v166, v167) │
00:01:11 #2030 [Verbose] > │ let v169 : UH5 = UH5_0(v158, v159, v168) │
00:01:11 #2031 [Verbose] > │ let v170 : (struct (UH2 * US0) []) = method22(v169) │
00:01:11 #2032 [Verbose] > │ let v171 : uint64 = System.Convert.ToUInt64 v170.Length │
00:01:11 #2033 [Verbose] > │ let v172 : uint64 = System.Convert.ToUInt64 v100.Length │
00:01:11 #2034 [Verbose] > │ let v173 : uint64 = v171 + v172 │
00:01:11 #2035 [Verbose] > │ let v174 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:01:11 #2036 [Verbose] > │ US0)> (System.Convert.ToInt32(v173)) │
00:01:11 #2037 [Verbose] > │ let v175 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2038 [Verbose] > │ while method4(v173, v175) do │
00:01:11 #2039 [Verbose] > │ let v177 : uint64 = v175.l0 │
00:01:11 #2040 [Verbose] > │ let v178 : bool = v177 < v171 │
00:01:11 #2041 [Verbose] > │ let struct (v184 : UH2, v185 : US0) = │
00:01:11 #2042 [Verbose] > │ if v178 then │
00:01:11 #2043 [Verbose] > │ let struct (v179 : UH2, v180 : US0) = v170.[int v177] │
00:01:11 #2044 [Verbose] > │ struct (v179, v180) │
00:01:11 #2045 [Verbose] > │ else │
00:01:11 #2046 [Verbose] > │ let v181 : uint64 = v177 - v171 │
00:01:11 #2047 [Verbose] > │ let struct (v182 : UH2, v183 : US0) = v100.[int v181] │
00:01:11 #2048 [Verbose] > │ struct (v182, v183) │
00:01:11 #2049 [Verbose] > │ v174.[int v177] <- struct (v184, v185) │
00:01:11 #2050 [Verbose] > │ let v186 : uint64 = v177 + 1UL │
00:01:11 #2051 [Verbose] > │ v175.l0 <- v186 │
00:01:11 #2052 [Verbose] > │ () │
00:01:11 #2053 [Verbose] > │ let v187 : uint64 = System.Convert.ToUInt64 v174.Length │
00:01:11 #2054 [Verbose] > │ let v188 : ((string []) []) = Array.zeroCreate<(string [])> │
00:01:11 #2055 [Verbose] > │ (System.Convert.ToInt32(v187)) │
00:01:11 #2056 [Verbose] > │ let v189 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2057 [Verbose] > │ while method4(v187, v189) do │
00:01:11 #2058 [Verbose] > │ let v191 : uint64 = v189.l0 │
00:01:11 #2059 [Verbose] > │ let struct (v192 : UH2, v193 : US0) = v174.[int v191] │
00:01:11 #2060 [Verbose] > │ let v194 : (string []) = method25(v192) │
00:01:11 #2061 [Verbose] > │ v188.[int v191] <- v194 │
00:01:11 #2062 [Verbose] > │ let v195 : uint64 = v191 + 1UL │
00:01:11 #2063 [Verbose] > │ v189.l0 <- v195 │
00:01:11 #2064 [Verbose] > │ () │
00:01:11 #2065 [Verbose] > │ let v196 : ((string []) []) = v188 |> Array.transpose │
00:01:11 #2066 [Verbose] > │ let v197 : uint64 = System.Convert.ToUInt64 v196.Length │
00:01:11 #2067 [Verbose] > │ let v198 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2068 [Verbose] > │ (System.Convert.ToInt32(v197)) │
00:01:11 #2069 [Verbose] > │ let v199 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2070 [Verbose] > │ while method4(v197, v199) do │
00:01:11 #2071 [Verbose] > │ let v201 : uint64 = v199.l0 │
00:01:11 #2072 [Verbose] > │ let v202 : (string []) = v196.[int v201] │
00:01:11 #2073 [Verbose] > │ let v203 : uint64 = System.Convert.ToUInt64 v202.Length │
00:01:11 #2074 [Verbose] > │ let v204 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2075 [Verbose] > │ (System.Convert.ToInt32(v203)) │
00:01:11 #2076 [Verbose] > │ let v205 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2077 [Verbose] > │ while method4(v203, v205) do │
00:01:11 #2078 [Verbose] > │ let v207 : uint64 = v205.l0 │
00:01:11 #2079 [Verbose] > │ let v208 : string = v202.[int v207] │
00:01:11 #2080 [Verbose] > │ let v209 : int64 = System.Convert.ToInt64 v208.Length │
00:01:11 #2081 [Verbose] > │ v204.[int v207] <- v209 │
00:01:11 #2082 [Verbose] > │ let v210 : uint64 = v207 + 1UL │
00:01:11 #2083 [Verbose] > │ v205.l0 <- v210 │
00:01:11 #2084 [Verbose] > │ () │
00:01:11 #2085 [Verbose] > │ let v211 : (int64 []) = v204 |> Array.sortDescending │
00:01:11 #2086 [Verbose] > │ let v212 : int64 option = v211 |> Array.tryItem 0 │
00:01:11 #2087 [Verbose] > │ let v213 : (int64 -> US1) = closure5() │
00:01:11 #2088 [Verbose] > │ let v214 : US1 = US1_0 │
00:01:11 #2089 [Verbose] > │ let v215 : US1 = v212 |> Option.map v213 |> Option.defaultValue v214 │
00:01:11 #2090 [Verbose] > │ let v218 : int64 = │
00:01:11 #2091 [Verbose] > │ match v215 with │
00:01:11 #2092 [Verbose] > │ | US1_0 -> (* None *) │
00:01:11 #2093 [Verbose] > │ 0L │
00:01:11 #2094 [Verbose] > │ | US1_1(v216) -> (* Some *) │
00:01:11 #2095 [Verbose] > │ v216 │
00:01:11 #2096 [Verbose] > │ v198.[int v201] <- v218 │
00:01:11 #2097 [Verbose] > │ let v219 : uint64 = v201 + 1UL │
00:01:11 #2098 [Verbose] > │ v199.l0 <- v219 │
00:01:11 #2099 [Verbose] > │ () │
00:01:11 #2100 [Verbose] > │ let v220 : uint64 = System.Convert.ToUInt64 v198.Length │
00:01:11 #2101 [Verbose] > │ let v221 : UH6 = UH6_1 │
00:01:11 #2102 [Verbose] > │ let v222 : Mut3 = {l0 = 0UL; l1 = v221; l2 = 0} : Mut3 │
00:01:11 #2103 [Verbose] > │ while method28(v220, v222) do │
00:01:11 #2104 [Verbose] > │ let v224 : uint64 = v222.l0 │
00:01:11 #2105 [Verbose] > │ let struct (v225 : UH6, v226 : int32) = v222.l1, v222.l2 │
00:01:11 #2106 [Verbose] > │ let v227 : int64 = v198.[int v224] │
00:01:11 #2107 [Verbose] > │ let v228 : int32 = v226 + 1 │
00:01:11 #2108 [Verbose] > │ let v229 : uint64 = v224 + 1UL │
00:01:11 #2109 [Verbose] > │ let v230 : UH6 = UH6_0(v226, v227, v225) │
00:01:11 #2110 [Verbose] > │ v222.l0 <- v229 │
00:01:11 #2111 [Verbose] > │ v222.l1 <- v230 │
00:01:11 #2112 [Verbose] > │ v222.l2 <- v228 │
00:01:11 #2113 [Verbose] > │ () │
00:01:11 #2114 [Verbose] > │ let struct (v231 : UH6, v232 : int32) = v222.l1, v222.l2 │
00:01:11 #2115 [Verbose] > │ let v233 : UH6 = UH6_1 │
00:01:11 #2116 [Verbose] > │ let v234 : UH6 = method29(v231, v233) │
00:01:11 #2117 [Verbose] > │ let v235 : (struct (int32 * int64) []) = method30(v234) │
00:01:11 #2118 [Verbose] > │ let v236 : Map<int32, int64> = v235 |> Array.map (fun (struct (a, b)) -> │
00:01:11 #2119 [Verbose] > │ a, b) |> Map.ofArray │
00:01:11 #2120 [Verbose] > │ let v237 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:01:11 #2121 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v187)) │
00:01:11 #2122 [Verbose] > │ let v238 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2123 [Verbose] > │ while method4(v187, v238) do │
00:01:11 #2124 [Verbose] > │ let v240 : uint64 = v238.l0 │
00:01:11 #2125 [Verbose] > │ let struct (v241 : UH2, v242 : US0) = v174.[int v240] │
00:01:11 #2126 [Verbose] > │ let v243 : UH7 = UH7_1 │
00:01:11 #2127 [Verbose] > │ let v244 : int32 = 0 │
00:01:11 #2128 [Verbose] > │ let struct (v245 : UH7, v246 : int32) = method33(v241, v243, v244) │
00:01:11 #2129 [Verbose] > │ let v247 : UH7 = UH7_1 │
00:01:11 #2130 [Verbose] > │ let v248 : UH7 = method34(v245, v247) │
00:01:11 #2131 [Verbose] > │ let v249 : UH2 = UH2_1 │
00:01:11 #2132 [Verbose] > │ let v250 : UH2 = method35(v236, v248, v249) │
00:01:11 #2133 [Verbose] > │ let v251 : (string []) = method9(v250) │
00:01:11 #2134 [Verbose] > │ v237.[int v240] <- struct (v251, v242) │
00:01:11 #2135 [Verbose] > │ let v252 : uint64 = v240 + 1UL │
00:01:11 #2136 [Verbose] > │ v238.l0 <- v252 │
00:01:11 #2137 [Verbose] > │ () │
00:01:11 #2138 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2139 [Verbose] > │ let v253 : uint64 = System.Convert.ToUInt64 v237.Length │
00:01:11 #2140 [Verbose] > │ let v254 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2141 [Verbose] > │ while method4(v253, v254) do │
00:01:11 #2142 [Verbose] > │ let v256 : uint64 = v254.l0 │
00:01:11 #2143 [Verbose] > │ let struct (v257 : (string []), v258 : US0) = v237.[int v256] │
00:01:11 #2144 [Verbose] > │ match v258 with │
00:01:11 #2145 [Verbose] > │ | US0_0 -> (* None *) │
00:01:11 #2146 [Verbose] > │ let mutable result = None │
00:01:11 #2147 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2148 [Verbose] > │ #if !WASM │
00:01:11 #2149 [Verbose] > │ () │
00:01:11 #2150 [Verbose] > │ #else │
00:01:11 #2151 [Verbose] > │ () │
00:01:11 #2152 [Verbose] > │ #endif │
00:01:11 #2153 [Verbose] > │ #else │
00:01:11 #2154 [Verbose] > │ System.Console.ResetColor () │
00:01:11 #2155 [Verbose] > │ () │
00:01:11 #2156 [Verbose] > │ #endif │
00:01:11 #2157 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2158 [Verbose] > │ result |> Option.get │
00:01:11 #2159 [Verbose] > │ () │
00:01:11 #2160 [Verbose] > │ | US0_1(v259) -> (* Some *) │
00:01:11 #2161 [Verbose] > │ let mutable result = None │
00:01:11 #2162 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2163 [Verbose] > │ #if !WASM │
00:01:11 #2164 [Verbose] > │ () │
00:01:11 #2165 [Verbose] > │ #else │
00:01:11 #2166 [Verbose] > │ () │
00:01:11 #2167 [Verbose] > │ #endif │
00:01:11 #2168 [Verbose] > │ #else │
00:01:11 #2169 [Verbose] > │ System.Console.ForegroundColor <- v259 │
00:01:11 #2170 [Verbose] > │ () │
00:01:11 #2171 [Verbose] > │ #endif │
00:01:11 #2172 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2173 [Verbose] > │ result |> Option.get │
00:01:11 #2174 [Verbose] > │ () │
00:01:11 #2175 [Verbose] > │ let v260 : string = "\t| " │
00:01:11 #2176 [Verbose] > │ let v261 : string = System.String.Join (v260, v257) │
00:01:11 #2177 [Verbose] > │ System.Console.WriteLine v261 │
00:01:11 #2178 [Verbose] > │ let mutable result = None │
00:01:11 #2179 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2180 [Verbose] > │ #if !WASM │
00:01:11 #2181 [Verbose] > │ () │
00:01:11 #2182 [Verbose] > │ #else │
00:01:11 #2183 [Verbose] > │ () │
00:01:11 #2184 [Verbose] > │ #endif │
00:01:11 #2185 [Verbose] > │ #else │
00:01:11 #2186 [Verbose] > │ System.Console.ResetColor () │
00:01:11 #2187 [Verbose] > │ () │
00:01:11 #2188 [Verbose] > │ #endif │
00:01:11 #2189 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2190 [Verbose] > │ result |> Option.get │
00:01:11 #2191 [Verbose] > │ let v262 : uint64 = v256 + 1UL │
00:01:11 #2192 [Verbose] > │ v254.l0 <- v262 │
00:01:11 #2193 [Verbose] > │ () │
00:01:11 #2194 [Verbose] > │ let v263 : ((float []) []) = Array.zeroCreate<(float [])> │
00:01:11 #2195 [Verbose] > │ (System.Convert.ToInt32(v99)) │
00:01:11 #2196 [Verbose] > │ let v264 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2197 [Verbose] > │ while method4(v99, v264) do │
00:01:11 #2198 [Verbose] > │ let v266 : uint64 = v264.l0 │
00:01:11 #2199 [Verbose] > │ let struct (v267 : string, v268 : string, v269 : string, v270 : │
00:01:11 #2200 [Verbose] > │ (int64 [])) = v24.[int v266] │
00:01:11 #2201 [Verbose] > │ let v271 : (int64 -> float) = float │
00:01:11 #2202 [Verbose] > │ let v272 : uint64 = System.Convert.ToUInt64 v270.Length │
00:01:11 #2203 [Verbose] > │ let v273 : (float []) = Array.zeroCreate<float> │
00:01:11 #2204 [Verbose] > │ (System.Convert.ToInt32(v272)) │
00:01:11 #2205 [Verbose] > │ let v274 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2206 [Verbose] > │ while method4(v272, v274) do │
00:01:11 #2207 [Verbose] > │ let v276 : uint64 = v274.l0 │
00:01:11 #2208 [Verbose] > │ let v277 : int64 = v270.[int v276] │
00:01:11 #2209 [Verbose] > │ let v278 : float = v271 v277 │
00:01:11 #2210 [Verbose] > │ v273.[int v276] <- v278 │
00:01:11 #2211 [Verbose] > │ let v279 : uint64 = v276 + 1UL │
00:01:11 #2212 [Verbose] > │ v274.l0 <- v279 │
00:01:11 #2213 [Verbose] > │ () │
00:01:11 #2214 [Verbose] > │ v263.[int v266] <- v273 │
00:01:11 #2215 [Verbose] > │ let v280 : uint64 = v266 + 1UL │
00:01:11 #2216 [Verbose] > │ v264.l0 <- v280 │
00:01:11 #2217 [Verbose] > │ () │
00:01:11 #2218 [Verbose] > │ let v281 : ((float []) []) = v263 |> Array.transpose │
00:01:11 #2219 [Verbose] > │ let v282 : uint64 = System.Convert.ToUInt64 v281.Length │
00:01:11 #2220 [Verbose] > │ let v283 : (float []) = Array.zeroCreate<float> │
00:01:11 #2221 [Verbose] > │ (System.Convert.ToInt32(v282)) │
00:01:11 #2222 [Verbose] > │ let v284 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2223 [Verbose] > │ while method4(v282, v284) do │
00:01:11 #2224 [Verbose] > │ let v286 : uint64 = v284.l0 │
00:01:11 #2225 [Verbose] > │ let v287 : (float []) = v281.[int v286] │
00:01:11 #2226 [Verbose] > │ let v288 : float = v287 |> Array.average │
00:01:11 #2227 [Verbose] > │ v283.[int v286] <- v288 │
00:01:11 #2228 [Verbose] > │ let v289 : uint64 = v286 + 1UL │
00:01:11 #2229 [Verbose] > │ v284.l0 <- v289 │
00:01:11 #2230 [Verbose] > │ () │
00:01:11 #2231 [Verbose] > │ let v290 : (float -> int64) = int64 │
00:01:11 #2232 [Verbose] > │ let v291 : uint64 = System.Convert.ToUInt64 v283.Length │
00:01:11 #2233 [Verbose] > │ let v292 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2234 [Verbose] > │ (System.Convert.ToInt32(v291)) │
00:01:11 #2235 [Verbose] > │ let v293 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2236 [Verbose] > │ while method4(v291, v293) do │
00:01:11 #2237 [Verbose] > │ let v295 : uint64 = v293.l0 │
00:01:11 #2238 [Verbose] > │ let v296 : float = v283.[int v295] │
00:01:11 #2239 [Verbose] > │ let v297 : int64 = v290 v296 │
00:01:11 #2240 [Verbose] > │ v292.[int v295] <- v297 │
00:01:11 #2241 [Verbose] > │ let v298 : uint64 = v295 + 1UL │
00:01:11 #2242 [Verbose] > │ v293.l0 <- v298 │
00:01:11 #2243 [Verbose] > │ () │
00:01:11 #2244 [Verbose] > │ let v299 : uint64 = System.Convert.ToUInt64 v292.Length │
00:01:11 #2245 [Verbose] > │ let v300 : UH6 = UH6_1 │
00:01:11 #2246 [Verbose] > │ let v301 : Mut3 = {l0 = 0UL; l1 = v300; l2 = 0} : Mut3 │
00:01:11 #2247 [Verbose] > │ while method28(v299, v301) do │
00:01:11 #2248 [Verbose] > │ let v303 : uint64 = v301.l0 │
00:01:11 #2249 [Verbose] > │ let struct (v304 : UH6, v305 : int32) = v301.l1, v301.l2 │
00:01:11 #2250 [Verbose] > │ let v306 : int64 = v292.[int v303] │
00:01:11 #2251 [Verbose] > │ let v307 : int32 = v305 + 1 │
00:01:11 #2252 [Verbose] > │ let v308 : uint64 = v303 + 1UL │
00:01:11 #2253 [Verbose] > │ let v309 : UH6 = UH6_0(v305, v306, v304) │
00:01:11 #2254 [Verbose] > │ v301.l0 <- v308 │
00:01:11 #2255 [Verbose] > │ v301.l1 <- v309 │
00:01:11 #2256 [Verbose] > │ v301.l2 <- v307 │
00:01:11 #2257 [Verbose] > │ () │
00:01:11 #2258 [Verbose] > │ let struct (v310 : UH6, v311 : int32) = v301.l1, v301.l2 │
00:01:11 #2259 [Verbose] > │ let v312 : UH6 = UH6_1 │
00:01:11 #2260 [Verbose] > │ let v313 : UH6 = method29(v310, v312) │
00:01:11 #2261 [Verbose] > │ let v314 : (struct (int32 * int64) []) = method36(v313) │
00:01:11 #2262 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2263 [Verbose] > │ let v315 : string = "Average Ranking " │
00:01:11 #2264 [Verbose] > │ System.Console.WriteLine v315 │
00:01:11 #2265 [Verbose] > │ let v316 : (struct (int32 * int64) -> int64) = closure6() │
00:01:11 #2266 [Verbose] > │ let v317 : (struct (int32 * int64) []) = v314 |> Array.sortBy v316 │
00:01:11 #2267 [Verbose] > │ let v318 : uint64 = System.Convert.ToUInt64 v317.Length │
00:01:11 #2268 [Verbose] > │ let v319 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2269 [Verbose] > │ while method4(v318, v319) do │
00:01:11 #2270 [Verbose] > │ let v321 : uint64 = v319.l0 │
00:01:11 #2271 [Verbose] > │ let struct (v322 : int32, v323 : int64) = v317.[int v321] │
00:01:11 #2272 [Verbose] > │ let v324 : string = $"Test case %d{v322 + 1}. Average Time: %A{v323} │
00:01:11 #2273 [Verbose] > │ " │
00:01:11 #2274 [Verbose] > │ System.Console.WriteLine v324 │
00:01:11 #2275 [Verbose] > │ let v325 : uint64 = v321 + 1UL │
00:01:11 #2276 [Verbose] > │ v319.l0 <- v325 │
00:01:11 #2277 [Verbose] > │ () │
00:01:11 #2278 [Verbose] > │ () │
00:01:11 #2279 [Verbose] > │ and method0 () : unit = │
00:01:11 #2280 [Verbose] > │ let v0 : (unit -> unit) = closure0() │
00:01:11 #2281 [Verbose] > │ let v1 : string = nameof v0 │
00:01:11 #2282 [Verbose] > │ let v2 : string = "" │
00:01:11 #2283 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2284 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2285 [Verbose] > │ let v3 : string = $"Test: {v1}" │
00:01:11 #2286 [Verbose] > │ System.Console.WriteLine v3 │
00:01:11 #2287 [Verbose] > │ let v4 : string = "abc" │
00:01:11 #2288 [Verbose] > │ let v5 : string = "bca cab abc" │
00:01:11 #2289 [Verbose] > │ let v6 : string = "abcde" │
00:01:11 #2290 [Verbose] > │ let v7 : string = "bcdea cdeab deabc eabcd abcde" │
00:01:11 #2291 [Verbose] > │ let v8 : string = "abcdefghi" │
00:01:11 #2292 [Verbose] > │ let v9 : string = "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │
00:01:11 #2293 [Verbose] > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi" │
00:01:11 #2294 [Verbose] > │ let v10 : string = "abab" │
00:01:11 #2295 [Verbose] > │ let v11 : string = "baba abab baba abab" │
00:01:11 #2296 [Verbose] > │ let v12 : string = "aa" │
00:01:11 #2297 [Verbose] > │ let v13 : string = "aa aa" │
00:01:11 #2298 [Verbose] > │ let v14 : string = "z" │
00:01:11 #2299 [Verbose] > │ let v15 : UH0 = UH0_1 │
00:01:11 #2300 [Verbose] > │ let v16 : UH0 = UH0_0(v14, v14, v15) │
00:01:11 #2301 [Verbose] > │ let v17 : UH0 = UH0_0(v12, v13, v16) │
00:01:11 #2302 [Verbose] > │ let v18 : UH0 = UH0_0(v10, v11, v17) │
00:01:11 #2303 [Verbose] > │ let v19 : UH0 = UH0_0(v8, v9, v18) │
00:01:11 #2304 [Verbose] > │ let v20 : UH0 = UH0_0(v6, v7, v19) │
00:01:11 #2305 [Verbose] > │ let v21 : UH0 = UH0_0(v4, v5, v20) │
00:01:11 #2306 [Verbose] > │ let v22 : (struct (string * string) []) = method1(v21) │
00:01:11 #2307 [Verbose] > │ let v23 : uint64 = System.Convert.ToUInt64 v22.Length │
00:01:11 #2308 [Verbose] > │ let v24 : (struct (string * string * string * (int64 [])) []) = │
00:01:11 #2309 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:01:11 #2310 [Verbose] > │ (System.Convert.ToInt32(v23)) │
00:01:11 #2311 [Verbose] > │ let v25 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2312 [Verbose] > │ while method4(v23, v25) do │
00:01:11 #2313 [Verbose] > │ let v27 : uint64 = v25.l0 │
00:01:11 #2314 [Verbose] > │ let struct (v28 : string, v29 : string) = v22.[int v27] │
00:01:11 #2315 [Verbose] > │ let v30 : string = $"%A{v28}" │
00:01:11 #2316 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2317 [Verbose] > │ let v31 : string = $"Solution: {v30} " │
00:01:11 #2318 [Verbose] > │ System.Console.WriteLine v31 │
00:01:11 #2319 [Verbose] > │ let v32 : int32 = 0 │
00:01:11 #2320 [Verbose] > │ let v33 : string = "F" │
00:01:11 #2321 [Verbose] > │ let v34 : (string -> string) = closure1() │
00:01:11 #2322 [Verbose] > │ let v35 : int32 = 1 │
00:01:11 #2323 [Verbose] > │ let v36 : string = "FA" │
00:01:11 #2324 [Verbose] > │ let v37 : (string -> string) = closure2() │
00:01:11 #2325 [Verbose] > │ let v38 : UH3 = UH3_1 │
00:01:11 #2326 [Verbose] > │ let v39 : UH3 = UH3_0(v35, v36, v37, v38) │
00:01:11 #2327 [Verbose] > │ let v40 : UH3 = UH3_0(v32, v33, v34, v39) │
00:01:11 #2328 [Verbose] > │ let v41 : (struct (int32 * string * (string -> string)) []) = │
00:01:11 #2329 [Verbose] > │ method12(v40) │
00:01:11 #2330 [Verbose] > │ let v42 : uint64 = System.Convert.ToUInt64 v41.Length │
00:01:11 #2331 [Verbose] > │ let v43 : (struct (string * int64) []) = Array.zeroCreate<struct │
00:01:11 #2332 [Verbose] > │ (string * int64)> (System.Convert.ToInt32(v42)) │
00:01:11 #2333 [Verbose] > │ let v44 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2334 [Verbose] > │ while method4(v42, v44) do │
00:01:11 #2335 [Verbose] > │ let v46 : uint64 = v44.l0 │
00:01:11 #2336 [Verbose] > │ let struct (v47 : int32, v48 : string, v49 : (string -> string)) │
00:01:11 #2337 [Verbose] > │ = v41.[int v46] │
00:01:11 #2338 [Verbose] > │ let mutable result = None │
00:01:11 #2339 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2340 [Verbose] > │ #if !WASM │
00:01:11 #2341 [Verbose] > │ () │
00:01:11 #2342 [Verbose] > │ #else │
00:01:11 #2343 [Verbose] > │ () │
00:01:11 #2344 [Verbose] > │ #endif │
00:01:11 #2345 [Verbose] > │ #else │
00:01:11 #2346 [Verbose] > │ System.GC.Collect () │
00:01:11 #2347 [Verbose] > │ () │
00:01:11 #2348 [Verbose] > │ #endif │
00:01:11 #2349 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2350 [Verbose] > │ result |> Option.get │
00:01:11 #2351 [Verbose] > │ let v50 : (unit -> System.Diagnostics.Stopwatch) = │
00:01:11 #2352 [Verbose] > │ System.Diagnostics.Stopwatch │
00:01:11 #2353 [Verbose] > │ let v51 : System.Diagnostics.Stopwatch = v50 () │
00:01:11 #2354 [Verbose] > │ v51.Start () │
00:01:11 #2355 [Verbose] > │ let v52 : int64 = v51.ElapsedMilliseconds │
00:01:11 #2356 [Verbose] > │ let v53 : (int32 []) = Array.zeroCreate<int32> (2000001) │
00:01:11 #2357 [Verbose] > │ let v54 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #2358 [Verbose] > │ while method15(v54) do │
00:01:11 #2359 [Verbose] > │ let v56 : int32 = v54.l0 │
00:01:11 #2360 [Verbose] > │ v53.[int v56] <- v56 │
00:01:11 #2361 [Verbose] > │ let v57 : int32 = v56 + 1 │
00:01:11 #2362 [Verbose] > │ v54.l0 <- v57 │
00:01:11 #2363 [Verbose] > │ () │
00:01:11 #2364 [Verbose] > │ let v58 : (int32 -> string) = closure3(v28, v49) │
00:01:11 #2365 [Verbose] > │ let v59 : (string []) = v53 |> Array.Parallel.map v58 │
00:01:11 #2366 [Verbose] > │ let v60 : int32 = v59.Length │
00:01:11 #2367 [Verbose] > │ let v61 : int32 = v60 - 1 │
00:01:11 #2368 [Verbose] > │ let v62 : string = v59.[int v61] │
00:01:11 #2369 [Verbose] > │ let v63 : int64 = v51.ElapsedMilliseconds │
00:01:11 #2370 [Verbose] > │ let v64 : int64 = v63 - v52 │
00:01:11 #2371 [Verbose] > │ let v65 : string = $"Test case {v47 + 1}. {v48}. Time: {v64} " │
00:01:11 #2372 [Verbose] > │ System.Console.WriteLine v65 │
00:01:11 #2373 [Verbose] > │ v43.[int v46] <- struct (v62, v64) │
00:01:11 #2374 [Verbose] > │ let v66 : uint64 = v46 + 1UL │
00:01:11 #2375 [Verbose] > │ v44.l0 <- v66 │
00:01:11 #2376 [Verbose] > │ () │
00:01:11 #2377 [Verbose] > │ let v67 : uint64 = System.Convert.ToUInt64 v43.Length │
00:01:11 #2378 [Verbose] > │ let v68 : (string []) = Array.zeroCreate<string> │
00:01:11 #2379 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #2380 [Verbose] > │ let v69 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2381 [Verbose] > │ while method4(v67, v69) do │
00:01:11 #2382 [Verbose] > │ let v71 : uint64 = v69.l0 │
00:01:11 #2383 [Verbose] > │ let struct (v72 : string, v73 : int64) = v43.[int v71] │
00:01:11 #2384 [Verbose] > │ v68.[int v71] <- v72 │
00:01:11 #2385 [Verbose] > │ let v74 : uint64 = v71 + 1UL │
00:01:11 #2386 [Verbose] > │ v69.l0 <- v74 │
00:01:11 #2387 [Verbose] > │ () │
00:01:11 #2388 [Verbose] > │ let v75 : uint64 = System.Convert.ToUInt64 v68.Length │
00:01:11 #2389 [Verbose] > │ let v76 : bool = v75 <= 1UL │
00:01:11 #2390 [Verbose] > │ if v76 then │
00:01:11 #2391 [Verbose] > │ () │
00:01:11 #2392 [Verbose] > │ else │
00:01:11 #2393 [Verbose] > │ let v77 : string = v68.[int 0UL] │
00:01:11 #2394 [Verbose] > │ let v78 : uint64 = 0UL │
00:01:11 #2395 [Verbose] > │ let v79 : bool = method16(v77, v68, v78) │
00:01:11 #2396 [Verbose] > │ if v79 then │
00:01:11 #2397 [Verbose] > │ () │
00:01:11 #2398 [Verbose] > │ else │
00:01:11 #2399 [Verbose] > │ let v80 : string = $"Challenge error: {v68}" │
00:01:11 #2400 [Verbose] > │ failwith<unit> v80 │
00:01:11 #2401 [Verbose] > │ let v81 : string = $"%A{v29}" │
00:01:11 #2402 [Verbose] > │ let v82 : (string []) = Array.zeroCreate<string> │
00:01:11 #2403 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #2404 [Verbose] > │ let v83 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2405 [Verbose] > │ while method4(v67, v83) do │
00:01:11 #2406 [Verbose] > │ let v85 : uint64 = v83.l0 │
00:01:11 #2407 [Verbose] > │ let struct (v86 : string, v87 : int64) = v43.[int v85] │
00:01:11 #2408 [Verbose] > │ v82.[int v85] <- v86 │
00:01:11 #2409 [Verbose] > │ let v88 : uint64 = v85 + 1UL │
00:01:11 #2410 [Verbose] > │ v83.l0 <- v88 │
00:01:11 #2411 [Verbose] > │ () │
00:01:11 #2412 [Verbose] > │ let v89 : string = v82.[int 0UL] │
00:01:11 #2413 [Verbose] > │ let v90 : string = $"%A{v89}" │
00:01:11 #2414 [Verbose] > │ let v91 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2415 [Verbose] > │ (System.Convert.ToInt32(v67)) │
00:01:11 #2416 [Verbose] > │ let v92 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2417 [Verbose] > │ while method4(v67, v92) do │
00:01:11 #2418 [Verbose] > │ let v94 : uint64 = v92.l0 │
00:01:11 #2419 [Verbose] > │ let struct (v95 : string, v96 : int64) = v43.[int v94] │
00:01:11 #2420 [Verbose] > │ v91.[int v94] <- v96 │
00:01:11 #2421 [Verbose] > │ let v97 : uint64 = v94 + 1UL │
00:01:11 #2422 [Verbose] > │ v92.l0 <- v97 │
00:01:11 #2423 [Verbose] > │ () │
00:01:11 #2424 [Verbose] > │ v24.[int v27] <- struct (v81, v30, v90, v91) │
00:01:11 #2425 [Verbose] > │ let v98 : uint64 = v27 + 1UL │
00:01:11 #2426 [Verbose] > │ v25.l0 <- v98 │
00:01:11 #2427 [Verbose] > │ () │
00:01:11 #2428 [Verbose] > │ let v99 : uint64 = System.Convert.ToUInt64 v24.Length │
00:01:11 #2429 [Verbose] > │ let v100 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:01:11 #2430 [Verbose] > │ US0)> (System.Convert.ToInt32(v99)) │
00:01:11 #2431 [Verbose] > │ let v101 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2432 [Verbose] > │ while method4(v99, v101) do │
00:01:11 #2433 [Verbose] > │ let v103 : uint64 = v101.l0 │
00:01:11 #2434 [Verbose] > │ let struct (v104 : string, v105 : string, v106 : string, v107 : │
00:01:11 #2435 [Verbose] > │ (int64 [])) = v24.[int v103] │
00:01:11 #2436 [Verbose] > │ let v108 : uint64 = System.Convert.ToUInt64 v107.Length │
00:01:11 #2437 [Verbose] > │ let v109 : UH4 = UH4_1 │
00:01:11 #2438 [Verbose] > │ let v110 : Mut2 = {l0 = 0UL; l1 = v109; l2 = 0L} : Mut2 │
00:01:11 #2439 [Verbose] > │ while method17(v108, v110) do │
00:01:11 #2440 [Verbose] > │ let v112 : uint64 = v110.l0 │
00:01:11 #2441 [Verbose] > │ let struct (v113 : UH4, v114 : int64) = v110.l1, v110.l2 │
00:01:11 #2442 [Verbose] > │ let v115 : int64 = v107.[int v112] │
00:01:11 #2443 [Verbose] > │ let v116 : int64 = v114 + 1L │
00:01:11 #2444 [Verbose] > │ let v117 : uint64 = v112 + 1UL │
00:01:11 #2445 [Verbose] > │ let v118 : UH4 = UH4_0(v114, v115, v113) │
00:01:11 #2446 [Verbose] > │ v110.l0 <- v117 │
00:01:11 #2447 [Verbose] > │ v110.l1 <- v118 │
00:01:11 #2448 [Verbose] > │ v110.l2 <- v116 │
00:01:11 #2449 [Verbose] > │ () │
00:01:11 #2450 [Verbose] > │ let struct (v119 : UH4, v120 : int64) = v110.l1, v110.l2 │
00:01:11 #2451 [Verbose] > │ let v121 : UH4 = UH4_1 │
00:01:11 #2452 [Verbose] > │ let v122 : UH4 = method18(v119, v121) │
00:01:11 #2453 [Verbose] > │ let v123 : (struct (int64 * int64) []) = method19(v122) │
00:01:11 #2454 [Verbose] > │ let v124 : int32 = v123.Length │
00:01:11 #2455 [Verbose] > │ let v125 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:01:11 #2456 [Verbose] > │ (int64 * int64)> (v124) │
00:01:11 #2457 [Verbose] > │ let v126 : Mut1 = {l0 = 0} : Mut1 │
00:01:11 #2458 [Verbose] > │ while method5(v124, v126) do │
00:01:11 #2459 [Verbose] > │ let v128 : int32 = v126.l0 │
00:01:11 #2460 [Verbose] > │ let struct (v129 : int64, v130 : int64) = v123.[int v128] │
00:01:11 #2461 [Verbose] > │ let v131 : int64 = v129 + 1L │
00:01:11 #2462 [Verbose] > │ v125.[int v128] <- struct (v131, v130) │
00:01:11 #2463 [Verbose] > │ let v132 : int32 = v128 + 1 │
00:01:11 #2464 [Verbose] > │ v126.l0 <- v132 │
00:01:11 #2465 [Verbose] > │ () │
00:01:11 #2466 [Verbose] > │ let v133 : (struct (int64 * int64) -> int64) = closure4() │
00:01:11 #2467 [Verbose] > │ let v134 : (struct (int64 * int64) []) = v125 |> Array.sortBy v133 │
00:01:11 #2468 [Verbose] > │ let struct (v135 : int64, v136 : int64) = v134.[int 0] │
00:01:11 #2469 [Verbose] > │ let v137 : string = $"%A{struct (v135, v136)}" │
00:01:11 #2470 [Verbose] > │ let v138 : bool = v104 = v106 │
00:01:11 #2471 [Verbose] > │ let v143 : US0 = │
00:01:11 #2472 [Verbose] > │ if v138 then │
00:01:11 #2473 [Verbose] > │ let v139 : System.ConsoleColor = │
00:01:11 #2474 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:01:11 #2475 [Verbose] > │ US0_1(v139) │
00:01:11 #2476 [Verbose] > │ else │
00:01:11 #2477 [Verbose] > │ let v141 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:01:11 #2478 [Verbose] > │ US0_1(v141) │
00:01:11 #2479 [Verbose] > │ let v144 : UH2 = UH2_1 │
00:01:11 #2480 [Verbose] > │ let v145 : UH2 = UH2_0(v137, v144) │
00:01:11 #2481 [Verbose] > │ let v146 : UH2 = UH2_0(v106, v145) │
00:01:11 #2482 [Verbose] > │ let v147 : UH2 = UH2_0(v104, v146) │
00:01:11 #2483 [Verbose] > │ let v148 : UH2 = UH2_0(v105, v147) │
00:01:11 #2484 [Verbose] > │ v100.[int v103] <- struct (v148, v143) │
00:01:11 #2485 [Verbose] > │ let v149 : uint64 = v103 + 1UL │
00:01:11 #2486 [Verbose] > │ v101.l0 <- v149 │
00:01:11 #2487 [Verbose] > │ () │
00:01:11 #2488 [Verbose] > │ let v150 : string = "Input" │
00:01:11 #2489 [Verbose] > │ let v151 : string = "Expected" │
00:01:11 #2490 [Verbose] > │ let v152 : string = "Result" │
00:01:11 #2491 [Verbose] > │ let v153 : string = "Best" │
00:01:11 #2492 [Verbose] > │ let v154 : UH2 = UH2_1 │
00:01:11 #2493 [Verbose] > │ let v155 : UH2 = UH2_0(v153, v154) │
00:01:11 #2494 [Verbose] > │ let v156 : UH2 = UH2_0(v152, v155) │
00:01:11 #2495 [Verbose] > │ let v157 : UH2 = UH2_0(v151, v156) │
00:01:11 #2496 [Verbose] > │ let v158 : UH2 = UH2_0(v150, v157) │
00:01:11 #2497 [Verbose] > │ let v159 : US0 = US0_0 │
00:01:11 #2498 [Verbose] > │ let v160 : string = "---" │
00:01:11 #2499 [Verbose] > │ let v161 : UH2 = UH2_1 │
00:01:11 #2500 [Verbose] > │ let v162 : UH2 = UH2_0(v160, v161) │
00:01:11 #2501 [Verbose] > │ let v163 : UH2 = UH2_0(v160, v162) │
00:01:11 #2502 [Verbose] > │ let v164 : UH2 = UH2_0(v160, v163) │
00:01:11 #2503 [Verbose] > │ let v165 : UH2 = UH2_0(v160, v164) │
00:01:11 #2504 [Verbose] > │ let v166 : US0 = US0_0 │
00:01:11 #2505 [Verbose] > │ let v167 : UH5 = UH5_1 │
00:01:11 #2506 [Verbose] > │ let v168 : UH5 = UH5_0(v165, v166, v167) │
00:01:11 #2507 [Verbose] > │ let v169 : UH5 = UH5_0(v158, v159, v168) │
00:01:11 #2508 [Verbose] > │ let v170 : (struct (UH2 * US0) []) = method22(v169) │
00:01:11 #2509 [Verbose] > │ let v171 : uint64 = System.Convert.ToUInt64 v170.Length │
00:01:11 #2510 [Verbose] > │ let v172 : uint64 = System.Convert.ToUInt64 v100.Length │
00:01:11 #2511 [Verbose] > │ let v173 : uint64 = v171 + v172 │
00:01:11 #2512 [Verbose] > │ let v174 : (struct (UH2 * US0) []) = Array.zeroCreate<struct (UH2 * │
00:01:11 #2513 [Verbose] > │ US0)> (System.Convert.ToInt32(v173)) │
00:01:11 #2514 [Verbose] > │ let v175 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2515 [Verbose] > │ while method4(v173, v175) do │
00:01:11 #2516 [Verbose] > │ let v177 : uint64 = v175.l0 │
00:01:11 #2517 [Verbose] > │ let v178 : bool = v177 < v171 │
00:01:11 #2518 [Verbose] > │ let struct (v184 : UH2, v185 : US0) = │
00:01:11 #2519 [Verbose] > │ if v178 then │
00:01:11 #2520 [Verbose] > │ let struct (v179 : UH2, v180 : US0) = v170.[int v177] │
00:01:11 #2521 [Verbose] > │ struct (v179, v180) │
00:01:11 #2522 [Verbose] > │ else │
00:01:11 #2523 [Verbose] > │ let v181 : uint64 = v177 - v171 │
00:01:11 #2524 [Verbose] > │ let struct (v182 : UH2, v183 : US0) = v100.[int v181] │
00:01:11 #2525 [Verbose] > │ struct (v182, v183) │
00:01:11 #2526 [Verbose] > │ v174.[int v177] <- struct (v184, v185) │
00:01:11 #2527 [Verbose] > │ let v186 : uint64 = v177 + 1UL │
00:01:11 #2528 [Verbose] > │ v175.l0 <- v186 │
00:01:11 #2529 [Verbose] > │ () │
00:01:11 #2530 [Verbose] > │ let v187 : uint64 = System.Convert.ToUInt64 v174.Length │
00:01:11 #2531 [Verbose] > │ let v188 : ((string []) []) = Array.zeroCreate<(string [])> │
00:01:11 #2532 [Verbose] > │ (System.Convert.ToInt32(v187)) │
00:01:11 #2533 [Verbose] > │ let v189 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2534 [Verbose] > │ while method4(v187, v189) do │
00:01:11 #2535 [Verbose] > │ let v191 : uint64 = v189.l0 │
00:01:11 #2536 [Verbose] > │ let struct (v192 : UH2, v193 : US0) = v174.[int v191] │
00:01:11 #2537 [Verbose] > │ let v194 : (string []) = method25(v192) │
00:01:11 #2538 [Verbose] > │ v188.[int v191] <- v194 │
00:01:11 #2539 [Verbose] > │ let v195 : uint64 = v191 + 1UL │
00:01:11 #2540 [Verbose] > │ v189.l0 <- v195 │
00:01:11 #2541 [Verbose] > │ () │
00:01:11 #2542 [Verbose] > │ let v196 : ((string []) []) = v188 |> Array.transpose │
00:01:11 #2543 [Verbose] > │ let v197 : uint64 = System.Convert.ToUInt64 v196.Length │
00:01:11 #2544 [Verbose] > │ let v198 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2545 [Verbose] > │ (System.Convert.ToInt32(v197)) │
00:01:11 #2546 [Verbose] > │ let v199 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2547 [Verbose] > │ while method4(v197, v199) do │
00:01:11 #2548 [Verbose] > │ let v201 : uint64 = v199.l0 │
00:01:11 #2549 [Verbose] > │ let v202 : (string []) = v196.[int v201] │
00:01:11 #2550 [Verbose] > │ let v203 : uint64 = System.Convert.ToUInt64 v202.Length │
00:01:11 #2551 [Verbose] > │ let v204 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2552 [Verbose] > │ (System.Convert.ToInt32(v203)) │
00:01:11 #2553 [Verbose] > │ let v205 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2554 [Verbose] > │ while method4(v203, v205) do │
00:01:11 #2555 [Verbose] > │ let v207 : uint64 = v205.l0 │
00:01:11 #2556 [Verbose] > │ let v208 : string = v202.[int v207] │
00:01:11 #2557 [Verbose] > │ let v209 : int64 = System.Convert.ToInt64 v208.Length │
00:01:11 #2558 [Verbose] > │ v204.[int v207] <- v209 │
00:01:11 #2559 [Verbose] > │ let v210 : uint64 = v207 + 1UL │
00:01:11 #2560 [Verbose] > │ v205.l0 <- v210 │
00:01:11 #2561 [Verbose] > │ () │
00:01:11 #2562 [Verbose] > │ let v211 : (int64 []) = v204 |> Array.sortDescending │
00:01:11 #2563 [Verbose] > │ let v212 : int64 option = v211 |> Array.tryItem 0 │
00:01:11 #2564 [Verbose] > │ let v213 : (int64 -> US1) = closure5() │
00:01:11 #2565 [Verbose] > │ let v214 : US1 = US1_0 │
00:01:11 #2566 [Verbose] > │ let v215 : US1 = v212 |> Option.map v213 |> Option.defaultValue v214 │
00:01:11 #2567 [Verbose] > │ let v218 : int64 = │
00:01:11 #2568 [Verbose] > │ match v215 with │
00:01:11 #2569 [Verbose] > │ | US1_0 -> (* None *) │
00:01:11 #2570 [Verbose] > │ 0L │
00:01:11 #2571 [Verbose] > │ | US1_1(v216) -> (* Some *) │
00:01:11 #2572 [Verbose] > │ v216 │
00:01:11 #2573 [Verbose] > │ v198.[int v201] <- v218 │
00:01:11 #2574 [Verbose] > │ let v219 : uint64 = v201 + 1UL │
00:01:11 #2575 [Verbose] > │ v199.l0 <- v219 │
00:01:11 #2576 [Verbose] > │ () │
00:01:11 #2577 [Verbose] > │ let v220 : uint64 = System.Convert.ToUInt64 v198.Length │
00:01:11 #2578 [Verbose] > │ let v221 : UH6 = UH6_1 │
00:01:11 #2579 [Verbose] > │ let v222 : Mut3 = {l0 = 0UL; l1 = v221; l2 = 0} : Mut3 │
00:01:11 #2580 [Verbose] > │ while method28(v220, v222) do │
00:01:11 #2581 [Verbose] > │ let v224 : uint64 = v222.l0 │
00:01:11 #2582 [Verbose] > │ let struct (v225 : UH6, v226 : int32) = v222.l1, v222.l2 │
00:01:11 #2583 [Verbose] > │ let v227 : int64 = v198.[int v224] │
00:01:11 #2584 [Verbose] > │ let v228 : int32 = v226 + 1 │
00:01:11 #2585 [Verbose] > │ let v229 : uint64 = v224 + 1UL │
00:01:11 #2586 [Verbose] > │ let v230 : UH6 = UH6_0(v226, v227, v225) │
00:01:11 #2587 [Verbose] > │ v222.l0 <- v229 │
00:01:11 #2588 [Verbose] > │ v222.l1 <- v230 │
00:01:11 #2589 [Verbose] > │ v222.l2 <- v228 │
00:01:11 #2590 [Verbose] > │ () │
00:01:11 #2591 [Verbose] > │ let struct (v231 : UH6, v232 : int32) = v222.l1, v222.l2 │
00:01:11 #2592 [Verbose] > │ let v233 : UH6 = UH6_1 │
00:01:11 #2593 [Verbose] > │ let v234 : UH6 = method29(v231, v233) │
00:01:11 #2594 [Verbose] > │ let v235 : (struct (int32 * int64) []) = method30(v234) │
00:01:11 #2595 [Verbose] > │ let v236 : Map<int32, int64> = v235 |> Array.map (fun (struct (a, b)) -> │
00:01:11 #2596 [Verbose] > │ a, b) |> Map.ofArray │
00:01:11 #2597 [Verbose] > │ let v237 : (struct ((string []) * US0) []) = Array.zeroCreate<struct │
00:01:11 #2598 [Verbose] > │ ((string []) * US0)> (System.Convert.ToInt32(v187)) │
00:01:11 #2599 [Verbose] > │ let v238 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2600 [Verbose] > │ while method4(v187, v238) do │
00:01:11 #2601 [Verbose] > │ let v240 : uint64 = v238.l0 │
00:01:11 #2602 [Verbose] > │ let struct (v241 : UH2, v242 : US0) = v174.[int v240] │
00:01:11 #2603 [Verbose] > │ let v243 : UH7 = UH7_1 │
00:01:11 #2604 [Verbose] > │ let v244 : int32 = 0 │
00:01:11 #2605 [Verbose] > │ let struct (v245 : UH7, v246 : int32) = method33(v241, v243, v244) │
00:01:11 #2606 [Verbose] > │ let v247 : UH7 = UH7_1 │
00:01:11 #2607 [Verbose] > │ let v248 : UH7 = method34(v245, v247) │
00:01:11 #2608 [Verbose] > │ let v249 : UH2 = UH2_1 │
00:01:11 #2609 [Verbose] > │ let v250 : UH2 = method35(v236, v248, v249) │
00:01:11 #2610 [Verbose] > │ let v251 : (string []) = method9(v250) │
00:01:11 #2611 [Verbose] > │ v237.[int v240] <- struct (v251, v242) │
00:01:11 #2612 [Verbose] > │ let v252 : uint64 = v240 + 1UL │
00:01:11 #2613 [Verbose] > │ v238.l0 <- v252 │
00:01:11 #2614 [Verbose] > │ () │
00:01:11 #2615 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2616 [Verbose] > │ let v253 : uint64 = System.Convert.ToUInt64 v237.Length │
00:01:11 #2617 [Verbose] > │ let v254 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2618 [Verbose] > │ while method4(v253, v254) do │
00:01:11 #2619 [Verbose] > │ let v256 : uint64 = v254.l0 │
00:01:11 #2620 [Verbose] > │ let struct (v257 : (string []), v258 : US0) = v237.[int v256] │
00:01:11 #2621 [Verbose] > │ match v258 with │
00:01:11 #2622 [Verbose] > │ | US0_0 -> (* None *) │
00:01:11 #2623 [Verbose] > │ let mutable result = None │
00:01:11 #2624 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2625 [Verbose] > │ #if !WASM │
00:01:11 #2626 [Verbose] > │ () │
00:01:11 #2627 [Verbose] > │ #else │
00:01:11 #2628 [Verbose] > │ () │
00:01:11 #2629 [Verbose] > │ #endif │
00:01:11 #2630 [Verbose] > │ #else │
00:01:11 #2631 [Verbose] > │ System.Console.ResetColor () │
00:01:11 #2632 [Verbose] > │ () │
00:01:11 #2633 [Verbose] > │ #endif │
00:01:11 #2634 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2635 [Verbose] > │ result |> Option.get │
00:01:11 #2636 [Verbose] > │ () │
00:01:11 #2637 [Verbose] > │ | US0_1(v259) -> (* Some *) │
00:01:11 #2638 [Verbose] > │ let mutable result = None │
00:01:11 #2639 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2640 [Verbose] > │ #if !WASM │
00:01:11 #2641 [Verbose] > │ () │
00:01:11 #2642 [Verbose] > │ #else │
00:01:11 #2643 [Verbose] > │ () │
00:01:11 #2644 [Verbose] > │ #endif │
00:01:11 #2645 [Verbose] > │ #else │
00:01:11 #2646 [Verbose] > │ System.Console.ForegroundColor <- v259 │
00:01:11 #2647 [Verbose] > │ () │
00:01:11 #2648 [Verbose] > │ #endif │
00:01:11 #2649 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2650 [Verbose] > │ result |> Option.get │
00:01:11 #2651 [Verbose] > │ () │
00:01:11 #2652 [Verbose] > │ let v260 : string = "\t| " │
00:01:11 #2653 [Verbose] > │ let v261 : string = System.String.Join (v260, v257) │
00:01:11 #2654 [Verbose] > │ System.Console.WriteLine v261 │
00:01:11 #2655 [Verbose] > │ let mutable result = None │
00:01:11 #2656 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:11 #2657 [Verbose] > │ #if !WASM │
00:01:11 #2658 [Verbose] > │ () │
00:01:11 #2659 [Verbose] > │ #else │
00:01:11 #2660 [Verbose] > │ () │
00:01:11 #2661 [Verbose] > │ #endif │
00:01:11 #2662 [Verbose] > │ #else │
00:01:11 #2663 [Verbose] > │ System.Console.ResetColor () │
00:01:11 #2664 [Verbose] > │ () │
00:01:11 #2665 [Verbose] > │ #endif │
00:01:11 #2666 [Verbose] > │ |> fun x -> result <- Some x │
00:01:11 #2667 [Verbose] > │ result |> Option.get │
00:01:11 #2668 [Verbose] > │ let v262 : uint64 = v256 + 1UL │
00:01:11 #2669 [Verbose] > │ v254.l0 <- v262 │
00:01:11 #2670 [Verbose] > │ () │
00:01:11 #2671 [Verbose] > │ let v263 : ((float []) []) = Array.zeroCreate<(float [])> │
00:01:11 #2672 [Verbose] > │ (System.Convert.ToInt32(v99)) │
00:01:11 #2673 [Verbose] > │ let v264 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2674 [Verbose] > │ while method4(v99, v264) do │
00:01:11 #2675 [Verbose] > │ let v266 : uint64 = v264.l0 │
00:01:11 #2676 [Verbose] > │ let struct (v267 : string, v268 : string, v269 : string, v270 : │
00:01:11 #2677 [Verbose] > │ (int64 [])) = v24.[int v266] │
00:01:11 #2678 [Verbose] > │ let v271 : (int64 -> float) = float │
00:01:11 #2679 [Verbose] > │ let v272 : uint64 = System.Convert.ToUInt64 v270.Length │
00:01:11 #2680 [Verbose] > │ let v273 : (float []) = Array.zeroCreate<float> │
00:01:11 #2681 [Verbose] > │ (System.Convert.ToInt32(v272)) │
00:01:11 #2682 [Verbose] > │ let v274 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2683 [Verbose] > │ while method4(v272, v274) do │
00:01:11 #2684 [Verbose] > │ let v276 : uint64 = v274.l0 │
00:01:11 #2685 [Verbose] > │ let v277 : int64 = v270.[int v276] │
00:01:11 #2686 [Verbose] > │ let v278 : float = v271 v277 │
00:01:11 #2687 [Verbose] > │ v273.[int v276] <- v278 │
00:01:11 #2688 [Verbose] > │ let v279 : uint64 = v276 + 1UL │
00:01:11 #2689 [Verbose] > │ v274.l0 <- v279 │
00:01:11 #2690 [Verbose] > │ () │
00:01:11 #2691 [Verbose] > │ v263.[int v266] <- v273 │
00:01:11 #2692 [Verbose] > │ let v280 : uint64 = v266 + 1UL │
00:01:11 #2693 [Verbose] > │ v264.l0 <- v280 │
00:01:11 #2694 [Verbose] > │ () │
00:01:11 #2695 [Verbose] > │ let v281 : ((float []) []) = v263 |> Array.transpose │
00:01:11 #2696 [Verbose] > │ let v282 : uint64 = System.Convert.ToUInt64 v281.Length │
00:01:11 #2697 [Verbose] > │ let v283 : (float []) = Array.zeroCreate<float> │
00:01:11 #2698 [Verbose] > │ (System.Convert.ToInt32(v282)) │
00:01:11 #2699 [Verbose] > │ let v284 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2700 [Verbose] > │ while method4(v282, v284) do │
00:01:11 #2701 [Verbose] > │ let v286 : uint64 = v284.l0 │
00:01:11 #2702 [Verbose] > │ let v287 : (float []) = v281.[int v286] │
00:01:11 #2703 [Verbose] > │ let v288 : float = v287 |> Array.average │
00:01:11 #2704 [Verbose] > │ v283.[int v286] <- v288 │
00:01:11 #2705 [Verbose] > │ let v289 : uint64 = v286 + 1UL │
00:01:11 #2706 [Verbose] > │ v284.l0 <- v289 │
00:01:11 #2707 [Verbose] > │ () │
00:01:11 #2708 [Verbose] > │ let v290 : (float -> int64) = int64 │
00:01:11 #2709 [Verbose] > │ let v291 : uint64 = System.Convert.ToUInt64 v283.Length │
00:01:11 #2710 [Verbose] > │ let v292 : (int64 []) = Array.zeroCreate<int64> │
00:01:11 #2711 [Verbose] > │ (System.Convert.ToInt32(v291)) │
00:01:11 #2712 [Verbose] > │ let v293 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2713 [Verbose] > │ while method4(v291, v293) do │
00:01:11 #2714 [Verbose] > │ let v295 : uint64 = v293.l0 │
00:01:11 #2715 [Verbose] > │ let v296 : float = v283.[int v295] │
00:01:11 #2716 [Verbose] > │ let v297 : int64 = v290 v296 │
00:01:11 #2717 [Verbose] > │ v292.[int v295] <- v297 │
00:01:11 #2718 [Verbose] > │ let v298 : uint64 = v295 + 1UL │
00:01:11 #2719 [Verbose] > │ v293.l0 <- v298 │
00:01:11 #2720 [Verbose] > │ () │
00:01:11 #2721 [Verbose] > │ let v299 : uint64 = System.Convert.ToUInt64 v292.Length │
00:01:11 #2722 [Verbose] > │ let v300 : UH6 = UH6_1 │
00:01:11 #2723 [Verbose] > │ let v301 : Mut3 = {l0 = 0UL; l1 = v300; l2 = 0} : Mut3 │
00:01:11 #2724 [Verbose] > │ while method28(v299, v301) do │
00:01:11 #2725 [Verbose] > │ let v303 : uint64 = v301.l0 │
00:01:11 #2726 [Verbose] > │ let struct (v304 : UH6, v305 : int32) = v301.l1, v301.l2 │
00:01:11 #2727 [Verbose] > │ let v306 : int64 = v292.[int v303] │
00:01:11 #2728 [Verbose] > │ let v307 : int32 = v305 + 1 │
00:01:11 #2729 [Verbose] > │ let v308 : uint64 = v303 + 1UL │
00:01:11 #2730 [Verbose] > │ let v309 : UH6 = UH6_0(v305, v306, v304) │
00:01:11 #2731 [Verbose] > │ v301.l0 <- v308 │
00:01:11 #2732 [Verbose] > │ v301.l1 <- v309 │
00:01:11 #2733 [Verbose] > │ v301.l2 <- v307 │
00:01:11 #2734 [Verbose] > │ () │
00:01:11 #2735 [Verbose] > │ let struct (v310 : UH6, v311 : int32) = v301.l1, v301.l2 │
00:01:11 #2736 [Verbose] > │ let v312 : UH6 = UH6_1 │
00:01:11 #2737 [Verbose] > │ let v313 : UH6 = method29(v310, v312) │
00:01:11 #2738 [Verbose] > │ let v314 : (struct (int32 * int64) []) = method36(v313) │
00:01:11 #2739 [Verbose] > │ System.Console.WriteLine v2 │
00:01:11 #2740 [Verbose] > │ let v315 : string = "Average Ranking " │
00:01:11 #2741 [Verbose] > │ System.Console.WriteLine v315 │
00:01:11 #2742 [Verbose] > │ let v316 : (struct (int32 * int64) -> int64) = closure6() │
00:01:11 #2743 [Verbose] > │ let v317 : (struct (int32 * int64) []) = v314 |> Array.sortBy v316 │
00:01:11 #2744 [Verbose] > │ let v318 : uint64 = System.Convert.ToUInt64 v317.Length │
00:01:11 #2745 [Verbose] > │ let v319 : Mut0 = {l0 = 0UL} : Mut0 │
00:01:11 #2746 [Verbose] > │ while method4(v318, v319) do │
00:01:11 #2747 [Verbose] > │ let v321 : uint64 = v319.l0 │
00:01:11 #2748 [Verbose] > │ let struct (v322 : int32, v323 : int64) = v317.[int v321] │
00:01:11 #2749 [Verbose] > │ let v324 : string = $"Test case %d{v322 + 1}. Average Time: %A{v323} │
00:01:11 #2750 [Verbose] > │ " │
00:01:11 #2751 [Verbose] > │ System.Console.WriteLine v324 │
00:01:11 #2752 [Verbose] > │ let v325 : uint64 = v321 + 1UL │
00:01:11 #2753 [Verbose] > │ v319.l0 <- v325 │
00:01:11 #2754 [Verbose] > │ () │
00:01:11 #2755 [Verbose] > │ () │
00:01:11 #2756 [Verbose] > │ method0() │
00:01:11 #2757 [Verbose] > │ │
00:01:11 #2758 [Verbose] > │ │
00:01:11 #2759 [Verbose] > │ │
00:01:11 #2760 [Verbose] > │ Test: v0 │
00:01:11 #2761 [Verbose] > │ │
00:01:11 #2762 [Verbose] > │ Solution: "abc" │
00:01:11 #2763 [Verbose] > │ Test case 1. F. Time: 1208 │
00:01:11 #2764 [Verbose] > │ Test case 2. FA. Time: 1784 │
00:01:11 #2765 [Verbose] > │ │
00:01:11 #2766 [Verbose] > │ Solution: "abcde" │
00:01:11 #2767 [Verbose] > │ Test case 1. F. Time: 1764 │
00:01:11 #2768 [Verbose] > │ Test case 2. FA. Time: 2700 │
00:01:11 #2769 [Verbose] > │ │
00:01:11 #2770 [Verbose] > │ Solution: "abcdefghi" │
00:01:11 #2771 [Verbose] > │ Test case 1. F. Time: 2793 │
00:01:11 #2772 [Verbose] > │ Test case 2. FA. Time: 3438 │
00:01:11 #2773 [Verbose] > │ │
00:01:11 #2774 [Verbose] > │ Solution: "abab" │
00:01:11 #2775 [Verbose] > │ Test case 1. F. Time: 1522 │
00:01:11 #2776 [Verbose] > │ Test case 2. FA. Time: 1485 │
00:01:11 #2777 [Verbose] > │ │
00:01:11 #2778 [Verbose] > │ Solution: "aa" │
00:01:11 #2779 [Verbose] > │ Test case 1. F. Time: 1017 │
00:01:11 #2780 [Verbose] > │ Test case 2. FA. Time: 1297 │
00:01:11 #2781 [Verbose] > │ │
00:01:11 #2782 [Verbose] > │ Solution: "z" │
00:01:11 #2783 [Verbose] > │ Test case 1. F. Time: 243 │
00:01:11 #2784 [Verbose] > │ Test case 2. FA. Time: 228 │
00:01:11 #2785 [Verbose] > │ │
00:01:11 #2786 [Verbose] > │ Input | Expected │
00:01:11 #2787 [Verbose] > │ │
00:01:11 #2788 [Verbose] > │ | Result │
00:01:11 #2789 [Verbose] > │ │
00:01:11 #2790 [Verbose] > │ | Best │
00:01:11 #2791 [Verbose] > │ --- | --- │
00:01:11 #2792 [Verbose] > │ │
00:01:11 #2793 [Verbose] > │ | --- │
00:01:11 #2794 [Verbose] > │ │
00:01:11 #2795 [Verbose] > │ | --- │
00:01:11 #2796 [Verbose] > │ "abc" | "bca cab abc" │
00:01:11 #2797 [Verbose] > │ │
00:01:11 #2798 [Verbose] > │ | "bca cab abc" │
00:01:11 #2799 [Verbose] > │ │
00:01:11 #2800 [Verbose] > │ | struct (1L, 1208L) │
00:01:11 #2801 [Verbose] > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │
00:01:11 #2802 [Verbose] > │ | "bcdea cdeab deabc eabcd abcde" │
00:01:11 #2803 [Verbose] > │ | struct (1L, 1764L) │
00:01:11 #2804 [Verbose] > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:01:11 #2805 [Verbose] > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │
00:01:11 #2806 [Verbose] > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | struct (1L, 2793L) │
00:01:11 #2807 [Verbose] > │ "abab" | "baba abab baba abab" │
00:01:11 #2808 [Verbose] > │ | "baba abab baba abab" │
00:01:11 #2809 [Verbose] > │ | struct (2L, 1485L) │
00:01:11 #2810 [Verbose] > │ "aa" | "aa aa" │
00:01:11 #2811 [Verbose] > │ │
00:01:11 #2812 [Verbose] > │ | "aa aa" │
00:01:11 #2813 [Verbose] > │ │
00:01:11 #2814 [Verbose] > │ | struct (1L, 1017L) │
00:01:11 #2815 [Verbose] > │ "z" | "z" │
00:01:11 #2816 [Verbose] > │ │
00:01:11 #2817 [Verbose] > │ | "z" │
00:01:11 #2818 [Verbose] > │ │
00:01:11 #2819 [Verbose] > │ | struct (2L, 228L) │
00:01:11 #2820 [Verbose] > │ │
00:01:11 #2821 [Verbose] > │ Average Ranking │
00:01:11 #2822 [Verbose] > │ Test case 1. Average Time: 1424L │
00:01:11 #2823 [Verbose] > │ Test case 2. Average Time: 1822L │
00:01:11 #2824 [Verbose] > │ │
00:01:11 #2825 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:11 #2826 [Verbose] >
00:01:11 #2827 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:11 #2828 [Verbose] > // // test
00:01:11 #2829 [Verbose] > // // rust=
00:01:11 #2830 [Verbose] > // // print_code=false
00:01:11 #2831 [Verbose] >
00:01:11 #2832 [Verbose] > // rotate_strings_tests ()
00:01:12 #2833 [Verbose] >
00:01:12 #2834 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:12 #2835 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:12 #2836 [Verbose] > │ ## binary_search_tests │
00:01:12 #2837 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:12 #2838 [Verbose] >
00:01:12 #2839 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:12 #2840 [Verbose] > // // test
00:01:12 #2841 [Verbose] > // // timeout=90000
00:01:12 #2842 [Verbose] > // // print_code=true
00:01:12 #2843 [Verbose] >
00:01:12 #2844 [Verbose] > inl binary_search_semi_open_1 arr target left right =
00:01:12 #2845 [Verbose] > inl rec body left right =
00:01:12 #2846 [Verbose] > if left >= right
00:01:12 #2847 [Verbose] > then None
00:01:12 #2848 [Verbose] > else
00:01:12 #2849 [Verbose] > inl mid = (left + right) / 2
00:01:12 #2850 [Verbose] > inl item = index arr mid
00:01:12 #2851 [Verbose] > if item = target
00:01:12 #2852 [Verbose] > then Some mid
00:01:12 #2853 [Verbose] > elif item < target
00:01:12 #2854 [Verbose] > then loop (mid + 1) right
00:01:12 #2855 [Verbose] > else loop left mid
00:01:12 #2856 [Verbose] > and inl loop left right =
00:01:12 #2857 [Verbose] > if var_is right |> not
00:01:12 #2858 [Verbose] > then body left right
00:01:12 #2859 [Verbose] > else
00:01:12 #2860 [Verbose] > inl left = dyn left
00:01:12 #2861 [Verbose] > join body left right
00:01:12 #2862 [Verbose] > loop left right
00:01:12 #2863 [Verbose] >
00:01:12 #2864 [Verbose] > inl binary_search_closed_1 arr target left right =
00:01:12 #2865 [Verbose] > inl rec body left right =
00:01:12 #2866 [Verbose] > if left > right
00:01:12 #2867 [Verbose] > then None
00:01:12 #2868 [Verbose] > else
00:01:12 #2869 [Verbose] > inl mid = (left + right) / 2
00:01:12 #2870 [Verbose] > inl item = index arr mid
00:01:12 #2871 [Verbose] > if item = target
00:01:12 #2872 [Verbose] > then Some mid
00:01:12 #2873 [Verbose] > elif item < target
00:01:12 #2874 [Verbose] > then loop (mid + 1) right
00:01:12 #2875 [Verbose] > else loop left (mid - 1)
00:01:12 #2876 [Verbose] > and inl loop left right =
00:01:12 #2877 [Verbose] > if var_is right |> not
00:01:12 #2878 [Verbose] > then body left right
00:01:12 #2879 [Verbose] > else
00:01:12 #2880 [Verbose] > inl left = dyn left
00:01:12 #2881 [Verbose] > join body left right
00:01:12 #2882 [Verbose] > loop left right
00:01:12 #2883 [Verbose] >
00:01:12 #2884 [Verbose] > inl binary_search_semi_open_2 arr target left right =
00:01:12 #2885 [Verbose] > let rec body left right =
00:01:12 #2886 [Verbose] > if left >= right
00:01:12 #2887 [Verbose] > then None
00:01:12 #2888 [Verbose] > else
00:01:12 #2889 [Verbose] > inl mid = (left + right) / 2
00:01:12 #2890 [Verbose] > inl item = index arr mid
00:01:12 #2891 [Verbose] > if item = target
00:01:12 #2892 [Verbose] > then Some mid
00:01:12 #2893 [Verbose] > elif item < target
00:01:12 #2894 [Verbose] > then loop (mid + 1) right
00:01:12 #2895 [Verbose] > else loop left mid
00:01:12 #2896 [Verbose] > and inl loop left right = body left right
00:01:12 #2897 [Verbose] > loop left right
00:01:12 #2898 [Verbose] >
00:01:12 #2899 [Verbose] > inl binary_search_closed_2 arr target left right =
00:01:12 #2900 [Verbose] > let rec body left right =
00:01:12 #2901 [Verbose] > if left > right
00:01:12 #2902 [Verbose] > then None
00:01:12 #2903 [Verbose] > else
00:01:12 #2904 [Verbose] > inl mid = (left + right) / 2
00:01:12 #2905 [Verbose] > inl item = index arr mid
00:01:12 #2906 [Verbose] > if item = target
00:01:12 #2907 [Verbose] > then Some mid
00:01:12 #2908 [Verbose] > elif item < target
00:01:12 #2909 [Verbose] > then loop (mid + 1) right
00:01:12 #2910 [Verbose] > else loop left (mid - 1)
00:01:12 #2911 [Verbose] > and inl loop left right = body left right
00:01:12 #2912 [Verbose] > loop left right
00:01:12 #2913 [Verbose] >
00:01:12 #2914 [Verbose] > inl get_solutions () =
00:01:12 #2915 [Verbose] > [[
00:01:12 #2916 [Verbose] > "semi_open_1",
00:01:12 #2917 [Verbose] > fun (arr, (target, len)) =>
00:01:12 #2918 [Verbose] > binary_search_semi_open_1 arr target 0 len
00:01:12 #2919 [Verbose] >
00:01:12 #2920 [Verbose] > "closed_1",
00:01:12 #2921 [Verbose] > fun (arr, (target, len)) =>
00:01:12 #2922 [Verbose] > binary_search_closed_1 arr target 0 (len - 1)
00:01:12 #2923 [Verbose] >
00:01:12 #2924 [Verbose] > "semi_open_2",
00:01:12 #2925 [Verbose] > fun (arr, (target, len)) =>
00:01:12 #2926 [Verbose] > binary_search_semi_open_2 arr target 0 len
00:01:12 #2927 [Verbose] >
00:01:12 #2928 [Verbose] > "closed_2",
00:01:12 #2929 [Verbose] > fun (arr, (target, len)) =>
00:01:12 #2930 [Verbose] > binary_search_closed_2 arr target 0 (len - 1)
00:01:12 #2931 [Verbose] > ]]
00:01:12 #2932 [Verbose] >
00:01:12 #2933 [Verbose] > inl rec binary_search_tests () =
00:01:12 #2934 [Verbose] > inl arr_with_len target len arr =
00:01:12 #2935 [Verbose] > arr, (target, (len |> optionm'.default_with fun () => length arr))
00:01:12 #2936 [Verbose] >
00:01:12 #2937 [Verbose] > inl test_cases = [[
00:01:12 #2938 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32)
00:01:12 #2939 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32)
00:01:12 #2940 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32)
00:01:12 #2941 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None
00:01:12 #2942 [Verbose] > ((am'.init_series 1i32 100 1) |> arr_with_len 60 None), (Some 59)
00:01:12 #2943 [Verbose] >
00:01:12 #2944 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some
00:01:12 #2945 [Verbose] > 3i32)
00:01:12 #2946 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some
00:01:12 #2947 [Verbose] > 0i32)
00:01:12 #2948 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some
00:01:12 #2949 [Verbose] > 6i32)
00:01:12 #2950 [Verbose] > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None
00:01:12 #2951 [Verbose] > ((am'.init_series 1i32 100 1) |> arr_with_len 60 (Some 100)), (Some 59)
00:01:12 #2952 [Verbose] > ]]
00:01:12 #2953 [Verbose] >
00:01:12 #2954 [Verbose] > inl solutions = get_solutions ()
00:01:12 #2955 [Verbose] >
00:01:12 #2956 [Verbose] > // inl is_fast () = true
00:01:12 #2957 [Verbose] >
00:01:12 #2958 [Verbose] > inl count =
00:01:12 #2959 [Verbose] > if is_fast ()
00:01:12 #2960 [Verbose] > then 1000i32
00:01:12 #2961 [Verbose] > else 8000000i32
00:01:12 #2962 [Verbose] >
00:01:12 #2963 [Verbose] > run_all (nameof binary_search_tests) count solutions test_cases
00:01:12 #2964 [Verbose] > |> sort_result_list
00:01:12 #2965 [Verbose] >
00:01:12 #2966 [Verbose] >
00:01:12 #2967 [Verbose] > let main () =
00:01:12 #2968 [Verbose] > binary_search_tests ()
00:01:53 #2969 [Verbose] >
00:01:53 #2970 [Verbose] > ╭─[ 40.95s - stdout ]──────────────────────────────────────────────────────────╮
00:01:53 #2971 [Verbose] > │ type Mut0 = {mutable l0 : int32} │
00:01:53 #2972 [Verbose] > │ and [<Struct>] US0 = │
00:01:53 #2973 [Verbose] > │ | US0_0 │
00:01:53 #2974 [Verbose] > │ | US0_1 of f1_0 : int32 │
00:01:53 #2975 [Verbose] > │ and UH0 = │
00:01:53 #2976 [Verbose] > │ | UH0_0 of (int32 []) * int32 * int32 * US0 * UH0 │
00:01:53 #2977 [Verbose] > │ | UH0_1 │
00:01:53 #2978 [Verbose] > │ and Mut1 = {mutable l0 : uint64} │
00:01:53 #2979 [Verbose] > │ and UH1 = │
00:01:53 #2980 [Verbose] > │ | UH1_0 of int32 * string * (struct ((int32 []) * int32 * int32) -> US0) │
00:01:53 #2981 [Verbose] > │ * UH1 │
00:01:53 #2982 [Verbose] > │ | UH1_1 │
00:01:53 #2983 [Verbose] > │ and UH2 = │
00:01:53 #2984 [Verbose] > │ | UH2_0 of string * UH2 │
00:01:53 #2985 [Verbose] > │ | UH2_1 │
00:01:53 #2986 [Verbose] > │ and [<Struct>] US1 = │
00:01:53 #2987 [Verbose] > │ | US1_0 │
00:01:53 #2988 [Verbose] > │ | US1_1 of f1_0 : System.ConsoleColor │
00:01:53 #2989 [Verbose] > │ and UH3 = │
00:01:53 #2990 [Verbose] > │ | UH3_0 of int64 * int64 * UH3 │
00:01:53 #2991 [Verbose] > │ | UH3_1 │
00:01:53 #2992 [Verbose] > │ and Mut2 = {mutable l0 : uint64; mutable l1 : UH3; mutable l2 : int64} │
00:01:53 #2993 [Verbose] > │ and UH4 = │
00:01:53 #2994 [Verbose] > │ | UH4_0 of UH2 * US1 * UH4 │
00:01:53 #2995 [Verbose] > │ | UH4_1 │
00:01:53 #2996 [Verbose] > │ and [<Struct>] US2 = │
00:01:53 #2997 [Verbose] > │ | US2_0 │
00:01:53 #2998 [Verbose] > │ | US2_1 of f1_0 : int64 │
00:01:53 #2999 [Verbose] > │ and UH5 = │
00:01:53 #3000 [Verbose] > │ | UH5_0 of int32 * int64 * UH5 │
00:01:53 #3001 [Verbose] > │ | UH5_1 │
00:01:53 #3002 [Verbose] > │ and Mut3 = {mutable l0 : uint64; mutable l1 : UH5; mutable l2 : int32} │
00:01:53 #3003 [Verbose] > │ and UH6 = │
00:01:53 #3004 [Verbose] > │ | UH6_0 of int32 * string * UH6 │
00:01:53 #3005 [Verbose] > │ | UH6_1 │
00:01:53 #3006 [Verbose] > │ let rec method1 (v0 : (int32 [])) : (int32 []) = │
00:01:53 #3007 [Verbose] > │ v0 │
00:01:53 #3008 [Verbose] > │ and method2 (v0 : Mut0) : bool = │
00:01:53 #3009 [Verbose] > │ let v1 : int32 = v0.l0 │
00:01:53 #3010 [Verbose] > │ let v2 : bool = v1 < 100 │
00:01:53 #3011 [Verbose] > │ v2 │
00:01:53 #3012 [Verbose] > │ and method4 (v0 : UH0, v1 : uint64) : uint64 = │
00:01:53 #3013 [Verbose] > │ match v0 with │
00:01:53 #3014 [Verbose] > │ | UH0_0(v2, v3, v4, v5, v6) -> (* Cons *) │
00:01:53 #3015 [Verbose] > │ let v7 : uint64 = v1 + 1UL │
00:01:53 #3016 [Verbose] > │ method4(v6, v7) │
00:01:53 #3017 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:01:53 #3018 [Verbose] > │ v1 │
00:01:53 #3019 [Verbose] > │ and method5 (v0 : (struct ((int32 []) * int32 * int32 * US0) []), v1 : UH0, │
00:01:53 #3020 [Verbose] > │ v2 : uint64) : uint64 = │
00:01:53 #3021 [Verbose] > │ match v1 with │
00:01:53 #3022 [Verbose] > │ | UH0_0(v3, v4, v5, v6, v7) -> (* Cons *) │
00:01:53 #3023 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5, v6) │
00:01:53 #3024 [Verbose] > │ let v8 : uint64 = v2 + 1UL │
00:01:53 #3025 [Verbose] > │ method5(v0, v7, v8) │
00:01:53 #3026 [Verbose] > │ | UH0_1 -> (* Nil *) │
00:01:53 #3027 [Verbose] > │ v2 │
00:01:53 #3028 [Verbose] > │ and method3 (v0 : UH0) : (struct ((int32 []) * int32 * int32 * US0) []) = │
00:01:53 #3029 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:53 #3030 [Verbose] > │ let v2 : uint64 = method4(v0, v1) │
00:01:53 #3031 [Verbose] > │ let v3 : (struct ((int32 []) * int32 * int32 * US0) []) = │
00:01:53 #3032 [Verbose] > │ Array.zeroCreate<struct ((int32 []) * int32 * int32 * US0)> │
00:01:53 #3033 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:53 #3034 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:53 #3035 [Verbose] > │ let v5 : uint64 = method5(v3, v0, v4) │
00:01:53 #3036 [Verbose] > │ v3 │
00:01:53 #3037 [Verbose] > │ and method6 (v0 : uint64, v1 : Mut1) : bool = │
00:01:53 #3038 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:53 #3039 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:53 #3040 [Verbose] > │ v3 │
00:01:53 #3041 [Verbose] > │ and method7 (v0 : (int32 []), v1 : int32, v2 : int32, v3 : int32) : US0 = │
00:01:53 #3042 [Verbose] > │ let v4 : bool = v3 >= v2 │
00:01:53 #3043 [Verbose] > │ if v4 then │
00:01:53 #3044 [Verbose] > │ US0_0 │
00:01:53 #3045 [Verbose] > │ else │
00:01:53 #3046 [Verbose] > │ let v6 : int32 = v3 + v2 │
00:01:53 #3047 [Verbose] > │ let v7 : int32 = v6 / 2 │
00:01:53 #3048 [Verbose] > │ let v8 : int32 = v0.[int v7] │
00:01:53 #3049 [Verbose] > │ let v9 : bool = v8 = v1 │
00:01:53 #3050 [Verbose] > │ if v9 then │
00:01:53 #3051 [Verbose] > │ US0_1(v7) │
00:01:53 #3052 [Verbose] > │ else │
00:01:53 #3053 [Verbose] > │ let v11 : bool = v8 < v1 │
00:01:53 #3054 [Verbose] > │ if v11 then │
00:01:53 #3055 [Verbose] > │ let v12 : int32 = v7 + 1 │
00:01:53 #3056 [Verbose] > │ method7(v0, v1, v2, v12) │
00:01:53 #3057 [Verbose] > │ else │
00:01:53 #3058 [Verbose] > │ method7(v0, v1, v7, v3) │
00:01:53 #3059 [Verbose] > │ and closure1 () struct (v0 : (int32 []), v1 : int32, v2 : int32) : US0 = │
00:01:53 #3060 [Verbose] > │ let v3 : int32 = 0 │
00:01:53 #3061 [Verbose] > │ method7(v0, v1, v2, v3) │
00:01:53 #3062 [Verbose] > │ and method8 (v0 : (int32 []), v1 : int32, v2 : int32, v3 : int32) : US0 = │
00:01:53 #3063 [Verbose] > │ let v4 : bool = v3 > v2 │
00:01:53 #3064 [Verbose] > │ if v4 then │
00:01:53 #3065 [Verbose] > │ US0_0 │
00:01:53 #3066 [Verbose] > │ else │
00:01:53 #3067 [Verbose] > │ let v6 : int32 = v3 + v2 │
00:01:53 #3068 [Verbose] > │ let v7 : int32 = v6 / 2 │
00:01:53 #3069 [Verbose] > │ let v8 : int32 = v0.[int v7] │
00:01:53 #3070 [Verbose] > │ let v9 : bool = v8 = v1 │
00:01:53 #3071 [Verbose] > │ if v9 then │
00:01:53 #3072 [Verbose] > │ US0_1(v7) │
00:01:53 #3073 [Verbose] > │ else │
00:01:53 #3074 [Verbose] > │ let v11 : bool = v8 < v1 │
00:01:53 #3075 [Verbose] > │ if v11 then │
00:01:53 #3076 [Verbose] > │ let v12 : int32 = v7 + 1 │
00:01:53 #3077 [Verbose] > │ method8(v0, v1, v2, v12) │
00:01:53 #3078 [Verbose] > │ else │
00:01:53 #3079 [Verbose] > │ let v14 : int32 = v7 - 1 │
00:01:53 #3080 [Verbose] > │ method8(v0, v1, v14, v3) │
00:01:53 #3081 [Verbose] > │ and closure2 () struct (v0 : (int32 []), v1 : int32, v2 : int32) : US0 = │
00:01:53 #3082 [Verbose] > │ let v3 : int32 = v2 - 1 │
00:01:53 #3083 [Verbose] > │ let v4 : int32 = 0 │
00:01:53 #3084 [Verbose] > │ method8(v0, v1, v3, v4) │
00:01:53 #3085 [Verbose] > │ and method9 (v0 : (int32 []), v1 : int32, v2 : int32, v3 : int32) : US0 = │
00:01:53 #3086 [Verbose] > │ let v4 : bool = v2 >= v3 │
00:01:53 #3087 [Verbose] > │ if v4 then │
00:01:53 #3088 [Verbose] > │ US0_0 │
00:01:53 #3089 [Verbose] > │ else │
00:01:53 #3090 [Verbose] > │ let v6 : int32 = v2 + v3 │
00:01:53 #3091 [Verbose] > │ let v7 : int32 = v6 / 2 │
00:01:53 #3092 [Verbose] > │ let v8 : int32 = v0.[int v7] │
00:01:53 #3093 [Verbose] > │ let v9 : bool = v8 = v1 │
00:01:53 #3094 [Verbose] > │ if v9 then │
00:01:53 #3095 [Verbose] > │ US0_1(v7) │
00:01:53 #3096 [Verbose] > │ else │
00:01:53 #3097 [Verbose] > │ let v11 : bool = v8 < v1 │
00:01:53 #3098 [Verbose] > │ if v11 then │
00:01:53 #3099 [Verbose] > │ let v12 : int32 = v7 + 1 │
00:01:53 #3100 [Verbose] > │ method9(v0, v1, v12, v3) │
00:01:53 #3101 [Verbose] > │ else │
00:01:53 #3102 [Verbose] > │ method9(v0, v1, v2, v7) │
00:01:53 #3103 [Verbose] > │ and closure3 () struct (v0 : (int32 []), v1 : int32, v2 : int32) : US0 = │
00:01:53 #3104 [Verbose] > │ let v3 : int32 = 0 │
00:01:53 #3105 [Verbose] > │ method9(v0, v1, v3, v2) │
00:01:53 #3106 [Verbose] > │ and method10 (v0 : (int32 []), v1 : int32, v2 : int32, v3 : int32) : US0 = │
00:01:53 #3107 [Verbose] > │ let v4 : bool = v2 > v3 │
00:01:53 #3108 [Verbose] > │ if v4 then │
00:01:53 #3109 [Verbose] > │ US0_0 │
00:01:53 #3110 [Verbose] > │ else │
00:01:53 #3111 [Verbose] > │ let v6 : int32 = v2 + v3 │
00:01:53 #3112 [Verbose] > │ let v7 : int32 = v6 / 2 │
00:01:53 #3113 [Verbose] > │ let v8 : int32 = v0.[int v7] │
00:01:53 #3114 [Verbose] > │ let v9 : bool = v8 = v1 │
00:01:53 #3115 [Verbose] > │ if v9 then │
00:01:53 #3116 [Verbose] > │ US0_1(v7) │
00:01:53 #3117 [Verbose] > │ else │
00:01:53 #3118 [Verbose] > │ let v11 : bool = v8 < v1 │
00:01:53 #3119 [Verbose] > │ if v11 then │
00:01:53 #3120 [Verbose] > │ let v12 : int32 = v7 + 1 │
00:01:53 #3121 [Verbose] > │ method10(v0, v1, v12, v3) │
00:01:53 #3122 [Verbose] > │ else │
00:01:53 #3123 [Verbose] > │ let v14 : int32 = v7 - 1 │
00:01:53 #3124 [Verbose] > │ method10(v0, v1, v2, v14) │
00:01:53 #3125 [Verbose] > │ and closure4 () struct (v0 : (int32 []), v1 : int32, v2 : int32) : US0 = │
00:01:53 #3126 [Verbose] > │ let v3 : int32 = v2 - 1 │
00:01:53 #3127 [Verbose] > │ let v4 : int32 = 0 │
00:01:53 #3128 [Verbose] > │ method10(v0, v1, v4, v3) │
00:01:53 #3129 [Verbose] > │ and method12 (v0 : UH1, v1 : uint64) : uint64 = │
00:01:53 #3130 [Verbose] > │ match v0 with │
00:01:53 #3131 [Verbose] > │ | UH1_0(v2, v3, v4, v5) -> (* Cons *) │
00:01:53 #3132 [Verbose] > │ let v6 : uint64 = v1 + 1UL │
00:01:53 #3133 [Verbose] > │ method12(v5, v6) │
00:01:53 #3134 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:01:53 #3135 [Verbose] > │ v1 │
00:01:53 #3136 [Verbose] > │ and method13 (v0 : (struct (int32 * string * (struct ((int32 []) * int32 * │
00:01:53 #3137 [Verbose] > │ int32) -> US0)) []), v1 : UH1, v2 : uint64) : uint64 = │
00:01:53 #3138 [Verbose] > │ match v1 with │
00:01:53 #3139 [Verbose] > │ | UH1_0(v3, v4, v5, v6) -> (* Cons *) │
00:01:53 #3140 [Verbose] > │ v0.[int v2] <- struct (v3, v4, v5) │
00:01:53 #3141 [Verbose] > │ let v7 : uint64 = v2 + 1UL │
00:01:53 #3142 [Verbose] > │ method13(v0, v6, v7) │
00:01:53 #3143 [Verbose] > │ | UH1_1 -> (* Nil *) │
00:01:53 #3144 [Verbose] > │ v2 │
00:01:53 #3145 [Verbose] > │ and method11 (v0 : UH1) : (struct (int32 * string * (struct ((int32 []) * │
00:01:53 #3146 [Verbose] > │ int32 * int32) -> US0)) []) = │
00:01:53 #3147 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:53 #3148 [Verbose] > │ let v2 : uint64 = method12(v0, v1) │
00:01:53 #3149 [Verbose] > │ let v3 : (struct (int32 * string * (struct ((int32 []) * int32 * int32) │
00:01:53 #3150 [Verbose] > │ -> US0)) []) = Array.zeroCreate<struct (int32 * string * (struct ((int32 []) │
00:01:53 #3151 [Verbose] > │ * int32 * int32) -> US0))> (System.Convert.ToInt32(v2)) │
00:01:53 #3152 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:53 #3153 [Verbose] > │ let v5 : uint64 = method13(v3, v0, v4) │
00:01:53 #3154 [Verbose] > │ v3 │
00:01:53 #3155 [Verbose] > │ and method14 (v0 : Mut0) : bool = │
00:01:53 #3156 [Verbose] > │ let v1 : int32 = v0.l0 │
00:01:53 #3157 [Verbose] > │ let v2 : bool = v1 < 8000001 │
00:01:53 #3158 [Verbose] > │ v2 │
00:01:53 #3159 [Verbose] > │ and closure5 (v0 : (int32 []), v1 : int32, v2 : int32, v3 : (struct ((int32 │
00:01:53 #3160 [Verbose] > │ []) * int32 * int32) -> US0)) (v4 : int32) : US0 = │
00:01:53 #3161 [Verbose] > │ v3 struct (v0, v1, v2) │
00:01:53 #3162 [Verbose] > │ and method15 (v0 : US0, v1 : (US0 []), v2 : uint64) : bool = │
00:01:53 #3163 [Verbose] > │ let v3 : uint64 = System.Convert.ToUInt64 v1.Length │
00:01:53 #3164 [Verbose] > │ let v4 : bool = v2 < v3 │
00:01:53 #3165 [Verbose] > │ if v4 then │
00:01:53 #3166 [Verbose] > │ let v5 : US0 = v1.[int v2] │
00:01:53 #3167 [Verbose] > │ let v9 : bool = │
00:01:53 #3168 [Verbose] > │ match v0, v5 with │
00:01:53 #3169 [Verbose] > │ | US0_0, US0_0 -> (* None *) │
00:01:53 #3170 [Verbose] > │ true │
00:01:53 #3171 [Verbose] > │ | US0_1(v6), US0_1(v7) -> (* Some *) │
00:01:53 #3172 [Verbose] > │ let v8 : bool = v6 = v7 │
00:01:53 #3173 [Verbose] > │ v8 │
00:01:53 #3174 [Verbose] > │ | _ -> │
00:01:53 #3175 [Verbose] > │ false │
00:01:53 #3176 [Verbose] > │ if v9 then │
00:01:53 #3177 [Verbose] > │ let v10 : uint64 = v2 + 1UL │
00:01:53 #3178 [Verbose] > │ method15(v0, v1, v10) │
00:01:53 #3179 [Verbose] > │ else │
00:01:53 #3180 [Verbose] > │ false │
00:01:53 #3181 [Verbose] > │ else │
00:01:53 #3182 [Verbose] > │ true │
00:01:53 #3183 [Verbose] > │ and method16 (v0 : uint64, v1 : Mut2) : bool = │
00:01:53 #3184 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:53 #3185 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:53 #3186 [Verbose] > │ v3 │
00:01:53 #3187 [Verbose] > │ and method17 (v0 : UH3, v1 : UH3) : UH3 = │
00:01:53 #3188 [Verbose] > │ match v0 with │
00:01:53 #3189 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3190 [Verbose] > │ let v5 : UH3 = UH3_0(v2, v3, v1) │
00:01:53 #3191 [Verbose] > │ method17(v4, v5) │
00:01:53 #3192 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:01:53 #3193 [Verbose] > │ v1 │
00:01:53 #3194 [Verbose] > │ and method19 (v0 : UH3, v1 : int32) : int32 = │
00:01:53 #3195 [Verbose] > │ match v0 with │
00:01:53 #3196 [Verbose] > │ | UH3_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3197 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:01:53 #3198 [Verbose] > │ method19(v4, v5) │
00:01:53 #3199 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:01:53 #3200 [Verbose] > │ v1 │
00:01:53 #3201 [Verbose] > │ and method20 (v0 : (struct (int64 * int64) []), v1 : UH3, v2 : int32) : │
00:01:53 #3202 [Verbose] > │ int32 = │
00:01:53 #3203 [Verbose] > │ match v1 with │
00:01:53 #3204 [Verbose] > │ | UH3_0(v3, v4, v5) -> (* Cons *) │
00:01:53 #3205 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:53 #3206 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:01:53 #3207 [Verbose] > │ method20(v0, v5, v6) │
00:01:53 #3208 [Verbose] > │ | UH3_1 -> (* Nil *) │
00:01:53 #3209 [Verbose] > │ v2 │
00:01:53 #3210 [Verbose] > │ and method18 (v0 : UH3) : (struct (int64 * int64) []) = │
00:01:53 #3211 [Verbose] > │ let v1 : int32 = 0 │
00:01:53 #3212 [Verbose] > │ let v2 : int32 = method19(v0, v1) │
00:01:53 #3213 [Verbose] > │ let v3 : (struct (int64 * int64) []) = Array.zeroCreate<struct (int64 * │
00:01:53 #3214 [Verbose] > │ int64)> (v2) │
00:01:53 #3215 [Verbose] > │ let v4 : int32 = 0 │
00:01:53 #3216 [Verbose] > │ let v5 : int32 = method20(v3, v0, v4) │
00:01:53 #3217 [Verbose] > │ v3 │
00:01:53 #3218 [Verbose] > │ and method21 (v0 : int32, v1 : Mut0) : bool = │
00:01:53 #3219 [Verbose] > │ let v2 : int32 = v1.l0 │
00:01:53 #3220 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:53 #3221 [Verbose] > │ v3 │
00:01:53 #3222 [Verbose] > │ and closure6 () struct (v0 : int64, v1 : int64) : int64 = │
00:01:53 #3223 [Verbose] > │ v1 │
00:01:53 #3224 [Verbose] > │ and method23 (v0 : UH4, v1 : uint64) : uint64 = │
00:01:53 #3225 [Verbose] > │ match v0 with │
00:01:53 #3226 [Verbose] > │ | UH4_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3227 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:01:53 #3228 [Verbose] > │ method23(v4, v5) │
00:01:53 #3229 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:01:53 #3230 [Verbose] > │ v1 │
00:01:53 #3231 [Verbose] > │ and method24 (v0 : (struct (UH2 * US1) []), v1 : UH4, v2 : uint64) : uint64 │
00:01:53 #3232 [Verbose] > │ = │
00:01:53 #3233 [Verbose] > │ match v1 with │
00:01:53 #3234 [Verbose] > │ | UH4_0(v3, v4, v5) -> (* Cons *) │
00:01:53 #3235 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:53 #3236 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:01:53 #3237 [Verbose] > │ method24(v0, v5, v6) │
00:01:53 #3238 [Verbose] > │ | UH4_1 -> (* Nil *) │
00:01:53 #3239 [Verbose] > │ v2 │
00:01:53 #3240 [Verbose] > │ and method22 (v0 : UH4) : (struct (UH2 * US1) []) = │
00:01:53 #3241 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:53 #3242 [Verbose] > │ let v2 : uint64 = method23(v0, v1) │
00:01:53 #3243 [Verbose] > │ let v3 : (struct (UH2 * US1) []) = Array.zeroCreate<struct (UH2 * US1)> │
00:01:53 #3244 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:53 #3245 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:53 #3246 [Verbose] > │ let v5 : uint64 = method24(v3, v0, v4) │
00:01:53 #3247 [Verbose] > │ v3 │
00:01:53 #3248 [Verbose] > │ and method26 (v0 : UH2, v1 : uint64) : uint64 = │
00:01:53 #3249 [Verbose] > │ match v0 with │
00:01:53 #3250 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:01:53 #3251 [Verbose] > │ let v4 : uint64 = v1 + 1UL │
00:01:53 #3252 [Verbose] > │ method26(v3, v4) │
00:01:53 #3253 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:53 #3254 [Verbose] > │ v1 │
00:01:53 #3255 [Verbose] > │ and method27 (v0 : (string []), v1 : UH2, v2 : uint64) : uint64 = │
00:01:53 #3256 [Verbose] > │ match v1 with │
00:01:53 #3257 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:53 #3258 [Verbose] > │ v0.[int v2] <- v3 │
00:01:53 #3259 [Verbose] > │ let v5 : uint64 = v2 + 1UL │
00:01:53 #3260 [Verbose] > │ method27(v0, v4, v5) │
00:01:53 #3261 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:53 #3262 [Verbose] > │ v2 │
00:01:53 #3263 [Verbose] > │ and method25 (v0 : UH2) : (string []) = │
00:01:53 #3264 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:53 #3265 [Verbose] > │ let v2 : uint64 = method26(v0, v1) │
00:01:53 #3266 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> │
00:01:53 #3267 [Verbose] > │ (System.Convert.ToInt32(v2)) │
00:01:53 #3268 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:53 #3269 [Verbose] > │ let v5 : uint64 = method27(v3, v0, v4) │
00:01:53 #3270 [Verbose] > │ v3 │
00:01:53 #3271 [Verbose] > │ and closure7 () (v0 : int64) : US2 = │
00:01:53 #3272 [Verbose] > │ US2_1(v0) │
00:01:53 #3273 [Verbose] > │ and method28 (v0 : uint64, v1 : Mut3) : bool = │
00:01:53 #3274 [Verbose] > │ let v2 : uint64 = v1.l0 │
00:01:53 #3275 [Verbose] > │ let v3 : bool = v2 < v0 │
00:01:53 #3276 [Verbose] > │ v3 │
00:01:53 #3277 [Verbose] > │ and method29 (v0 : UH5, v1 : UH5) : UH5 = │
00:01:53 #3278 [Verbose] > │ match v0 with │
00:01:53 #3279 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3280 [Verbose] > │ let v5 : UH5 = UH5_0(v2, v3, v1) │
00:01:53 #3281 [Verbose] > │ method29(v4, v5) │
00:01:53 #3282 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:53 #3283 [Verbose] > │ v1 │
00:01:53 #3284 [Verbose] > │ and method31 (v0 : UH5, v1 : int32) : int32 = │
00:01:53 #3285 [Verbose] > │ match v0 with │
00:01:53 #3286 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3287 [Verbose] > │ let v5 : int32 = v1 + 1 │
00:01:53 #3288 [Verbose] > │ method31(v4, v5) │
00:01:53 #3289 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:53 #3290 [Verbose] > │ v1 │
00:01:53 #3291 [Verbose] > │ and method32 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : int32) : │
00:01:53 #3292 [Verbose] > │ int32 = │
00:01:53 #3293 [Verbose] > │ match v1 with │
00:01:53 #3294 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:01:53 #3295 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:53 #3296 [Verbose] > │ let v6 : int32 = v2 + 1 │
00:01:53 #3297 [Verbose] > │ method32(v0, v5, v6) │
00:01:53 #3298 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:53 #3299 [Verbose] > │ v2 │
00:01:53 #3300 [Verbose] > │ and method30 (v0 : UH5) : (struct (int32 * int64) []) = │
00:01:53 #3301 [Verbose] > │ let v1 : int32 = 0 │
00:01:53 #3302 [Verbose] > │ let v2 : int32 = method31(v0, v1) │
00:01:53 #3303 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:01:53 #3304 [Verbose] > │ int64)> (v2) │
00:01:53 #3305 [Verbose] > │ let v4 : int32 = 0 │
00:01:53 #3306 [Verbose] > │ let v5 : int32 = method32(v3, v0, v4) │
00:01:53 #3307 [Verbose] > │ v3 │
00:01:53 #3308 [Verbose] > │ and method33 (v0 : UH2, v1 : UH6, v2 : int32) : struct (UH6 * int32) = │
00:01:53 #3309 [Verbose] > │ match v0 with │
00:01:53 #3310 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:53 #3311 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:01:53 #3312 [Verbose] > │ let v6 : UH6 = UH6_0(v2, v3, v1) │
00:01:53 #3313 [Verbose] > │ method33(v4, v6, v5) │
00:01:53 #3314 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:53 #3315 [Verbose] > │ struct (v1, v2) │
00:01:53 #3316 [Verbose] > │ and method34 (v0 : UH6, v1 : UH6) : UH6 = │
00:01:53 #3317 [Verbose] > │ match v0 with │
00:01:53 #3318 [Verbose] > │ | UH6_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3319 [Verbose] > │ let v5 : UH6 = UH6_0(v2, v3, v1) │
00:01:53 #3320 [Verbose] > │ method34(v4, v5) │
00:01:53 #3321 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:53 #3322 [Verbose] > │ v1 │
00:01:53 #3323 [Verbose] > │ and method35 (v0 : Map<int32, int64>, v1 : UH6, v2 : UH2) : UH2 = │
00:01:53 #3324 [Verbose] > │ match v1 with │
00:01:53 #3325 [Verbose] > │ | UH6_0(v3, v4, v5) -> (* Cons *) │
00:01:53 #3326 [Verbose] > │ let v6 : UH2 = method35(v0, v5, v2) │
00:01:53 #3327 [Verbose] > │ let v7 : int64 = v0.[v3] │
00:01:53 #3328 [Verbose] > │ let v8 : int32 = int32 v7 │
00:01:53 #3329 [Verbose] > │ let v9 : string = v4.PadRight v8 │
00:01:53 #3330 [Verbose] > │ UH2_0(v9, v6) │
00:01:53 #3331 [Verbose] > │ | UH6_1 -> (* Nil *) │
00:01:53 #3332 [Verbose] > │ v2 │
00:01:53 #3333 [Verbose] > │ and method37 (v0 : UH2, v1 : int32) : int32 = │
00:01:53 #3334 [Verbose] > │ match v0 with │
00:01:53 #3335 [Verbose] > │ | UH2_0(v2, v3) -> (* Cons *) │
00:01:53 #3336 [Verbose] > │ let v4 : int32 = v1 + 1 │
00:01:53 #3337 [Verbose] > │ method37(v3, v4) │
00:01:53 #3338 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:53 #3339 [Verbose] > │ v1 │
00:01:53 #3340 [Verbose] > │ and method38 (v0 : (string []), v1 : UH2, v2 : int32) : int32 = │
00:01:53 #3341 [Verbose] > │ match v1 with │
00:01:53 #3342 [Verbose] > │ | UH2_0(v3, v4) -> (* Cons *) │
00:01:53 #3343 [Verbose] > │ v0.[int v2] <- v3 │
00:01:53 #3344 [Verbose] > │ let v5 : int32 = v2 + 1 │
00:01:53 #3345 [Verbose] > │ method38(v0, v4, v5) │
00:01:53 #3346 [Verbose] > │ | UH2_1 -> (* Nil *) │
00:01:53 #3347 [Verbose] > │ v2 │
00:01:53 #3348 [Verbose] > │ and method36 (v0 : UH2) : (string []) = │
00:01:53 #3349 [Verbose] > │ let v1 : int32 = 0 │
00:01:53 #3350 [Verbose] > │ let v2 : int32 = method37(v0, v1) │
00:01:53 #3351 [Verbose] > │ let v3 : (string []) = Array.zeroCreate<string> (v2) │
00:01:53 #3352 [Verbose] > │ let v4 : int32 = 0 │
00:01:53 #3353 [Verbose] > │ let v5 : int32 = method38(v3, v0, v4) │
00:01:53 #3354 [Verbose] > │ v3 │
00:01:53 #3355 [Verbose] > │ and method40 (v0 : UH5, v1 : uint64) : uint64 = │
00:01:53 #3356 [Verbose] > │ match v0 with │
00:01:53 #3357 [Verbose] > │ | UH5_0(v2, v3, v4) -> (* Cons *) │
00:01:53 #3358 [Verbose] > │ let v5 : uint64 = v1 + 1UL │
00:01:53 #3359 [Verbose] > │ method40(v4, v5) │
00:01:53 #3360 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:53 #3361 [Verbose] > │ v1 │
00:01:53 #3362 [Verbose] > │ and method41 (v0 : (struct (int32 * int64) []), v1 : UH5, v2 : uint64) : │
00:01:53 #3363 [Verbose] > │ uint64 = │
00:01:53 #3364 [Verbose] > │ match v1 with │
00:01:53 #3365 [Verbose] > │ | UH5_0(v3, v4, v5) -> (* Cons *) │
00:01:53 #3366 [Verbose] > │ v0.[int v2] <- struct (v3, v4) │
00:01:53 #3367 [Verbose] > │ let v6 : uint64 = v2 + 1UL │
00:01:53 #3368 [Verbose] > │ method41(v0, v5, v6) │
00:01:53 #3369 [Verbose] > │ | UH5_1 -> (* Nil *) │
00:01:53 #3370 [Verbose] > │ v2 │
00:01:53 #3371 [Verbose] > │ and method39 (v0 : UH5) : (struct (int32 * int64) []) = │
00:01:53 #3372 [Verbose] > │ let v1 : uint64 = 0UL │
00:01:53 #3373 [Verbose] > │ let v2 : uint64 = method40(v0, v1) │
00:01:53 #3374 [Verbose] > │ let v3 : (struct (int32 * int64) []) = Array.zeroCreate<struct (int32 * │
00:01:53 #3375 [Verbose] > │ int64)> (System.Convert.ToInt32(v2)) │
00:01:53 #3376 [Verbose] > │ let v4 : uint64 = 0UL │
00:01:53 #3377 [Verbose] > │ let v5 : uint64 = method41(v3, v0, v4) │
00:01:53 #3378 [Verbose] > │ v3 │
00:01:53 #3379 [Verbose] > │ and closure8 () struct (v0 : int32, v1 : int64) : int64 = │
00:01:53 #3380 [Verbose] > │ v1 │
00:01:53 #3381 [Verbose] > │ and closure0 () () : unit = │
00:01:53 #3382 [Verbose] > │ let v0 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3383 [Verbose] > │ let v1 : (int32 []) = method1(v0) │
00:01:53 #3384 [Verbose] > │ let v2 : int32 = v1.Length │
00:01:53 #3385 [Verbose] > │ let v3 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3386 [Verbose] > │ let v4 : (int32 []) = method1(v3) │
00:01:53 #3387 [Verbose] > │ let v5 : int32 = v4.Length │
00:01:53 #3388 [Verbose] > │ let v6 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3389 [Verbose] > │ let v7 : (int32 []) = method1(v6) │
00:01:53 #3390 [Verbose] > │ let v8 : int32 = v7.Length │
00:01:53 #3391 [Verbose] > │ let v9 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3392 [Verbose] > │ let v10 : (int32 []) = method1(v9) │
00:01:53 #3393 [Verbose] > │ let v11 : int32 = v10.Length │
00:01:53 #3394 [Verbose] > │ let v12 : (int32 []) = Array.zeroCreate<int32> (100) │
00:01:53 #3395 [Verbose] > │ let v13 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3396 [Verbose] > │ while method2(v13) do │
00:01:53 #3397 [Verbose] > │ let v15 : int32 = v13.l0 │
00:01:53 #3398 [Verbose] > │ let v16 : int32 = 1 + v15 │
00:01:53 #3399 [Verbose] > │ v12.[int v15] <- v16 │
00:01:53 #3400 [Verbose] > │ let v17 : int32 = v15 + 1 │
00:01:53 #3401 [Verbose] > │ v13.l0 <- v17 │
00:01:53 #3402 [Verbose] > │ () │
00:01:53 #3403 [Verbose] > │ let v18 : int32 = v12.Length │
00:01:53 #3404 [Verbose] > │ let v19 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3405 [Verbose] > │ let v20 : (int32 []) = method1(v19) │
00:01:53 #3406 [Verbose] > │ let v21 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3407 [Verbose] > │ let v22 : (int32 []) = method1(v21) │
00:01:53 #3408 [Verbose] > │ let v23 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3409 [Verbose] > │ let v24 : (int32 []) = method1(v23) │
00:01:53 #3410 [Verbose] > │ let v25 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3411 [Verbose] > │ let v26 : (int32 []) = method1(v25) │
00:01:53 #3412 [Verbose] > │ let v27 : (int32 []) = Array.zeroCreate<int32> (100) │
00:01:53 #3413 [Verbose] > │ let v28 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3414 [Verbose] > │ while method2(v28) do │
00:01:53 #3415 [Verbose] > │ let v30 : int32 = v28.l0 │
00:01:53 #3416 [Verbose] > │ let v31 : int32 = 1 + v30 │
00:01:53 #3417 [Verbose] > │ v27.[int v30] <- v31 │
00:01:53 #3418 [Verbose] > │ let v32 : int32 = v30 + 1 │
00:01:53 #3419 [Verbose] > │ v28.l0 <- v32 │
00:01:53 #3420 [Verbose] > │ () │
00:01:53 #3421 [Verbose] > │ let v33 : (unit -> unit) = closure0() │
00:01:53 #3422 [Verbose] > │ let v34 : string = nameof v33 │
00:01:53 #3423 [Verbose] > │ let v35 : string = "" │
00:01:53 #3424 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3425 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3426 [Verbose] > │ let v36 : string = $"Test: {v34}" │
00:01:53 #3427 [Verbose] > │ System.Console.WriteLine v36 │
00:01:53 #3428 [Verbose] > │ let v37 : int32 = 6 │
00:01:53 #3429 [Verbose] > │ let v38 : int32 = 3 │
00:01:53 #3430 [Verbose] > │ let v39 : US0 = US0_1(v38) │
00:01:53 #3431 [Verbose] > │ let v40 : int32 = 1 │
00:01:53 #3432 [Verbose] > │ let v41 : int32 = 0 │
00:01:53 #3433 [Verbose] > │ let v42 : US0 = US0_1(v41) │
00:01:53 #3434 [Verbose] > │ let v43 : int32 = 11 │
00:01:53 #3435 [Verbose] > │ let v44 : int32 = 6 │
00:01:53 #3436 [Verbose] > │ let v45 : US0 = US0_1(v44) │
00:01:53 #3437 [Verbose] > │ let v46 : int32 = 12 │
00:01:53 #3438 [Verbose] > │ let v47 : US0 = US0_0 │
00:01:53 #3439 [Verbose] > │ let v48 : int32 = 60 │
00:01:53 #3440 [Verbose] > │ let v49 : int32 = 59 │
00:01:53 #3441 [Verbose] > │ let v50 : US0 = US0_1(v49) │
00:01:53 #3442 [Verbose] > │ let v51 : int32 = 6 │
00:01:53 #3443 [Verbose] > │ let v52 : int32 = 7 │
00:01:53 #3444 [Verbose] > │ let v53 : int32 = 3 │
00:01:53 #3445 [Verbose] > │ let v54 : US0 = US0_1(v53) │
00:01:53 #3446 [Verbose] > │ let v55 : int32 = 1 │
00:01:53 #3447 [Verbose] > │ let v56 : int32 = 7 │
00:01:53 #3448 [Verbose] > │ let v57 : int32 = 0 │
00:01:53 #3449 [Verbose] > │ let v58 : US0 = US0_1(v57) │
00:01:53 #3450 [Verbose] > │ let v59 : int32 = 11 │
00:01:53 #3451 [Verbose] > │ let v60 : int32 = 7 │
00:01:53 #3452 [Verbose] > │ let v61 : int32 = 6 │
00:01:53 #3453 [Verbose] > │ let v62 : US0 = US0_1(v61) │
00:01:53 #3454 [Verbose] > │ let v63 : int32 = 12 │
00:01:53 #3455 [Verbose] > │ let v64 : int32 = 7 │
00:01:53 #3456 [Verbose] > │ let v65 : US0 = US0_0 │
00:01:53 #3457 [Verbose] > │ let v66 : int32 = 60 │
00:01:53 #3458 [Verbose] > │ let v67 : int32 = 100 │
00:01:53 #3459 [Verbose] > │ let v68 : int32 = 59 │
00:01:53 #3460 [Verbose] > │ let v69 : US0 = US0_1(v68) │
00:01:53 #3461 [Verbose] > │ let v70 : UH0 = UH0_1 │
00:01:53 #3462 [Verbose] > │ let v71 : UH0 = UH0_0(v27, v66, v67, v69, v70) │
00:01:53 #3463 [Verbose] > │ let v72 : UH0 = UH0_0(v26, v63, v64, v65, v71) │
00:01:53 #3464 [Verbose] > │ let v73 : UH0 = UH0_0(v24, v59, v60, v62, v72) │
00:01:53 #3465 [Verbose] > │ let v74 : UH0 = UH0_0(v22, v55, v56, v58, v73) │
00:01:53 #3466 [Verbose] > │ let v75 : UH0 = UH0_0(v20, v51, v52, v54, v74) │
00:01:53 #3467 [Verbose] > │ let v76 : UH0 = UH0_0(v12, v48, v18, v50, v75) │
00:01:53 #3468 [Verbose] > │ let v77 : UH0 = UH0_0(v10, v46, v11, v47, v76) │
00:01:53 #3469 [Verbose] > │ let v78 : UH0 = UH0_0(v7, v43, v8, v45, v77) │
00:01:53 #3470 [Verbose] > │ let v79 : UH0 = UH0_0(v4, v40, v5, v42, v78) │
00:01:53 #3471 [Verbose] > │ let v80 : UH0 = UH0_0(v1, v37, v2, v39, v79) │
00:01:53 #3472 [Verbose] > │ let v81 : (struct ((int32 []) * int32 * int32 * US0) []) = method3(v80) │
00:01:53 #3473 [Verbose] > │ let v82 : uint64 = System.Convert.ToUInt64 v81.Length │
00:01:53 #3474 [Verbose] > │ let v83 : (struct (string * string * string * (int64 [])) []) = │
00:01:53 #3475 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:01:53 #3476 [Verbose] > │ (System.Convert.ToInt32(v82)) │
00:01:53 #3477 [Verbose] > │ let v84 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3478 [Verbose] > │ while method6(v82, v84) do │
00:01:53 #3479 [Verbose] > │ let v86 : uint64 = v84.l0 │
00:01:53 #3480 [Verbose] > │ let struct (v87 : (int32 []), v88 : int32, v89 : int32, v90 : US0) = │
00:01:53 #3481 [Verbose] > │ v81.[int v86] │
00:01:53 #3482 [Verbose] > │ let v91 : string = $"%A{struct (v87, v88, v89)}" │
00:01:53 #3483 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3484 [Verbose] > │ let v92 : string = $"Solution: {v91} " │
00:01:53 #3485 [Verbose] > │ System.Console.WriteLine v92 │
00:01:53 #3486 [Verbose] > │ let v93 : int32 = 0 │
00:01:53 #3487 [Verbose] > │ let v94 : string = "semi_open_1" │
00:01:53 #3488 [Verbose] > │ let v95 : (struct ((int32 []) * int32 * int32) -> US0) = closure1() │
00:01:53 #3489 [Verbose] > │ let v96 : int32 = 1 │
00:01:53 #3490 [Verbose] > │ let v97 : string = "closed_1" │
00:01:53 #3491 [Verbose] > │ let v98 : (struct ((int32 []) * int32 * int32) -> US0) = closure2() │
00:01:53 #3492 [Verbose] > │ let v99 : int32 = 2 │
00:01:53 #3493 [Verbose] > │ let v100 : string = "semi_open_2" │
00:01:53 #3494 [Verbose] > │ let v101 : (struct ((int32 []) * int32 * int32) -> US0) = closure3() │
00:01:53 #3495 [Verbose] > │ let v102 : int32 = 3 │
00:01:53 #3496 [Verbose] > │ let v103 : string = "closed_2" │
00:01:53 #3497 [Verbose] > │ let v104 : (struct ((int32 []) * int32 * int32) -> US0) = closure4() │
00:01:53 #3498 [Verbose] > │ let v105 : UH1 = UH1_1 │
00:01:53 #3499 [Verbose] > │ let v106 : UH1 = UH1_0(v102, v103, v104, v105) │
00:01:53 #3500 [Verbose] > │ let v107 : UH1 = UH1_0(v99, v100, v101, v106) │
00:01:53 #3501 [Verbose] > │ let v108 : UH1 = UH1_0(v96, v97, v98, v107) │
00:01:53 #3502 [Verbose] > │ let v109 : UH1 = UH1_0(v93, v94, v95, v108) │
00:01:53 #3503 [Verbose] > │ let v110 : (struct (int32 * string * (struct ((int32 []) * int32 * │
00:01:53 #3504 [Verbose] > │ int32) -> US0)) []) = method11(v109) │
00:01:53 #3505 [Verbose] > │ let v111 : uint64 = System.Convert.ToUInt64 v110.Length │
00:01:53 #3506 [Verbose] > │ let v112 : (struct (US0 * int64) []) = Array.zeroCreate<struct (US0 │
00:01:53 #3507 [Verbose] > │ * int64)> (System.Convert.ToInt32(v111)) │
00:01:53 #3508 [Verbose] > │ let v113 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3509 [Verbose] > │ while method6(v111, v113) do │
00:01:53 #3510 [Verbose] > │ let v115 : uint64 = v113.l0 │
00:01:53 #3511 [Verbose] > │ let struct (v116 : int32, v117 : string, v118 : (struct ((int32 │
00:01:53 #3512 [Verbose] > │ []) * int32 * int32) -> US0)) = v110.[int v115] │
00:01:53 #3513 [Verbose] > │ let mutable result = None │
00:01:53 #3514 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #3515 [Verbose] > │ #if !WASM │
00:01:53 #3516 [Verbose] > │ () │
00:01:53 #3517 [Verbose] > │ #else │
00:01:53 #3518 [Verbose] > │ () │
00:01:53 #3519 [Verbose] > │ #endif │
00:01:53 #3520 [Verbose] > │ #else │
00:01:53 #3521 [Verbose] > │ System.GC.Collect () │
00:01:53 #3522 [Verbose] > │ () │
00:01:53 #3523 [Verbose] > │ #endif │
00:01:53 #3524 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #3525 [Verbose] > │ result |> Option.get │
00:01:53 #3526 [Verbose] > │ let v119 : (unit -> System.Diagnostics.Stopwatch) = │
00:01:53 #3527 [Verbose] > │ System.Diagnostics.Stopwatch │
00:01:53 #3528 [Verbose] > │ let v120 : System.Diagnostics.Stopwatch = v119 () │
00:01:53 #3529 [Verbose] > │ v120.Start () │
00:01:53 #3530 [Verbose] > │ let v121 : int64 = v120.ElapsedMilliseconds │
00:01:53 #3531 [Verbose] > │ let v122 : (int32 []) = Array.zeroCreate<int32> (8000001) │
00:01:53 #3532 [Verbose] > │ let v123 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3533 [Verbose] > │ while method14(v123) do │
00:01:53 #3534 [Verbose] > │ let v125 : int32 = v123.l0 │
00:01:53 #3535 [Verbose] > │ v122.[int v125] <- v125 │
00:01:53 #3536 [Verbose] > │ let v126 : int32 = v125 + 1 │
00:01:53 #3537 [Verbose] > │ v123.l0 <- v126 │
00:01:53 #3538 [Verbose] > │ () │
00:01:53 #3539 [Verbose] > │ let v127 : (int32 -> US0) = closure5(v87, v88, v89, v118) │
00:01:53 #3540 [Verbose] > │ let v128 : (US0 []) = v122 |> Array.Parallel.map v127 │
00:01:53 #3541 [Verbose] > │ let v129 : int32 = v128.Length │
00:01:53 #3542 [Verbose] > │ let v130 : int32 = v129 - 1 │
00:01:53 #3543 [Verbose] > │ let v131 : US0 = v128.[int v130] │
00:01:53 #3544 [Verbose] > │ let v132 : int64 = v120.ElapsedMilliseconds │
00:01:53 #3545 [Verbose] > │ let v133 : int64 = v132 - v121 │
00:01:53 #3546 [Verbose] > │ let v134 : string = $"Test case {v116 + 1}. {v117}. Time: {v133} │
00:01:53 #3547 [Verbose] > │ " │
00:01:53 #3548 [Verbose] > │ System.Console.WriteLine v134 │
00:01:53 #3549 [Verbose] > │ v112.[int v115] <- struct (v131, v133) │
00:01:53 #3550 [Verbose] > │ let v135 : uint64 = v115 + 1UL │
00:01:53 #3551 [Verbose] > │ v113.l0 <- v135 │
00:01:53 #3552 [Verbose] > │ () │
00:01:53 #3553 [Verbose] > │ let v136 : uint64 = System.Convert.ToUInt64 v112.Length │
00:01:53 #3554 [Verbose] > │ let v137 : (US0 []) = Array.zeroCreate<US0> │
00:01:53 #3555 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #3556 [Verbose] > │ let v138 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3557 [Verbose] > │ while method6(v136, v138) do │
00:01:53 #3558 [Verbose] > │ let v140 : uint64 = v138.l0 │
00:01:53 #3559 [Verbose] > │ let struct (v141 : US0, v142 : int64) = v112.[int v140] │
00:01:53 #3560 [Verbose] > │ v137.[int v140] <- v141 │
00:01:53 #3561 [Verbose] > │ let v143 : uint64 = v140 + 1UL │
00:01:53 #3562 [Verbose] > │ v138.l0 <- v143 │
00:01:53 #3563 [Verbose] > │ () │
00:01:53 #3564 [Verbose] > │ let v144 : uint64 = System.Convert.ToUInt64 v137.Length │
00:01:53 #3565 [Verbose] > │ let v145 : bool = v144 <= 1UL │
00:01:53 #3566 [Verbose] > │ if v145 then │
00:01:53 #3567 [Verbose] > │ () │
00:01:53 #3568 [Verbose] > │ else │
00:01:53 #3569 [Verbose] > │ let v146 : US0 = v137.[int 0UL] │
00:01:53 #3570 [Verbose] > │ let v147 : uint64 = 0UL │
00:01:53 #3571 [Verbose] > │ let v148 : bool = method15(v146, v137, v147) │
00:01:53 #3572 [Verbose] > │ if v148 then │
00:01:53 #3573 [Verbose] > │ () │
00:01:53 #3574 [Verbose] > │ else │
00:01:53 #3575 [Verbose] > │ let v149 : string = $"Challenge error: {v137}" │
00:01:53 #3576 [Verbose] > │ failwith<unit> v149 │
00:01:53 #3577 [Verbose] > │ let v150 : string = $"%A{v90}" │
00:01:53 #3578 [Verbose] > │ let v151 : (US0 []) = Array.zeroCreate<US0> │
00:01:53 #3579 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #3580 [Verbose] > │ let v152 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3581 [Verbose] > │ while method6(v136, v152) do │
00:01:53 #3582 [Verbose] > │ let v154 : uint64 = v152.l0 │
00:01:53 #3583 [Verbose] > │ let struct (v155 : US0, v156 : int64) = v112.[int v154] │
00:01:53 #3584 [Verbose] > │ v151.[int v154] <- v155 │
00:01:53 #3585 [Verbose] > │ let v157 : uint64 = v154 + 1UL │
00:01:53 #3586 [Verbose] > │ v152.l0 <- v157 │
00:01:53 #3587 [Verbose] > │ () │
00:01:53 #3588 [Verbose] > │ let v158 : US0 = v151.[int 0UL] │
00:01:53 #3589 [Verbose] > │ let v159 : string = $"%A{v158}" │
00:01:53 #3590 [Verbose] > │ let v160 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #3591 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #3592 [Verbose] > │ let v161 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3593 [Verbose] > │ while method6(v136, v161) do │
00:01:53 #3594 [Verbose] > │ let v163 : uint64 = v161.l0 │
00:01:53 #3595 [Verbose] > │ let struct (v164 : US0, v165 : int64) = v112.[int v163] │
00:01:53 #3596 [Verbose] > │ v160.[int v163] <- v165 │
00:01:53 #3597 [Verbose] > │ let v166 : uint64 = v163 + 1UL │
00:01:53 #3598 [Verbose] > │ v161.l0 <- v166 │
00:01:53 #3599 [Verbose] > │ () │
00:01:53 #3600 [Verbose] > │ v83.[int v86] <- struct (v150, v91, v159, v160) │
00:01:53 #3601 [Verbose] > │ let v167 : uint64 = v86 + 1UL │
00:01:53 #3602 [Verbose] > │ v84.l0 <- v167 │
00:01:53 #3603 [Verbose] > │ () │
00:01:53 #3604 [Verbose] > │ let v168 : uint64 = System.Convert.ToUInt64 v83.Length │
00:01:53 #3605 [Verbose] > │ let v169 : (struct (UH2 * US1) []) = Array.zeroCreate<struct (UH2 * │
00:01:53 #3606 [Verbose] > │ US1)> (System.Convert.ToInt32(v168)) │
00:01:53 #3607 [Verbose] > │ let v170 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3608 [Verbose] > │ while method6(v168, v170) do │
00:01:53 #3609 [Verbose] > │ let v172 : uint64 = v170.l0 │
00:01:53 #3610 [Verbose] > │ let struct (v173 : string, v174 : string, v175 : string, v176 : │
00:01:53 #3611 [Verbose] > │ (int64 [])) = v83.[int v172] │
00:01:53 #3612 [Verbose] > │ let v177 : uint64 = System.Convert.ToUInt64 v176.Length │
00:01:53 #3613 [Verbose] > │ let v178 : UH3 = UH3_1 │
00:01:53 #3614 [Verbose] > │ let v179 : Mut2 = {l0 = 0UL; l1 = v178; l2 = 0L} : Mut2 │
00:01:53 #3615 [Verbose] > │ while method16(v177, v179) do │
00:01:53 #3616 [Verbose] > │ let v181 : uint64 = v179.l0 │
00:01:53 #3617 [Verbose] > │ let struct (v182 : UH3, v183 : int64) = v179.l1, v179.l2 │
00:01:53 #3618 [Verbose] > │ let v184 : int64 = v176.[int v181] │
00:01:53 #3619 [Verbose] > │ let v185 : int64 = v183 + 1L │
00:01:53 #3620 [Verbose] > │ let v186 : uint64 = v181 + 1UL │
00:01:53 #3621 [Verbose] > │ let v187 : UH3 = UH3_0(v183, v184, v182) │
00:01:53 #3622 [Verbose] > │ v179.l0 <- v186 │
00:01:53 #3623 [Verbose] > │ v179.l1 <- v187 │
00:01:53 #3624 [Verbose] > │ v179.l2 <- v185 │
00:01:53 #3625 [Verbose] > │ () │
00:01:53 #3626 [Verbose] > │ let struct (v188 : UH3, v189 : int64) = v179.l1, v179.l2 │
00:01:53 #3627 [Verbose] > │ let v190 : UH3 = UH3_1 │
00:01:53 #3628 [Verbose] > │ let v191 : UH3 = method17(v188, v190) │
00:01:53 #3629 [Verbose] > │ let v192 : (struct (int64 * int64) []) = method18(v191) │
00:01:53 #3630 [Verbose] > │ let v193 : int32 = v192.Length │
00:01:53 #3631 [Verbose] > │ let v194 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:01:53 #3632 [Verbose] > │ (int64 * int64)> (v193) │
00:01:53 #3633 [Verbose] > │ let v195 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3634 [Verbose] > │ while method21(v193, v195) do │
00:01:53 #3635 [Verbose] > │ let v197 : int32 = v195.l0 │
00:01:53 #3636 [Verbose] > │ let struct (v198 : int64, v199 : int64) = v192.[int v197] │
00:01:53 #3637 [Verbose] > │ let v200 : int64 = v198 + 1L │
00:01:53 #3638 [Verbose] > │ v194.[int v197] <- struct (v200, v199) │
00:01:53 #3639 [Verbose] > │ let v201 : int32 = v197 + 1 │
00:01:53 #3640 [Verbose] > │ v195.l0 <- v201 │
00:01:53 #3641 [Verbose] > │ () │
00:01:53 #3642 [Verbose] > │ let v202 : (struct (int64 * int64) -> int64) = closure6() │
00:01:53 #3643 [Verbose] > │ let v203 : (struct (int64 * int64) []) = v194 |> Array.sortBy v202 │
00:01:53 #3644 [Verbose] > │ let struct (v204 : int64, v205 : int64) = v203.[int 0] │
00:01:53 #3645 [Verbose] > │ let v206 : string = $"%A{struct (v204, v205)}" │
00:01:53 #3646 [Verbose] > │ let v207 : bool = v173 = v175 │
00:01:53 #3647 [Verbose] > │ let v212 : US1 = │
00:01:53 #3648 [Verbose] > │ if v207 then │
00:01:53 #3649 [Verbose] > │ let v208 : System.ConsoleColor = │
00:01:53 #3650 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:01:53 #3651 [Verbose] > │ US1_1(v208) │
00:01:53 #3652 [Verbose] > │ else │
00:01:53 #3653 [Verbose] > │ let v210 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:01:53 #3654 [Verbose] > │ US1_1(v210) │
00:01:53 #3655 [Verbose] > │ let v213 : UH2 = UH2_1 │
00:01:53 #3656 [Verbose] > │ let v214 : UH2 = UH2_0(v206, v213) │
00:01:53 #3657 [Verbose] > │ let v215 : UH2 = UH2_0(v175, v214) │
00:01:53 #3658 [Verbose] > │ let v216 : UH2 = UH2_0(v173, v215) │
00:01:53 #3659 [Verbose] > │ let v217 : UH2 = UH2_0(v174, v216) │
00:01:53 #3660 [Verbose] > │ v169.[int v172] <- struct (v217, v212) │
00:01:53 #3661 [Verbose] > │ let v218 : uint64 = v172 + 1UL │
00:01:53 #3662 [Verbose] > │ v170.l0 <- v218 │
00:01:53 #3663 [Verbose] > │ () │
00:01:53 #3664 [Verbose] > │ let v219 : string = "Input" │
00:01:53 #3665 [Verbose] > │ let v220 : string = "Expected" │
00:01:53 #3666 [Verbose] > │ let v221 : string = "Result" │
00:01:53 #3667 [Verbose] > │ let v222 : string = "Best" │
00:01:53 #3668 [Verbose] > │ let v223 : UH2 = UH2_1 │
00:01:53 #3669 [Verbose] > │ let v224 : UH2 = UH2_0(v222, v223) │
00:01:53 #3670 [Verbose] > │ let v225 : UH2 = UH2_0(v221, v224) │
00:01:53 #3671 [Verbose] > │ let v226 : UH2 = UH2_0(v220, v225) │
00:01:53 #3672 [Verbose] > │ let v227 : UH2 = UH2_0(v219, v226) │
00:01:53 #3673 [Verbose] > │ let v228 : US1 = US1_0 │
00:01:53 #3674 [Verbose] > │ let v229 : string = "---" │
00:01:53 #3675 [Verbose] > │ let v230 : UH2 = UH2_1 │
00:01:53 #3676 [Verbose] > │ let v231 : UH2 = UH2_0(v229, v230) │
00:01:53 #3677 [Verbose] > │ let v232 : UH2 = UH2_0(v229, v231) │
00:01:53 #3678 [Verbose] > │ let v233 : UH2 = UH2_0(v229, v232) │
00:01:53 #3679 [Verbose] > │ let v234 : UH2 = UH2_0(v229, v233) │
00:01:53 #3680 [Verbose] > │ let v235 : US1 = US1_0 │
00:01:53 #3681 [Verbose] > │ let v236 : UH4 = UH4_1 │
00:01:53 #3682 [Verbose] > │ let v237 : UH4 = UH4_0(v234, v235, v236) │
00:01:53 #3683 [Verbose] > │ let v238 : UH4 = UH4_0(v227, v228, v237) │
00:01:53 #3684 [Verbose] > │ let v239 : (struct (UH2 * US1) []) = method22(v238) │
00:01:53 #3685 [Verbose] > │ let v240 : uint64 = System.Convert.ToUInt64 v239.Length │
00:01:53 #3686 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v169.Length │
00:01:53 #3687 [Verbose] > │ let v242 : uint64 = v240 + v241 │
00:01:53 #3688 [Verbose] > │ let v243 : (struct (UH2 * US1) []) = Array.zeroCreate<struct (UH2 * │
00:01:53 #3689 [Verbose] > │ US1)> (System.Convert.ToInt32(v242)) │
00:01:53 #3690 [Verbose] > │ let v244 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3691 [Verbose] > │ while method6(v242, v244) do │
00:01:53 #3692 [Verbose] > │ let v246 : uint64 = v244.l0 │
00:01:53 #3693 [Verbose] > │ let v247 : bool = v246 < v240 │
00:01:53 #3694 [Verbose] > │ let struct (v253 : UH2, v254 : US1) = │
00:01:53 #3695 [Verbose] > │ if v247 then │
00:01:53 #3696 [Verbose] > │ let struct (v248 : UH2, v249 : US1) = v239.[int v246] │
00:01:53 #3697 [Verbose] > │ struct (v248, v249) │
00:01:53 #3698 [Verbose] > │ else │
00:01:53 #3699 [Verbose] > │ let v250 : uint64 = v246 - v240 │
00:01:53 #3700 [Verbose] > │ let struct (v251 : UH2, v252 : US1) = v169.[int v250] │
00:01:53 #3701 [Verbose] > │ struct (v251, v252) │
00:01:53 #3702 [Verbose] > │ v243.[int v246] <- struct (v253, v254) │
00:01:53 #3703 [Verbose] > │ let v255 : uint64 = v246 + 1UL │
00:01:53 #3704 [Verbose] > │ v244.l0 <- v255 │
00:01:53 #3705 [Verbose] > │ () │
00:01:53 #3706 [Verbose] > │ let v256 : uint64 = System.Convert.ToUInt64 v243.Length │
00:01:53 #3707 [Verbose] > │ let v257 : ((string []) []) = Array.zeroCreate<(string [])> │
00:01:53 #3708 [Verbose] > │ (System.Convert.ToInt32(v256)) │
00:01:53 #3709 [Verbose] > │ let v258 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3710 [Verbose] > │ while method6(v256, v258) do │
00:01:53 #3711 [Verbose] > │ let v260 : uint64 = v258.l0 │
00:01:53 #3712 [Verbose] > │ let struct (v261 : UH2, v262 : US1) = v243.[int v260] │
00:01:53 #3713 [Verbose] > │ let v263 : (string []) = method25(v261) │
00:01:53 #3714 [Verbose] > │ v257.[int v260] <- v263 │
00:01:53 #3715 [Verbose] > │ let v264 : uint64 = v260 + 1UL │
00:01:53 #3716 [Verbose] > │ v258.l0 <- v264 │
00:01:53 #3717 [Verbose] > │ () │
00:01:53 #3718 [Verbose] > │ let v265 : ((string []) []) = v257 |> Array.transpose │
00:01:53 #3719 [Verbose] > │ let v266 : uint64 = System.Convert.ToUInt64 v265.Length │
00:01:53 #3720 [Verbose] > │ let v267 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #3721 [Verbose] > │ (System.Convert.ToInt32(v266)) │
00:01:53 #3722 [Verbose] > │ let v268 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3723 [Verbose] > │ while method6(v266, v268) do │
00:01:53 #3724 [Verbose] > │ let v270 : uint64 = v268.l0 │
00:01:53 #3725 [Verbose] > │ let v271 : (string []) = v265.[int v270] │
00:01:53 #3726 [Verbose] > │ let v272 : uint64 = System.Convert.ToUInt64 v271.Length │
00:01:53 #3727 [Verbose] > │ let v273 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #3728 [Verbose] > │ (System.Convert.ToInt32(v272)) │
00:01:53 #3729 [Verbose] > │ let v274 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3730 [Verbose] > │ while method6(v272, v274) do │
00:01:53 #3731 [Verbose] > │ let v276 : uint64 = v274.l0 │
00:01:53 #3732 [Verbose] > │ let v277 : string = v271.[int v276] │
00:01:53 #3733 [Verbose] > │ let v278 : int64 = System.Convert.ToInt64 v277.Length │
00:01:53 #3734 [Verbose] > │ v273.[int v276] <- v278 │
00:01:53 #3735 [Verbose] > │ let v279 : uint64 = v276 + 1UL │
00:01:53 #3736 [Verbose] > │ v274.l0 <- v279 │
00:01:53 #3737 [Verbose] > │ () │
00:01:53 #3738 [Verbose] > │ let v280 : (int64 []) = v273 |> Array.sortDescending │
00:01:53 #3739 [Verbose] > │ let v281 : int64 option = v280 |> Array.tryItem 0 │
00:01:53 #3740 [Verbose] > │ let v282 : (int64 -> US2) = closure7() │
00:01:53 #3741 [Verbose] > │ let v283 : US2 = US2_0 │
00:01:53 #3742 [Verbose] > │ let v284 : US2 = v281 |> Option.map v282 |> Option.defaultValue v283 │
00:01:53 #3743 [Verbose] > │ let v287 : int64 = │
00:01:53 #3744 [Verbose] > │ match v284 with │
00:01:53 #3745 [Verbose] > │ | US2_0 -> (* None *) │
00:01:53 #3746 [Verbose] > │ 0L │
00:01:53 #3747 [Verbose] > │ | US2_1(v285) -> (* Some *) │
00:01:53 #3748 [Verbose] > │ v285 │
00:01:53 #3749 [Verbose] > │ v267.[int v270] <- v287 │
00:01:53 #3750 [Verbose] > │ let v288 : uint64 = v270 + 1UL │
00:01:53 #3751 [Verbose] > │ v268.l0 <- v288 │
00:01:53 #3752 [Verbose] > │ () │
00:01:53 #3753 [Verbose] > │ let v289 : uint64 = System.Convert.ToUInt64 v267.Length │
00:01:53 #3754 [Verbose] > │ let v290 : UH5 = UH5_1 │
00:01:53 #3755 [Verbose] > │ let v291 : Mut3 = {l0 = 0UL; l1 = v290; l2 = 0} : Mut3 │
00:01:53 #3756 [Verbose] > │ while method28(v289, v291) do │
00:01:53 #3757 [Verbose] > │ let v293 : uint64 = v291.l0 │
00:01:53 #3758 [Verbose] > │ let struct (v294 : UH5, v295 : int32) = v291.l1, v291.l2 │
00:01:53 #3759 [Verbose] > │ let v296 : int64 = v267.[int v293] │
00:01:53 #3760 [Verbose] > │ let v297 : int32 = v295 + 1 │
00:01:53 #3761 [Verbose] > │ let v298 : uint64 = v293 + 1UL │
00:01:53 #3762 [Verbose] > │ let v299 : UH5 = UH5_0(v295, v296, v294) │
00:01:53 #3763 [Verbose] > │ v291.l0 <- v298 │
00:01:53 #3764 [Verbose] > │ v291.l1 <- v299 │
00:01:53 #3765 [Verbose] > │ v291.l2 <- v297 │
00:01:53 #3766 [Verbose] > │ () │
00:01:53 #3767 [Verbose] > │ let struct (v300 : UH5, v301 : int32) = v291.l1, v291.l2 │
00:01:53 #3768 [Verbose] > │ let v302 : UH5 = UH5_1 │
00:01:53 #3769 [Verbose] > │ let v303 : UH5 = method29(v300, v302) │
00:01:53 #3770 [Verbose] > │ let v304 : (struct (int32 * int64) []) = method30(v303) │
00:01:53 #3771 [Verbose] > │ let v305 : Map<int32, int64> = v304 |> Array.map (fun (struct (a, b)) -> │
00:01:53 #3772 [Verbose] > │ a, b) |> Map.ofArray │
00:01:53 #3773 [Verbose] > │ let v306 : (struct ((string []) * US1) []) = Array.zeroCreate<struct │
00:01:53 #3774 [Verbose] > │ ((string []) * US1)> (System.Convert.ToInt32(v256)) │
00:01:53 #3775 [Verbose] > │ let v307 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3776 [Verbose] > │ while method6(v256, v307) do │
00:01:53 #3777 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:01:53 #3778 [Verbose] > │ let struct (v310 : UH2, v311 : US1) = v243.[int v309] │
00:01:53 #3779 [Verbose] > │ let v312 : UH6 = UH6_1 │
00:01:53 #3780 [Verbose] > │ let v313 : int32 = 0 │
00:01:53 #3781 [Verbose] > │ let struct (v314 : UH6, v315 : int32) = method33(v310, v312, v313) │
00:01:53 #3782 [Verbose] > │ let v316 : UH6 = UH6_1 │
00:01:53 #3783 [Verbose] > │ let v317 : UH6 = method34(v314, v316) │
00:01:53 #3784 [Verbose] > │ let v318 : UH2 = UH2_1 │
00:01:53 #3785 [Verbose] > │ let v319 : UH2 = method35(v305, v317, v318) │
00:01:53 #3786 [Verbose] > │ let v320 : (string []) = method36(v319) │
00:01:53 #3787 [Verbose] > │ v306.[int v309] <- struct (v320, v311) │
00:01:53 #3788 [Verbose] > │ let v321 : uint64 = v309 + 1UL │
00:01:53 #3789 [Verbose] > │ v307.l0 <- v321 │
00:01:53 #3790 [Verbose] > │ () │
00:01:53 #3791 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3792 [Verbose] > │ let v322 : uint64 = System.Convert.ToUInt64 v306.Length │
00:01:53 #3793 [Verbose] > │ let v323 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3794 [Verbose] > │ while method6(v322, v323) do │
00:01:53 #3795 [Verbose] > │ let v325 : uint64 = v323.l0 │
00:01:53 #3796 [Verbose] > │ let struct (v326 : (string []), v327 : US1) = v306.[int v325] │
00:01:53 #3797 [Verbose] > │ match v327 with │
00:01:53 #3798 [Verbose] > │ | US1_0 -> (* None *) │
00:01:53 #3799 [Verbose] > │ let mutable result = None │
00:01:53 #3800 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #3801 [Verbose] > │ #if !WASM │
00:01:53 #3802 [Verbose] > │ () │
00:01:53 #3803 [Verbose] > │ #else │
00:01:53 #3804 [Verbose] > │ () │
00:01:53 #3805 [Verbose] > │ #endif │
00:01:53 #3806 [Verbose] > │ #else │
00:01:53 #3807 [Verbose] > │ System.Console.ResetColor () │
00:01:53 #3808 [Verbose] > │ () │
00:01:53 #3809 [Verbose] > │ #endif │
00:01:53 #3810 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #3811 [Verbose] > │ result |> Option.get │
00:01:53 #3812 [Verbose] > │ () │
00:01:53 #3813 [Verbose] > │ | US1_1(v328) -> (* Some *) │
00:01:53 #3814 [Verbose] > │ let mutable result = None │
00:01:53 #3815 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #3816 [Verbose] > │ #if !WASM │
00:01:53 #3817 [Verbose] > │ () │
00:01:53 #3818 [Verbose] > │ #else │
00:01:53 #3819 [Verbose] > │ () │
00:01:53 #3820 [Verbose] > │ #endif │
00:01:53 #3821 [Verbose] > │ #else │
00:01:53 #3822 [Verbose] > │ System.Console.ForegroundColor <- v328 │
00:01:53 #3823 [Verbose] > │ () │
00:01:53 #3824 [Verbose] > │ #endif │
00:01:53 #3825 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #3826 [Verbose] > │ result |> Option.get │
00:01:53 #3827 [Verbose] > │ () │
00:01:53 #3828 [Verbose] > │ let v329 : string = "\t| " │
00:01:53 #3829 [Verbose] > │ let v330 : string = System.String.Join (v329, v326) │
00:01:53 #3830 [Verbose] > │ System.Console.WriteLine v330 │
00:01:53 #3831 [Verbose] > │ let mutable result = None │
00:01:53 #3832 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #3833 [Verbose] > │ #if !WASM │
00:01:53 #3834 [Verbose] > │ () │
00:01:53 #3835 [Verbose] > │ #else │
00:01:53 #3836 [Verbose] > │ () │
00:01:53 #3837 [Verbose] > │ #endif │
00:01:53 #3838 [Verbose] > │ #else │
00:01:53 #3839 [Verbose] > │ System.Console.ResetColor () │
00:01:53 #3840 [Verbose] > │ () │
00:01:53 #3841 [Verbose] > │ #endif │
00:01:53 #3842 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #3843 [Verbose] > │ result |> Option.get │
00:01:53 #3844 [Verbose] > │ let v331 : uint64 = v325 + 1UL │
00:01:53 #3845 [Verbose] > │ v323.l0 <- v331 │
00:01:53 #3846 [Verbose] > │ () │
00:01:53 #3847 [Verbose] > │ let v332 : ((float []) []) = Array.zeroCreate<(float [])> │
00:01:53 #3848 [Verbose] > │ (System.Convert.ToInt32(v168)) │
00:01:53 #3849 [Verbose] > │ let v333 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3850 [Verbose] > │ while method6(v168, v333) do │
00:01:53 #3851 [Verbose] > │ let v335 : uint64 = v333.l0 │
00:01:53 #3852 [Verbose] > │ let struct (v336 : string, v337 : string, v338 : string, v339 : │
00:01:53 #3853 [Verbose] > │ (int64 [])) = v83.[int v335] │
00:01:53 #3854 [Verbose] > │ let v340 : (int64 -> float) = float │
00:01:53 #3855 [Verbose] > │ let v341 : uint64 = System.Convert.ToUInt64 v339.Length │
00:01:53 #3856 [Verbose] > │ let v342 : (float []) = Array.zeroCreate<float> │
00:01:53 #3857 [Verbose] > │ (System.Convert.ToInt32(v341)) │
00:01:53 #3858 [Verbose] > │ let v343 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3859 [Verbose] > │ while method6(v341, v343) do │
00:01:53 #3860 [Verbose] > │ let v345 : uint64 = v343.l0 │
00:01:53 #3861 [Verbose] > │ let v346 : int64 = v339.[int v345] │
00:01:53 #3862 [Verbose] > │ let v347 : float = v340 v346 │
00:01:53 #3863 [Verbose] > │ v342.[int v345] <- v347 │
00:01:53 #3864 [Verbose] > │ let v348 : uint64 = v345 + 1UL │
00:01:53 #3865 [Verbose] > │ v343.l0 <- v348 │
00:01:53 #3866 [Verbose] > │ () │
00:01:53 #3867 [Verbose] > │ v332.[int v335] <- v342 │
00:01:53 #3868 [Verbose] > │ let v349 : uint64 = v335 + 1UL │
00:01:53 #3869 [Verbose] > │ v333.l0 <- v349 │
00:01:53 #3870 [Verbose] > │ () │
00:01:53 #3871 [Verbose] > │ let v350 : ((float []) []) = v332 |> Array.transpose │
00:01:53 #3872 [Verbose] > │ let v351 : uint64 = System.Convert.ToUInt64 v350.Length │
00:01:53 #3873 [Verbose] > │ let v352 : (float []) = Array.zeroCreate<float> │
00:01:53 #3874 [Verbose] > │ (System.Convert.ToInt32(v351)) │
00:01:53 #3875 [Verbose] > │ let v353 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3876 [Verbose] > │ while method6(v351, v353) do │
00:01:53 #3877 [Verbose] > │ let v355 : uint64 = v353.l0 │
00:01:53 #3878 [Verbose] > │ let v356 : (float []) = v350.[int v355] │
00:01:53 #3879 [Verbose] > │ let v357 : float = v356 |> Array.average │
00:01:53 #3880 [Verbose] > │ v352.[int v355] <- v357 │
00:01:53 #3881 [Verbose] > │ let v358 : uint64 = v355 + 1UL │
00:01:53 #3882 [Verbose] > │ v353.l0 <- v358 │
00:01:53 #3883 [Verbose] > │ () │
00:01:53 #3884 [Verbose] > │ let v359 : (float -> int64) = int64 │
00:01:53 #3885 [Verbose] > │ let v360 : uint64 = System.Convert.ToUInt64 v352.Length │
00:01:53 #3886 [Verbose] > │ let v361 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #3887 [Verbose] > │ (System.Convert.ToInt32(v360)) │
00:01:53 #3888 [Verbose] > │ let v362 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3889 [Verbose] > │ while method6(v360, v362) do │
00:01:53 #3890 [Verbose] > │ let v364 : uint64 = v362.l0 │
00:01:53 #3891 [Verbose] > │ let v365 : float = v352.[int v364] │
00:01:53 #3892 [Verbose] > │ let v366 : int64 = v359 v365 │
00:01:53 #3893 [Verbose] > │ v361.[int v364] <- v366 │
00:01:53 #3894 [Verbose] > │ let v367 : uint64 = v364 + 1UL │
00:01:53 #3895 [Verbose] > │ v362.l0 <- v367 │
00:01:53 #3896 [Verbose] > │ () │
00:01:53 #3897 [Verbose] > │ let v368 : uint64 = System.Convert.ToUInt64 v361.Length │
00:01:53 #3898 [Verbose] > │ let v369 : UH5 = UH5_1 │
00:01:53 #3899 [Verbose] > │ let v370 : Mut3 = {l0 = 0UL; l1 = v369; l2 = 0} : Mut3 │
00:01:53 #3900 [Verbose] > │ while method28(v368, v370) do │
00:01:53 #3901 [Verbose] > │ let v372 : uint64 = v370.l0 │
00:01:53 #3902 [Verbose] > │ let struct (v373 : UH5, v374 : int32) = v370.l1, v370.l2 │
00:01:53 #3903 [Verbose] > │ let v375 : int64 = v361.[int v372] │
00:01:53 #3904 [Verbose] > │ let v376 : int32 = v374 + 1 │
00:01:53 #3905 [Verbose] > │ let v377 : uint64 = v372 + 1UL │
00:01:53 #3906 [Verbose] > │ let v378 : UH5 = UH5_0(v374, v375, v373) │
00:01:53 #3907 [Verbose] > │ v370.l0 <- v377 │
00:01:53 #3908 [Verbose] > │ v370.l1 <- v378 │
00:01:53 #3909 [Verbose] > │ v370.l2 <- v376 │
00:01:53 #3910 [Verbose] > │ () │
00:01:53 #3911 [Verbose] > │ let struct (v379 : UH5, v380 : int32) = v370.l1, v370.l2 │
00:01:53 #3912 [Verbose] > │ let v381 : UH5 = UH5_1 │
00:01:53 #3913 [Verbose] > │ let v382 : UH5 = method29(v379, v381) │
00:01:53 #3914 [Verbose] > │ let v383 : (struct (int32 * int64) []) = method39(v382) │
00:01:53 #3915 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3916 [Verbose] > │ let v384 : string = "Average Ranking " │
00:01:53 #3917 [Verbose] > │ System.Console.WriteLine v384 │
00:01:53 #3918 [Verbose] > │ let v385 : (struct (int32 * int64) -> int64) = closure8() │
00:01:53 #3919 [Verbose] > │ let v386 : (struct (int32 * int64) []) = v383 |> Array.sortBy v385 │
00:01:53 #3920 [Verbose] > │ let v387 : uint64 = System.Convert.ToUInt64 v386.Length │
00:01:53 #3921 [Verbose] > │ let v388 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #3922 [Verbose] > │ while method6(v387, v388) do │
00:01:53 #3923 [Verbose] > │ let v390 : uint64 = v388.l0 │
00:01:53 #3924 [Verbose] > │ let struct (v391 : int32, v392 : int64) = v386.[int v390] │
00:01:53 #3925 [Verbose] > │ let v393 : string = $"Test case %d{v391 + 1}. Average Time: %A{v392} │
00:01:53 #3926 [Verbose] > │ " │
00:01:53 #3927 [Verbose] > │ System.Console.WriteLine v393 │
00:01:53 #3928 [Verbose] > │ let v394 : uint64 = v390 + 1UL │
00:01:53 #3929 [Verbose] > │ v388.l0 <- v394 │
00:01:53 #3930 [Verbose] > │ () │
00:01:53 #3931 [Verbose] > │ () │
00:01:53 #3932 [Verbose] > │ and method0 () : unit = │
00:01:53 #3933 [Verbose] > │ let v0 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3934 [Verbose] > │ let v1 : (int32 []) = method1(v0) │
00:01:53 #3935 [Verbose] > │ let v2 : int32 = v1.Length │
00:01:53 #3936 [Verbose] > │ let v3 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3937 [Verbose] > │ let v4 : (int32 []) = method1(v3) │
00:01:53 #3938 [Verbose] > │ let v5 : int32 = v4.Length │
00:01:53 #3939 [Verbose] > │ let v6 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3940 [Verbose] > │ let v7 : (int32 []) = method1(v6) │
00:01:53 #3941 [Verbose] > │ let v8 : int32 = v7.Length │
00:01:53 #3942 [Verbose] > │ let v9 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3943 [Verbose] > │ let v10 : (int32 []) = method1(v9) │
00:01:53 #3944 [Verbose] > │ let v11 : int32 = v10.Length │
00:01:53 #3945 [Verbose] > │ let v12 : (int32 []) = Array.zeroCreate<int32> (100) │
00:01:53 #3946 [Verbose] > │ let v13 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3947 [Verbose] > │ while method2(v13) do │
00:01:53 #3948 [Verbose] > │ let v15 : int32 = v13.l0 │
00:01:53 #3949 [Verbose] > │ let v16 : int32 = 1 + v15 │
00:01:53 #3950 [Verbose] > │ v12.[int v15] <- v16 │
00:01:53 #3951 [Verbose] > │ let v17 : int32 = v15 + 1 │
00:01:53 #3952 [Verbose] > │ v13.l0 <- v17 │
00:01:53 #3953 [Verbose] > │ () │
00:01:53 #3954 [Verbose] > │ let v18 : int32 = v12.Length │
00:01:53 #3955 [Verbose] > │ let v19 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3956 [Verbose] > │ let v20 : (int32 []) = method1(v19) │
00:01:53 #3957 [Verbose] > │ let v21 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3958 [Verbose] > │ let v22 : (int32 []) = method1(v21) │
00:01:53 #3959 [Verbose] > │ let v23 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3960 [Verbose] > │ let v24 : (int32 []) = method1(v23) │
00:01:53 #3961 [Verbose] > │ let v25 : (int32 []) = [|1; 3; 4; 6; 8; 9; 11|] │
00:01:53 #3962 [Verbose] > │ let v26 : (int32 []) = method1(v25) │
00:01:53 #3963 [Verbose] > │ let v27 : (int32 []) = Array.zeroCreate<int32> (100) │
00:01:53 #3964 [Verbose] > │ let v28 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #3965 [Verbose] > │ while method2(v28) do │
00:01:53 #3966 [Verbose] > │ let v30 : int32 = v28.l0 │
00:01:53 #3967 [Verbose] > │ let v31 : int32 = 1 + v30 │
00:01:53 #3968 [Verbose] > │ v27.[int v30] <- v31 │
00:01:53 #3969 [Verbose] > │ let v32 : int32 = v30 + 1 │
00:01:53 #3970 [Verbose] > │ v28.l0 <- v32 │
00:01:53 #3971 [Verbose] > │ () │
00:01:53 #3972 [Verbose] > │ let v33 : (unit -> unit) = closure0() │
00:01:53 #3973 [Verbose] > │ let v34 : string = nameof v33 │
00:01:53 #3974 [Verbose] > │ let v35 : string = "" │
00:01:53 #3975 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3976 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #3977 [Verbose] > │ let v36 : string = $"Test: {v34}" │
00:01:53 #3978 [Verbose] > │ System.Console.WriteLine v36 │
00:01:53 #3979 [Verbose] > │ let v37 : int32 = 6 │
00:01:53 #3980 [Verbose] > │ let v38 : int32 = 3 │
00:01:53 #3981 [Verbose] > │ let v39 : US0 = US0_1(v38) │
00:01:53 #3982 [Verbose] > │ let v40 : int32 = 1 │
00:01:53 #3983 [Verbose] > │ let v41 : int32 = 0 │
00:01:53 #3984 [Verbose] > │ let v42 : US0 = US0_1(v41) │
00:01:53 #3985 [Verbose] > │ let v43 : int32 = 11 │
00:01:53 #3986 [Verbose] > │ let v44 : int32 = 6 │
00:01:53 #3987 [Verbose] > │ let v45 : US0 = US0_1(v44) │
00:01:53 #3988 [Verbose] > │ let v46 : int32 = 12 │
00:01:53 #3989 [Verbose] > │ let v47 : US0 = US0_0 │
00:01:53 #3990 [Verbose] > │ let v48 : int32 = 60 │
00:01:53 #3991 [Verbose] > │ let v49 : int32 = 59 │
00:01:53 #3992 [Verbose] > │ let v50 : US0 = US0_1(v49) │
00:01:53 #3993 [Verbose] > │ let v51 : int32 = 6 │
00:01:53 #3994 [Verbose] > │ let v52 : int32 = 7 │
00:01:53 #3995 [Verbose] > │ let v53 : int32 = 3 │
00:01:53 #3996 [Verbose] > │ let v54 : US0 = US0_1(v53) │
00:01:53 #3997 [Verbose] > │ let v55 : int32 = 1 │
00:01:53 #3998 [Verbose] > │ let v56 : int32 = 7 │
00:01:53 #3999 [Verbose] > │ let v57 : int32 = 0 │
00:01:53 #4000 [Verbose] > │ let v58 : US0 = US0_1(v57) │
00:01:53 #4001 [Verbose] > │ let v59 : int32 = 11 │
00:01:53 #4002 [Verbose] > │ let v60 : int32 = 7 │
00:01:53 #4003 [Verbose] > │ let v61 : int32 = 6 │
00:01:53 #4004 [Verbose] > │ let v62 : US0 = US0_1(v61) │
00:01:53 #4005 [Verbose] > │ let v63 : int32 = 12 │
00:01:53 #4006 [Verbose] > │ let v64 : int32 = 7 │
00:01:53 #4007 [Verbose] > │ let v65 : US0 = US0_0 │
00:01:53 #4008 [Verbose] > │ let v66 : int32 = 60 │
00:01:53 #4009 [Verbose] > │ let v67 : int32 = 100 │
00:01:53 #4010 [Verbose] > │ let v68 : int32 = 59 │
00:01:53 #4011 [Verbose] > │ let v69 : US0 = US0_1(v68) │
00:01:53 #4012 [Verbose] > │ let v70 : UH0 = UH0_1 │
00:01:53 #4013 [Verbose] > │ let v71 : UH0 = UH0_0(v27, v66, v67, v69, v70) │
00:01:53 #4014 [Verbose] > │ let v72 : UH0 = UH0_0(v26, v63, v64, v65, v71) │
00:01:53 #4015 [Verbose] > │ let v73 : UH0 = UH0_0(v24, v59, v60, v62, v72) │
00:01:53 #4016 [Verbose] > │ let v74 : UH0 = UH0_0(v22, v55, v56, v58, v73) │
00:01:53 #4017 [Verbose] > │ let v75 : UH0 = UH0_0(v20, v51, v52, v54, v74) │
00:01:53 #4018 [Verbose] > │ let v76 : UH0 = UH0_0(v12, v48, v18, v50, v75) │
00:01:53 #4019 [Verbose] > │ let v77 : UH0 = UH0_0(v10, v46, v11, v47, v76) │
00:01:53 #4020 [Verbose] > │ let v78 : UH0 = UH0_0(v7, v43, v8, v45, v77) │
00:01:53 #4021 [Verbose] > │ let v79 : UH0 = UH0_0(v4, v40, v5, v42, v78) │
00:01:53 #4022 [Verbose] > │ let v80 : UH0 = UH0_0(v1, v37, v2, v39, v79) │
00:01:53 #4023 [Verbose] > │ let v81 : (struct ((int32 []) * int32 * int32 * US0) []) = method3(v80) │
00:01:53 #4024 [Verbose] > │ let v82 : uint64 = System.Convert.ToUInt64 v81.Length │
00:01:53 #4025 [Verbose] > │ let v83 : (struct (string * string * string * (int64 [])) []) = │
00:01:53 #4026 [Verbose] > │ Array.zeroCreate<struct (string * string * string * (int64 []))> │
00:01:53 #4027 [Verbose] > │ (System.Convert.ToInt32(v82)) │
00:01:53 #4028 [Verbose] > │ let v84 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4029 [Verbose] > │ while method6(v82, v84) do │
00:01:53 #4030 [Verbose] > │ let v86 : uint64 = v84.l0 │
00:01:53 #4031 [Verbose] > │ let struct (v87 : (int32 []), v88 : int32, v89 : int32, v90 : US0) = │
00:01:53 #4032 [Verbose] > │ v81.[int v86] │
00:01:53 #4033 [Verbose] > │ let v91 : string = $"%A{struct (v87, v88, v89)}" │
00:01:53 #4034 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #4035 [Verbose] > │ let v92 : string = $"Solution: {v91} " │
00:01:53 #4036 [Verbose] > │ System.Console.WriteLine v92 │
00:01:53 #4037 [Verbose] > │ let v93 : int32 = 0 │
00:01:53 #4038 [Verbose] > │ let v94 : string = "semi_open_1" │
00:01:53 #4039 [Verbose] > │ let v95 : (struct ((int32 []) * int32 * int32) -> US0) = closure1() │
00:01:53 #4040 [Verbose] > │ let v96 : int32 = 1 │
00:01:53 #4041 [Verbose] > │ let v97 : string = "closed_1" │
00:01:53 #4042 [Verbose] > │ let v98 : (struct ((int32 []) * int32 * int32) -> US0) = closure2() │
00:01:53 #4043 [Verbose] > │ let v99 : int32 = 2 │
00:01:53 #4044 [Verbose] > │ let v100 : string = "semi_open_2" │
00:01:53 #4045 [Verbose] > │ let v101 : (struct ((int32 []) * int32 * int32) -> US0) = closure3() │
00:01:53 #4046 [Verbose] > │ let v102 : int32 = 3 │
00:01:53 #4047 [Verbose] > │ let v103 : string = "closed_2" │
00:01:53 #4048 [Verbose] > │ let v104 : (struct ((int32 []) * int32 * int32) -> US0) = closure4() │
00:01:53 #4049 [Verbose] > │ let v105 : UH1 = UH1_1 │
00:01:53 #4050 [Verbose] > │ let v106 : UH1 = UH1_0(v102, v103, v104, v105) │
00:01:53 #4051 [Verbose] > │ let v107 : UH1 = UH1_0(v99, v100, v101, v106) │
00:01:53 #4052 [Verbose] > │ let v108 : UH1 = UH1_0(v96, v97, v98, v107) │
00:01:53 #4053 [Verbose] > │ let v109 : UH1 = UH1_0(v93, v94, v95, v108) │
00:01:53 #4054 [Verbose] > │ let v110 : (struct (int32 * string * (struct ((int32 []) * int32 * │
00:01:53 #4055 [Verbose] > │ int32) -> US0)) []) = method11(v109) │
00:01:53 #4056 [Verbose] > │ let v111 : uint64 = System.Convert.ToUInt64 v110.Length │
00:01:53 #4057 [Verbose] > │ let v112 : (struct (US0 * int64) []) = Array.zeroCreate<struct (US0 │
00:01:53 #4058 [Verbose] > │ * int64)> (System.Convert.ToInt32(v111)) │
00:01:53 #4059 [Verbose] > │ let v113 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4060 [Verbose] > │ while method6(v111, v113) do │
00:01:53 #4061 [Verbose] > │ let v115 : uint64 = v113.l0 │
00:01:53 #4062 [Verbose] > │ let struct (v116 : int32, v117 : string, v118 : (struct ((int32 │
00:01:53 #4063 [Verbose] > │ []) * int32 * int32) -> US0)) = v110.[int v115] │
00:01:53 #4064 [Verbose] > │ let mutable result = None │
00:01:53 #4065 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #4066 [Verbose] > │ #if !WASM │
00:01:53 #4067 [Verbose] > │ () │
00:01:53 #4068 [Verbose] > │ #else │
00:01:53 #4069 [Verbose] > │ () │
00:01:53 #4070 [Verbose] > │ #endif │
00:01:53 #4071 [Verbose] > │ #else │
00:01:53 #4072 [Verbose] > │ System.GC.Collect () │
00:01:53 #4073 [Verbose] > │ () │
00:01:53 #4074 [Verbose] > │ #endif │
00:01:53 #4075 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #4076 [Verbose] > │ result |> Option.get │
00:01:53 #4077 [Verbose] > │ let v119 : (unit -> System.Diagnostics.Stopwatch) = │
00:01:53 #4078 [Verbose] > │ System.Diagnostics.Stopwatch │
00:01:53 #4079 [Verbose] > │ let v120 : System.Diagnostics.Stopwatch = v119 () │
00:01:53 #4080 [Verbose] > │ v120.Start () │
00:01:53 #4081 [Verbose] > │ let v121 : int64 = v120.ElapsedMilliseconds │
00:01:53 #4082 [Verbose] > │ let v122 : (int32 []) = Array.zeroCreate<int32> (8000001) │
00:01:53 #4083 [Verbose] > │ let v123 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #4084 [Verbose] > │ while method14(v123) do │
00:01:53 #4085 [Verbose] > │ let v125 : int32 = v123.l0 │
00:01:53 #4086 [Verbose] > │ v122.[int v125] <- v125 │
00:01:53 #4087 [Verbose] > │ let v126 : int32 = v125 + 1 │
00:01:53 #4088 [Verbose] > │ v123.l0 <- v126 │
00:01:53 #4089 [Verbose] > │ () │
00:01:53 #4090 [Verbose] > │ let v127 : (int32 -> US0) = closure5(v87, v88, v89, v118) │
00:01:53 #4091 [Verbose] > │ let v128 : (US0 []) = v122 |> Array.Parallel.map v127 │
00:01:53 #4092 [Verbose] > │ let v129 : int32 = v128.Length │
00:01:53 #4093 [Verbose] > │ let v130 : int32 = v129 - 1 │
00:01:53 #4094 [Verbose] > │ let v131 : US0 = v128.[int v130] │
00:01:53 #4095 [Verbose] > │ let v132 : int64 = v120.ElapsedMilliseconds │
00:01:53 #4096 [Verbose] > │ let v133 : int64 = v132 - v121 │
00:01:53 #4097 [Verbose] > │ let v134 : string = $"Test case {v116 + 1}. {v117}. Time: {v133} │
00:01:53 #4098 [Verbose] > │ " │
00:01:53 #4099 [Verbose] > │ System.Console.WriteLine v134 │
00:01:53 #4100 [Verbose] > │ v112.[int v115] <- struct (v131, v133) │
00:01:53 #4101 [Verbose] > │ let v135 : uint64 = v115 + 1UL │
00:01:53 #4102 [Verbose] > │ v113.l0 <- v135 │
00:01:53 #4103 [Verbose] > │ () │
00:01:53 #4104 [Verbose] > │ let v136 : uint64 = System.Convert.ToUInt64 v112.Length │
00:01:53 #4105 [Verbose] > │ let v137 : (US0 []) = Array.zeroCreate<US0> │
00:01:53 #4106 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #4107 [Verbose] > │ let v138 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4108 [Verbose] > │ while method6(v136, v138) do │
00:01:53 #4109 [Verbose] > │ let v140 : uint64 = v138.l0 │
00:01:53 #4110 [Verbose] > │ let struct (v141 : US0, v142 : int64) = v112.[int v140] │
00:01:53 #4111 [Verbose] > │ v137.[int v140] <- v141 │
00:01:53 #4112 [Verbose] > │ let v143 : uint64 = v140 + 1UL │
00:01:53 #4113 [Verbose] > │ v138.l0 <- v143 │
00:01:53 #4114 [Verbose] > │ () │
00:01:53 #4115 [Verbose] > │ let v144 : uint64 = System.Convert.ToUInt64 v137.Length │
00:01:53 #4116 [Verbose] > │ let v145 : bool = v144 <= 1UL │
00:01:53 #4117 [Verbose] > │ if v145 then │
00:01:53 #4118 [Verbose] > │ () │
00:01:53 #4119 [Verbose] > │ else │
00:01:53 #4120 [Verbose] > │ let v146 : US0 = v137.[int 0UL] │
00:01:53 #4121 [Verbose] > │ let v147 : uint64 = 0UL │
00:01:53 #4122 [Verbose] > │ let v148 : bool = method15(v146, v137, v147) │
00:01:53 #4123 [Verbose] > │ if v148 then │
00:01:53 #4124 [Verbose] > │ () │
00:01:53 #4125 [Verbose] > │ else │
00:01:53 #4126 [Verbose] > │ let v149 : string = $"Challenge error: {v137}" │
00:01:53 #4127 [Verbose] > │ failwith<unit> v149 │
00:01:53 #4128 [Verbose] > │ let v150 : string = $"%A{v90}" │
00:01:53 #4129 [Verbose] > │ let v151 : (US0 []) = Array.zeroCreate<US0> │
00:01:53 #4130 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #4131 [Verbose] > │ let v152 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4132 [Verbose] > │ while method6(v136, v152) do │
00:01:53 #4133 [Verbose] > │ let v154 : uint64 = v152.l0 │
00:01:53 #4134 [Verbose] > │ let struct (v155 : US0, v156 : int64) = v112.[int v154] │
00:01:53 #4135 [Verbose] > │ v151.[int v154] <- v155 │
00:01:53 #4136 [Verbose] > │ let v157 : uint64 = v154 + 1UL │
00:01:53 #4137 [Verbose] > │ v152.l0 <- v157 │
00:01:53 #4138 [Verbose] > │ () │
00:01:53 #4139 [Verbose] > │ let v158 : US0 = v151.[int 0UL] │
00:01:53 #4140 [Verbose] > │ let v159 : string = $"%A{v158}" │
00:01:53 #4141 [Verbose] > │ let v160 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #4142 [Verbose] > │ (System.Convert.ToInt32(v136)) │
00:01:53 #4143 [Verbose] > │ let v161 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4144 [Verbose] > │ while method6(v136, v161) do │
00:01:53 #4145 [Verbose] > │ let v163 : uint64 = v161.l0 │
00:01:53 #4146 [Verbose] > │ let struct (v164 : US0, v165 : int64) = v112.[int v163] │
00:01:53 #4147 [Verbose] > │ v160.[int v163] <- v165 │
00:01:53 #4148 [Verbose] > │ let v166 : uint64 = v163 + 1UL │
00:01:53 #4149 [Verbose] > │ v161.l0 <- v166 │
00:01:53 #4150 [Verbose] > │ () │
00:01:53 #4151 [Verbose] > │ v83.[int v86] <- struct (v150, v91, v159, v160) │
00:01:53 #4152 [Verbose] > │ let v167 : uint64 = v86 + 1UL │
00:01:53 #4153 [Verbose] > │ v84.l0 <- v167 │
00:01:53 #4154 [Verbose] > │ () │
00:01:53 #4155 [Verbose] > │ let v168 : uint64 = System.Convert.ToUInt64 v83.Length │
00:01:53 #4156 [Verbose] > │ let v169 : (struct (UH2 * US1) []) = Array.zeroCreate<struct (UH2 * │
00:01:53 #4157 [Verbose] > │ US1)> (System.Convert.ToInt32(v168)) │
00:01:53 #4158 [Verbose] > │ let v170 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4159 [Verbose] > │ while method6(v168, v170) do │
00:01:53 #4160 [Verbose] > │ let v172 : uint64 = v170.l0 │
00:01:53 #4161 [Verbose] > │ let struct (v173 : string, v174 : string, v175 : string, v176 : │
00:01:53 #4162 [Verbose] > │ (int64 [])) = v83.[int v172] │
00:01:53 #4163 [Verbose] > │ let v177 : uint64 = System.Convert.ToUInt64 v176.Length │
00:01:53 #4164 [Verbose] > │ let v178 : UH3 = UH3_1 │
00:01:53 #4165 [Verbose] > │ let v179 : Mut2 = {l0 = 0UL; l1 = v178; l2 = 0L} : Mut2 │
00:01:53 #4166 [Verbose] > │ while method16(v177, v179) do │
00:01:53 #4167 [Verbose] > │ let v181 : uint64 = v179.l0 │
00:01:53 #4168 [Verbose] > │ let struct (v182 : UH3, v183 : int64) = v179.l1, v179.l2 │
00:01:53 #4169 [Verbose] > │ let v184 : int64 = v176.[int v181] │
00:01:53 #4170 [Verbose] > │ let v185 : int64 = v183 + 1L │
00:01:53 #4171 [Verbose] > │ let v186 : uint64 = v181 + 1UL │
00:01:53 #4172 [Verbose] > │ let v187 : UH3 = UH3_0(v183, v184, v182) │
00:01:53 #4173 [Verbose] > │ v179.l0 <- v186 │
00:01:53 #4174 [Verbose] > │ v179.l1 <- v187 │
00:01:53 #4175 [Verbose] > │ v179.l2 <- v185 │
00:01:53 #4176 [Verbose] > │ () │
00:01:53 #4177 [Verbose] > │ let struct (v188 : UH3, v189 : int64) = v179.l1, v179.l2 │
00:01:53 #4178 [Verbose] > │ let v190 : UH3 = UH3_1 │
00:01:53 #4179 [Verbose] > │ let v191 : UH3 = method17(v188, v190) │
00:01:53 #4180 [Verbose] > │ let v192 : (struct (int64 * int64) []) = method18(v191) │
00:01:53 #4181 [Verbose] > │ let v193 : int32 = v192.Length │
00:01:53 #4182 [Verbose] > │ let v194 : (struct (int64 * int64) []) = Array.zeroCreate<struct │
00:01:53 #4183 [Verbose] > │ (int64 * int64)> (v193) │
00:01:53 #4184 [Verbose] > │ let v195 : Mut0 = {l0 = 0} : Mut0 │
00:01:53 #4185 [Verbose] > │ while method21(v193, v195) do │
00:01:53 #4186 [Verbose] > │ let v197 : int32 = v195.l0 │
00:01:53 #4187 [Verbose] > │ let struct (v198 : int64, v199 : int64) = v192.[int v197] │
00:01:53 #4188 [Verbose] > │ let v200 : int64 = v198 + 1L │
00:01:53 #4189 [Verbose] > │ v194.[int v197] <- struct (v200, v199) │
00:01:53 #4190 [Verbose] > │ let v201 : int32 = v197 + 1 │
00:01:53 #4191 [Verbose] > │ v195.l0 <- v201 │
00:01:53 #4192 [Verbose] > │ () │
00:01:53 #4193 [Verbose] > │ let v202 : (struct (int64 * int64) -> int64) = closure6() │
00:01:53 #4194 [Verbose] > │ let v203 : (struct (int64 * int64) []) = v194 |> Array.sortBy v202 │
00:01:53 #4195 [Verbose] > │ let struct (v204 : int64, v205 : int64) = v203.[int 0] │
00:01:53 #4196 [Verbose] > │ let v206 : string = $"%A{struct (v204, v205)}" │
00:01:53 #4197 [Verbose] > │ let v207 : bool = v173 = v175 │
00:01:53 #4198 [Verbose] > │ let v212 : US1 = │
00:01:53 #4199 [Verbose] > │ if v207 then │
00:01:53 #4200 [Verbose] > │ let v208 : System.ConsoleColor = │
00:01:53 #4201 [Verbose] > │ System.ConsoleColor.DarkGreen │
00:01:53 #4202 [Verbose] > │ US1_1(v208) │
00:01:53 #4203 [Verbose] > │ else │
00:01:53 #4204 [Verbose] > │ let v210 : System.ConsoleColor = System.ConsoleColor.DarkRed │
00:01:53 #4205 [Verbose] > │ US1_1(v210) │
00:01:53 #4206 [Verbose] > │ let v213 : UH2 = UH2_1 │
00:01:53 #4207 [Verbose] > │ let v214 : UH2 = UH2_0(v206, v213) │
00:01:53 #4208 [Verbose] > │ let v215 : UH2 = UH2_0(v175, v214) │
00:01:53 #4209 [Verbose] > │ let v216 : UH2 = UH2_0(v173, v215) │
00:01:53 #4210 [Verbose] > │ let v217 : UH2 = UH2_0(v174, v216) │
00:01:53 #4211 [Verbose] > │ v169.[int v172] <- struct (v217, v212) │
00:01:53 #4212 [Verbose] > │ let v218 : uint64 = v172 + 1UL │
00:01:53 #4213 [Verbose] > │ v170.l0 <- v218 │
00:01:53 #4214 [Verbose] > │ () │
00:01:53 #4215 [Verbose] > │ let v219 : string = "Input" │
00:01:53 #4216 [Verbose] > │ let v220 : string = "Expected" │
00:01:53 #4217 [Verbose] > │ let v221 : string = "Result" │
00:01:53 #4218 [Verbose] > │ let v222 : string = "Best" │
00:01:53 #4219 [Verbose] > │ let v223 : UH2 = UH2_1 │
00:01:53 #4220 [Verbose] > │ let v224 : UH2 = UH2_0(v222, v223) │
00:01:53 #4221 [Verbose] > │ let v225 : UH2 = UH2_0(v221, v224) │
00:01:53 #4222 [Verbose] > │ let v226 : UH2 = UH2_0(v220, v225) │
00:01:53 #4223 [Verbose] > │ let v227 : UH2 = UH2_0(v219, v226) │
00:01:53 #4224 [Verbose] > │ let v228 : US1 = US1_0 │
00:01:53 #4225 [Verbose] > │ let v229 : string = "---" │
00:01:53 #4226 [Verbose] > │ let v230 : UH2 = UH2_1 │
00:01:53 #4227 [Verbose] > │ let v231 : UH2 = UH2_0(v229, v230) │
00:01:53 #4228 [Verbose] > │ let v232 : UH2 = UH2_0(v229, v231) │
00:01:53 #4229 [Verbose] > │ let v233 : UH2 = UH2_0(v229, v232) │
00:01:53 #4230 [Verbose] > │ let v234 : UH2 = UH2_0(v229, v233) │
00:01:53 #4231 [Verbose] > │ let v235 : US1 = US1_0 │
00:01:53 #4232 [Verbose] > │ let v236 : UH4 = UH4_1 │
00:01:53 #4233 [Verbose] > │ let v237 : UH4 = UH4_0(v234, v235, v236) │
00:01:53 #4234 [Verbose] > │ let v238 : UH4 = UH4_0(v227, v228, v237) │
00:01:53 #4235 [Verbose] > │ let v239 : (struct (UH2 * US1) []) = method22(v238) │
00:01:53 #4236 [Verbose] > │ let v240 : uint64 = System.Convert.ToUInt64 v239.Length │
00:01:53 #4237 [Verbose] > │ let v241 : uint64 = System.Convert.ToUInt64 v169.Length │
00:01:53 #4238 [Verbose] > │ let v242 : uint64 = v240 + v241 │
00:01:53 #4239 [Verbose] > │ let v243 : (struct (UH2 * US1) []) = Array.zeroCreate<struct (UH2 * │
00:01:53 #4240 [Verbose] > │ US1)> (System.Convert.ToInt32(v242)) │
00:01:53 #4241 [Verbose] > │ let v244 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4242 [Verbose] > │ while method6(v242, v244) do │
00:01:53 #4243 [Verbose] > │ let v246 : uint64 = v244.l0 │
00:01:53 #4244 [Verbose] > │ let v247 : bool = v246 < v240 │
00:01:53 #4245 [Verbose] > │ let struct (v253 : UH2, v254 : US1) = │
00:01:53 #4246 [Verbose] > │ if v247 then │
00:01:53 #4247 [Verbose] > │ let struct (v248 : UH2, v249 : US1) = v239.[int v246] │
00:01:53 #4248 [Verbose] > │ struct (v248, v249) │
00:01:53 #4249 [Verbose] > │ else │
00:01:53 #4250 [Verbose] > │ let v250 : uint64 = v246 - v240 │
00:01:53 #4251 [Verbose] > │ let struct (v251 : UH2, v252 : US1) = v169.[int v250] │
00:01:53 #4252 [Verbose] > │ struct (v251, v252) │
00:01:53 #4253 [Verbose] > │ v243.[int v246] <- struct (v253, v254) │
00:01:53 #4254 [Verbose] > │ let v255 : uint64 = v246 + 1UL │
00:01:53 #4255 [Verbose] > │ v244.l0 <- v255 │
00:01:53 #4256 [Verbose] > │ () │
00:01:53 #4257 [Verbose] > │ let v256 : uint64 = System.Convert.ToUInt64 v243.Length │
00:01:53 #4258 [Verbose] > │ let v257 : ((string []) []) = Array.zeroCreate<(string [])> │
00:01:53 #4259 [Verbose] > │ (System.Convert.ToInt32(v256)) │
00:01:53 #4260 [Verbose] > │ let v258 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4261 [Verbose] > │ while method6(v256, v258) do │
00:01:53 #4262 [Verbose] > │ let v260 : uint64 = v258.l0 │
00:01:53 #4263 [Verbose] > │ let struct (v261 : UH2, v262 : US1) = v243.[int v260] │
00:01:53 #4264 [Verbose] > │ let v263 : (string []) = method25(v261) │
00:01:53 #4265 [Verbose] > │ v257.[int v260] <- v263 │
00:01:53 #4266 [Verbose] > │ let v264 : uint64 = v260 + 1UL │
00:01:53 #4267 [Verbose] > │ v258.l0 <- v264 │
00:01:53 #4268 [Verbose] > │ () │
00:01:53 #4269 [Verbose] > │ let v265 : ((string []) []) = v257 |> Array.transpose │
00:01:53 #4270 [Verbose] > │ let v266 : uint64 = System.Convert.ToUInt64 v265.Length │
00:01:53 #4271 [Verbose] > │ let v267 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #4272 [Verbose] > │ (System.Convert.ToInt32(v266)) │
00:01:53 #4273 [Verbose] > │ let v268 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4274 [Verbose] > │ while method6(v266, v268) do │
00:01:53 #4275 [Verbose] > │ let v270 : uint64 = v268.l0 │
00:01:53 #4276 [Verbose] > │ let v271 : (string []) = v265.[int v270] │
00:01:53 #4277 [Verbose] > │ let v272 : uint64 = System.Convert.ToUInt64 v271.Length │
00:01:53 #4278 [Verbose] > │ let v273 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #4279 [Verbose] > │ (System.Convert.ToInt32(v272)) │
00:01:53 #4280 [Verbose] > │ let v274 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4281 [Verbose] > │ while method6(v272, v274) do │
00:01:53 #4282 [Verbose] > │ let v276 : uint64 = v274.l0 │
00:01:53 #4283 [Verbose] > │ let v277 : string = v271.[int v276] │
00:01:53 #4284 [Verbose] > │ let v278 : int64 = System.Convert.ToInt64 v277.Length │
00:01:53 #4285 [Verbose] > │ v273.[int v276] <- v278 │
00:01:53 #4286 [Verbose] > │ let v279 : uint64 = v276 + 1UL │
00:01:53 #4287 [Verbose] > │ v274.l0 <- v279 │
00:01:53 #4288 [Verbose] > │ () │
00:01:53 #4289 [Verbose] > │ let v280 : (int64 []) = v273 |> Array.sortDescending │
00:01:53 #4290 [Verbose] > │ let v281 : int64 option = v280 |> Array.tryItem 0 │
00:01:53 #4291 [Verbose] > │ let v282 : (int64 -> US2) = closure7() │
00:01:53 #4292 [Verbose] > │ let v283 : US2 = US2_0 │
00:01:53 #4293 [Verbose] > │ let v284 : US2 = v281 |> Option.map v282 |> Option.defaultValue v283 │
00:01:53 #4294 [Verbose] > │ let v287 : int64 = │
00:01:53 #4295 [Verbose] > │ match v284 with │
00:01:53 #4296 [Verbose] > │ | US2_0 -> (* None *) │
00:01:53 #4297 [Verbose] > │ 0L │
00:01:53 #4298 [Verbose] > │ | US2_1(v285) -> (* Some *) │
00:01:53 #4299 [Verbose] > │ v285 │
00:01:53 #4300 [Verbose] > │ v267.[int v270] <- v287 │
00:01:53 #4301 [Verbose] > │ let v288 : uint64 = v270 + 1UL │
00:01:53 #4302 [Verbose] > │ v268.l0 <- v288 │
00:01:53 #4303 [Verbose] > │ () │
00:01:53 #4304 [Verbose] > │ let v289 : uint64 = System.Convert.ToUInt64 v267.Length │
00:01:53 #4305 [Verbose] > │ let v290 : UH5 = UH5_1 │
00:01:53 #4306 [Verbose] > │ let v291 : Mut3 = {l0 = 0UL; l1 = v290; l2 = 0} : Mut3 │
00:01:53 #4307 [Verbose] > │ while method28(v289, v291) do │
00:01:53 #4308 [Verbose] > │ let v293 : uint64 = v291.l0 │
00:01:53 #4309 [Verbose] > │ let struct (v294 : UH5, v295 : int32) = v291.l1, v291.l2 │
00:01:53 #4310 [Verbose] > │ let v296 : int64 = v267.[int v293] │
00:01:53 #4311 [Verbose] > │ let v297 : int32 = v295 + 1 │
00:01:53 #4312 [Verbose] > │ let v298 : uint64 = v293 + 1UL │
00:01:53 #4313 [Verbose] > │ let v299 : UH5 = UH5_0(v295, v296, v294) │
00:01:53 #4314 [Verbose] > │ v291.l0 <- v298 │
00:01:53 #4315 [Verbose] > │ v291.l1 <- v299 │
00:01:53 #4316 [Verbose] > │ v291.l2 <- v297 │
00:01:53 #4317 [Verbose] > │ () │
00:01:53 #4318 [Verbose] > │ let struct (v300 : UH5, v301 : int32) = v291.l1, v291.l2 │
00:01:53 #4319 [Verbose] > │ let v302 : UH5 = UH5_1 │
00:01:53 #4320 [Verbose] > │ let v303 : UH5 = method29(v300, v302) │
00:01:53 #4321 [Verbose] > │ let v304 : (struct (int32 * int64) []) = method30(v303) │
00:01:53 #4322 [Verbose] > │ let v305 : Map<int32, int64> = v304 |> Array.map (fun (struct (a, b)) -> │
00:01:53 #4323 [Verbose] > │ a, b) |> Map.ofArray │
00:01:53 #4324 [Verbose] > │ let v306 : (struct ((string []) * US1) []) = Array.zeroCreate<struct │
00:01:53 #4325 [Verbose] > │ ((string []) * US1)> (System.Convert.ToInt32(v256)) │
00:01:53 #4326 [Verbose] > │ let v307 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4327 [Verbose] > │ while method6(v256, v307) do │
00:01:53 #4328 [Verbose] > │ let v309 : uint64 = v307.l0 │
00:01:53 #4329 [Verbose] > │ let struct (v310 : UH2, v311 : US1) = v243.[int v309] │
00:01:53 #4330 [Verbose] > │ let v312 : UH6 = UH6_1 │
00:01:53 #4331 [Verbose] > │ let v313 : int32 = 0 │
00:01:53 #4332 [Verbose] > │ let struct (v314 : UH6, v315 : int32) = method33(v310, v312, v313) │
00:01:53 #4333 [Verbose] > │ let v316 : UH6 = UH6_1 │
00:01:53 #4334 [Verbose] > │ let v317 : UH6 = method34(v314, v316) │
00:01:53 #4335 [Verbose] > │ let v318 : UH2 = UH2_1 │
00:01:53 #4336 [Verbose] > │ let v319 : UH2 = method35(v305, v317, v318) │
00:01:53 #4337 [Verbose] > │ let v320 : (string []) = method36(v319) │
00:01:53 #4338 [Verbose] > │ v306.[int v309] <- struct (v320, v311) │
00:01:53 #4339 [Verbose] > │ let v321 : uint64 = v309 + 1UL │
00:01:53 #4340 [Verbose] > │ v307.l0 <- v321 │
00:01:53 #4341 [Verbose] > │ () │
00:01:53 #4342 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #4343 [Verbose] > │ let v322 : uint64 = System.Convert.ToUInt64 v306.Length │
00:01:53 #4344 [Verbose] > │ let v323 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4345 [Verbose] > │ while method6(v322, v323) do │
00:01:53 #4346 [Verbose] > │ let v325 : uint64 = v323.l0 │
00:01:53 #4347 [Verbose] > │ let struct (v326 : (string []), v327 : US1) = v306.[int v325] │
00:01:53 #4348 [Verbose] > │ match v327 with │
00:01:53 #4349 [Verbose] > │ | US1_0 -> (* None *) │
00:01:53 #4350 [Verbose] > │ let mutable result = None │
00:01:53 #4351 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #4352 [Verbose] > │ #if !WASM │
00:01:53 #4353 [Verbose] > │ () │
00:01:53 #4354 [Verbose] > │ #else │
00:01:53 #4355 [Verbose] > │ () │
00:01:53 #4356 [Verbose] > │ #endif │
00:01:53 #4357 [Verbose] > │ #else │
00:01:53 #4358 [Verbose] > │ System.Console.ResetColor () │
00:01:53 #4359 [Verbose] > │ () │
00:01:53 #4360 [Verbose] > │ #endif │
00:01:53 #4361 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #4362 [Verbose] > │ result |> Option.get │
00:01:53 #4363 [Verbose] > │ () │
00:01:53 #4364 [Verbose] > │ | US1_1(v328) -> (* Some *) │
00:01:53 #4365 [Verbose] > │ let mutable result = None │
00:01:53 #4366 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #4367 [Verbose] > │ #if !WASM │
00:01:53 #4368 [Verbose] > │ () │
00:01:53 #4369 [Verbose] > │ #else │
00:01:53 #4370 [Verbose] > │ () │
00:01:53 #4371 [Verbose] > │ #endif │
00:01:53 #4372 [Verbose] > │ #else │
00:01:53 #4373 [Verbose] > │ System.Console.ForegroundColor <- v328 │
00:01:53 #4374 [Verbose] > │ () │
00:01:53 #4375 [Verbose] > │ #endif │
00:01:53 #4376 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #4377 [Verbose] > │ result |> Option.get │
00:01:53 #4378 [Verbose] > │ () │
00:01:53 #4379 [Verbose] > │ let v329 : string = "\t| " │
00:01:53 #4380 [Verbose] > │ let v330 : string = System.String.Join (v329, v326) │
00:01:53 #4381 [Verbose] > │ System.Console.WriteLine v330 │
00:01:53 #4382 [Verbose] > │ let mutable result = None │
00:01:53 #4383 [Verbose] > │ #if FABLE_COMPILER_RUST │
00:01:53 #4384 [Verbose] > │ #if !WASM │
00:01:53 #4385 [Verbose] > │ () │
00:01:53 #4386 [Verbose] > │ #else │
00:01:53 #4387 [Verbose] > │ () │
00:01:53 #4388 [Verbose] > │ #endif │
00:01:53 #4389 [Verbose] > │ #else │
00:01:53 #4390 [Verbose] > │ System.Console.ResetColor () │
00:01:53 #4391 [Verbose] > │ () │
00:01:53 #4392 [Verbose] > │ #endif │
00:01:53 #4393 [Verbose] > │ |> fun x -> result <- Some x │
00:01:53 #4394 [Verbose] > │ result |> Option.get │
00:01:53 #4395 [Verbose] > │ let v331 : uint64 = v325 + 1UL │
00:01:53 #4396 [Verbose] > │ v323.l0 <- v331 │
00:01:53 #4397 [Verbose] > │ () │
00:01:53 #4398 [Verbose] > │ let v332 : ((float []) []) = Array.zeroCreate<(float [])> │
00:01:53 #4399 [Verbose] > │ (System.Convert.ToInt32(v168)) │
00:01:53 #4400 [Verbose] > │ let v333 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4401 [Verbose] > │ while method6(v168, v333) do │
00:01:53 #4402 [Verbose] > │ let v335 : uint64 = v333.l0 │
00:01:53 #4403 [Verbose] > │ let struct (v336 : string, v337 : string, v338 : string, v339 : │
00:01:53 #4404 [Verbose] > │ (int64 [])) = v83.[int v335] │
00:01:53 #4405 [Verbose] > │ let v340 : (int64 -> float) = float │
00:01:53 #4406 [Verbose] > │ let v341 : uint64 = System.Convert.ToUInt64 v339.Length │
00:01:53 #4407 [Verbose] > │ let v342 : (float []) = Array.zeroCreate<float> │
00:01:53 #4408 [Verbose] > │ (System.Convert.ToInt32(v341)) │
00:01:53 #4409 [Verbose] > │ let v343 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4410 [Verbose] > │ while method6(v341, v343) do │
00:01:53 #4411 [Verbose] > │ let v345 : uint64 = v343.l0 │
00:01:53 #4412 [Verbose] > │ let v346 : int64 = v339.[int v345] │
00:01:53 #4413 [Verbose] > │ let v347 : float = v340 v346 │
00:01:53 #4414 [Verbose] > │ v342.[int v345] <- v347 │
00:01:53 #4415 [Verbose] > │ let v348 : uint64 = v345 + 1UL │
00:01:53 #4416 [Verbose] > │ v343.l0 <- v348 │
00:01:53 #4417 [Verbose] > │ () │
00:01:53 #4418 [Verbose] > │ v332.[int v335] <- v342 │
00:01:53 #4419 [Verbose] > │ let v349 : uint64 = v335 + 1UL │
00:01:53 #4420 [Verbose] > │ v333.l0 <- v349 │
00:01:53 #4421 [Verbose] > │ () │
00:01:53 #4422 [Verbose] > │ let v350 : ((float []) []) = v332 |> Array.transpose │
00:01:53 #4423 [Verbose] > │ let v351 : uint64 = System.Convert.ToUInt64 v350.Length │
00:01:53 #4424 [Verbose] > │ let v352 : (float []) = Array.zeroCreate<float> │
00:01:53 #4425 [Verbose] > │ (System.Convert.ToInt32(v351)) │
00:01:53 #4426 [Verbose] > │ let v353 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4427 [Verbose] > │ while method6(v351, v353) do │
00:01:53 #4428 [Verbose] > │ let v355 : uint64 = v353.l0 │
00:01:53 #4429 [Verbose] > │ let v356 : (float []) = v350.[int v355] │
00:01:53 #4430 [Verbose] > │ let v357 : float = v356 |> Array.average │
00:01:53 #4431 [Verbose] > │ v352.[int v355] <- v357 │
00:01:53 #4432 [Verbose] > │ let v358 : uint64 = v355 + 1UL │
00:01:53 #4433 [Verbose] > │ v353.l0 <- v358 │
00:01:53 #4434 [Verbose] > │ () │
00:01:53 #4435 [Verbose] > │ let v359 : (float -> int64) = int64 │
00:01:53 #4436 [Verbose] > │ let v360 : uint64 = System.Convert.ToUInt64 v352.Length │
00:01:53 #4437 [Verbose] > │ let v361 : (int64 []) = Array.zeroCreate<int64> │
00:01:53 #4438 [Verbose] > │ (System.Convert.ToInt32(v360)) │
00:01:53 #4439 [Verbose] > │ let v362 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4440 [Verbose] > │ while method6(v360, v362) do │
00:01:53 #4441 [Verbose] > │ let v364 : uint64 = v362.l0 │
00:01:53 #4442 [Verbose] > │ let v365 : float = v352.[int v364] │
00:01:53 #4443 [Verbose] > │ let v366 : int64 = v359 v365 │
00:01:53 #4444 [Verbose] > │ v361.[int v364] <- v366 │
00:01:53 #4445 [Verbose] > │ let v367 : uint64 = v364 + 1UL │
00:01:53 #4446 [Verbose] > │ v362.l0 <- v367 │
00:01:53 #4447 [Verbose] > │ () │
00:01:53 #4448 [Verbose] > │ let v368 : uint64 = System.Convert.ToUInt64 v361.Length │
00:01:53 #4449 [Verbose] > │ let v369 : UH5 = UH5_1 │
00:01:53 #4450 [Verbose] > │ let v370 : Mut3 = {l0 = 0UL; l1 = v369; l2 = 0} : Mut3 │
00:01:53 #4451 [Verbose] > │ while method28(v368, v370) do │
00:01:53 #4452 [Verbose] > │ let v372 : uint64 = v370.l0 │
00:01:53 #4453 [Verbose] > │ let struct (v373 : UH5, v374 : int32) = v370.l1, v370.l2 │
00:01:53 #4454 [Verbose] > │ let v375 : int64 = v361.[int v372] │
00:01:53 #4455 [Verbose] > │ let v376 : int32 = v374 + 1 │
00:01:53 #4456 [Verbose] > │ let v377 : uint64 = v372 + 1UL │
00:01:53 #4457 [Verbose] > │ let v378 : UH5 = UH5_0(v374, v375, v373) │
00:01:53 #4458 [Verbose] > │ v370.l0 <- v377 │
00:01:53 #4459 [Verbose] > │ v370.l1 <- v378 │
00:01:53 #4460 [Verbose] > │ v370.l2 <- v376 │
00:01:53 #4461 [Verbose] > │ () │
00:01:53 #4462 [Verbose] > │ let struct (v379 : UH5, v380 : int32) = v370.l1, v370.l2 │
00:01:53 #4463 [Verbose] > │ let v381 : UH5 = UH5_1 │
00:01:53 #4464 [Verbose] > │ let v382 : UH5 = method29(v379, v381) │
00:01:53 #4465 [Verbose] > │ let v383 : (struct (int32 * int64) []) = method39(v382) │
00:01:53 #4466 [Verbose] > │ System.Console.WriteLine v35 │
00:01:53 #4467 [Verbose] > │ let v384 : string = "Average Ranking " │
00:01:53 #4468 [Verbose] > │ System.Console.WriteLine v384 │
00:01:53 #4469 [Verbose] > │ let v385 : (struct (int32 * int64) -> int64) = closure8() │
00:01:53 #4470 [Verbose] > │ let v386 : (struct (int32 * int64) []) = v383 |> Array.sortBy v385 │
00:01:53 #4471 [Verbose] > │ let v387 : uint64 = System.Convert.ToUInt64 v386.Length │
00:01:53 #4472 [Verbose] > │ let v388 : Mut1 = {l0 = 0UL} : Mut1 │
00:01:53 #4473 [Verbose] > │ while method6(v387, v388) do │
00:01:53 #4474 [Verbose] > │ let v390 : uint64 = v388.l0 │
00:01:53 #4475 [Verbose] > │ let struct (v391 : int32, v392 : int64) = v386.[int v390] │
00:01:53 #4476 [Verbose] > │ let v393 : string = $"Test case %d{v391 + 1}. Average Time: %A{v392} │
00:01:53 #4477 [Verbose] > │ " │
00:01:53 #4478 [Verbose] > │ System.Console.WriteLine v393 │
00:01:53 #4479 [Verbose] > │ let v394 : uint64 = v390 + 1UL │
00:01:53 #4480 [Verbose] > │ v388.l0 <- v394 │
00:01:53 #4481 [Verbose] > │ () │
00:01:53 #4482 [Verbose] > │ () │
00:01:53 #4483 [Verbose] > │ method0() │
00:01:53 #4484 [Verbose] > │ │
00:01:53 #4485 [Verbose] > │ │
00:01:53 #4486 [Verbose] > │ │
00:01:53 #4487 [Verbose] > │ Test: v33 │
00:01:53 #4488 [Verbose] > │ │
00:01:53 #4489 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:53 #4490 [Verbose] > │ Test case 1. semi_open_1. Time: 829 │
00:01:53 #4491 [Verbose] > │ Test case 2. closed_1. Time: 656 │
00:01:53 #4492 [Verbose] > │ Test case 3. semi_open_2. Time: 682 │
00:01:53 #4493 [Verbose] > │ Test case 4. closed_2. Time: 716 │
00:01:53 #4494 [Verbose] > │ │
00:01:53 #4495 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:53 #4496 [Verbose] > │ Test case 1. semi_open_1. Time: 543 │
00:01:53 #4497 [Verbose] > │ Test case 2. closed_1. Time: 769 │
00:01:53 #4498 [Verbose] > │ Test case 3. semi_open_2. Time: 533 │
00:01:53 #4499 [Verbose] > │ Test case 4. closed_2. Time: 636 │
00:01:53 #4500 [Verbose] > │ │
00:01:53 #4501 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:53 #4502 [Verbose] > │ Test case 1. semi_open_1. Time: 593 │
00:01:53 #4503 [Verbose] > │ Test case 2. closed_1. Time: 591 │
00:01:53 #4504 [Verbose] > │ Test case 3. semi_open_2. Time: 565 │
00:01:53 #4505 [Verbose] > │ Test case 4. closed_2. Time: 543 │
00:01:53 #4506 [Verbose] > │ │
00:01:53 #4507 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:53 #4508 [Verbose] > │ Test case 1. semi_open_1. Time: 628 │
00:01:53 #4509 [Verbose] > │ Test case 2. closed_1. Time: 556 │
00:01:53 #4510 [Verbose] > │ Test case 3. semi_open_2. Time: 676 │
00:01:53 #4511 [Verbose] > │ Test case 4. closed_2. Time: 625 │
00:01:53 #4512 [Verbose] > │ │
00:01:53 #4513 [Verbose] > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:01:53 #4514 [Verbose] > │ 17; 18; 19; 20; │
00:01:53 #4515 [Verbose] > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:53 #4516 [Verbose] > │ 37; 38; │
00:01:53 #4517 [Verbose] > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:53 #4518 [Verbose] > │ 55; 56; │
00:01:53 #4519 [Verbose] > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:53 #4520 [Verbose] > │ 73; 74; │
00:01:53 #4521 [Verbose] > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:53 #4522 [Verbose] > │ 91; 92; │
00:01:53 #4523 [Verbose] > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:01:53 #4524 [Verbose] > │ Test case 1. semi_open_1. Time: 633 │
00:01:53 #4525 [Verbose] > │ Test case 2. closed_1. Time: 630 │
00:01:53 #4526 [Verbose] > │ Test case 3. semi_open_2. Time: 622 │
00:01:53 #4527 [Verbose] > │ Test case 4. closed_2. Time: 556 │
00:01:53 #4528 [Verbose] > │ │
00:01:53 #4529 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:53 #4530 [Verbose] > │ Test case 1. semi_open_1. Time: 606 │
00:01:53 #4531 [Verbose] > │ Test case 2. closed_1. Time: 636 │
00:01:53 #4532 [Verbose] > │ Test case 3. semi_open_2. Time: 529 │
00:01:53 #4533 [Verbose] > │ Test case 4. closed_2. Time: 586 │
00:01:53 #4534 [Verbose] > │ │
00:01:53 #4535 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:53 #4536 [Verbose] > │ Test case 1. semi_open_1. Time: 556 │
00:01:53 #4537 [Verbose] > │ Test case 2. closed_1. Time: 567 │
00:01:53 #4538 [Verbose] > │ Test case 3. semi_open_2. Time: 580 │
00:01:53 #4539 [Verbose] > │ Test case 4. closed_2. Time: 525 │
00:01:53 #4540 [Verbose] > │ │
00:01:53 #4541 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:53 #4542 [Verbose] > │ Test case 1. semi_open_1. Time: 584 │
00:01:53 #4543 [Verbose] > │ Test case 2. closed_1. Time: 809 │
00:01:53 #4544 [Verbose] > │ Test case 3. semi_open_2. Time: 543 │
00:01:53 #4545 [Verbose] > │ Test case 4. closed_2. Time: 550 │
00:01:53 #4546 [Verbose] > │ │
00:01:53 #4547 [Verbose] > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:53 #4548 [Verbose] > │ Test case 1. semi_open_1. Time: 632 │
00:01:53 #4549 [Verbose] > │ Test case 2. closed_1. Time: 620 │
00:01:53 #4550 [Verbose] > │ Test case 3. semi_open_2. Time: 575 │
00:01:53 #4551 [Verbose] > │ Test case 4. closed_2. Time: 576 │
00:01:53 #4552 [Verbose] > │ │
00:01:53 #4553 [Verbose] > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:01:53 #4554 [Verbose] > │ 17; 18; 19; 20; │
00:01:53 #4555 [Verbose] > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:53 #4556 [Verbose] > │ 37; 38; │
00:01:53 #4557 [Verbose] > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:53 #4558 [Verbose] > │ 55; 56; │
00:01:53 #4559 [Verbose] > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:53 #4560 [Verbose] > │ 73; 74; │
00:01:53 #4561 [Verbose] > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:53 #4562 [Verbose] > │ 91; 92; │
00:01:53 #4563 [Verbose] > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:01:53 #4564 [Verbose] > │ Test case 1. semi_open_1. Time: 578 │
00:01:53 #4565 [Verbose] > │ Test case 2. closed_1. Time: 628 │
00:01:53 #4566 [Verbose] > │ Test case 3. semi_open_2. Time: 698 │
00:01:53 #4567 [Verbose] > │ Test case 4. closed_2. Time: 715 │
00:01:53 #4568 [Verbose] > │ │
00:01:53 #4569 [Verbose] > │ Input │
00:01:53 #4570 [Verbose] > │ │
00:01:53 #4571 [Verbose] > │ │
00:01:53 #4572 [Verbose] > │ │
00:01:53 #4573 [Verbose] > │ | Expected | Result | Best │
00:01:53 #4574 [Verbose] > │ --- │
00:01:53 #4575 [Verbose] > │ │
00:01:53 #4576 [Verbose] > │ │
00:01:53 #4577 [Verbose] > │ │
00:01:53 #4578 [Verbose] > │ | --- | --- | --- │
00:01:53 #4579 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:53 #4580 [Verbose] > │ │
00:01:53 #4581 [Verbose] > │ │
00:01:53 #4582 [Verbose] > │ │
00:01:53 #4583 [Verbose] > │ | US0_1 3 | US0_1 3 | struct (2L, 656L) │
00:01:53 #4584 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:53 #4585 [Verbose] > │ │
00:01:53 #4586 [Verbose] > │ │
00:01:53 #4587 [Verbose] > │ │
00:01:53 #4588 [Verbose] > │ | US0_1 0 | US0_1 0 | struct (3L, 533L) │
00:01:53 #4589 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:53 #4590 [Verbose] > │ │
00:01:53 #4591 [Verbose] > │ │
00:01:53 #4592 [Verbose] > │ │
00:01:53 #4593 [Verbose] > │ | US0_1 6 | US0_1 6 | struct (4L, 543L) │
00:01:53 #4594 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:53 #4595 [Verbose] > │ │
00:01:53 #4596 [Verbose] > │ │
00:01:53 #4597 [Verbose] > │ │
00:01:53 #4598 [Verbose] > │ | US0_0 | US0_0 | struct (2L, 556L) │
00:01:53 #4599 [Verbose] > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:01:53 #4600 [Verbose] > │ 20; │
00:01:53 #4601 [Verbose] > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:53 #4602 [Verbose] > │ 37; 38; │
00:01:53 #4603 [Verbose] > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:53 #4604 [Verbose] > │ 55; 56; │
00:01:53 #4605 [Verbose] > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:53 #4606 [Verbose] > │ 73; 74; │
00:01:53 #4607 [Verbose] > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:53 #4608 [Verbose] > │ 91; 92; │
00:01:53 #4609 [Verbose] > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_1 59 | US0_1 59 | │
00:01:53 #4610 [Verbose] > │ struct (4L, 556L) │
00:01:53 #4611 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:53 #4612 [Verbose] > │ │
00:01:53 #4613 [Verbose] > │ │
00:01:53 #4614 [Verbose] > │ │
00:01:53 #4615 [Verbose] > │ | US0_1 3 | US0_1 3 | struct (3L, 529L) │
00:01:53 #4616 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:53 #4617 [Verbose] > │ │
00:01:53 #4618 [Verbose] > │ │
00:01:53 #4619 [Verbose] > │ │
00:01:53 #4620 [Verbose] > │ | US0_1 0 | US0_1 0 | struct (4L, 525L) │
00:01:53 #4621 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:53 #4622 [Verbose] > │ │
00:01:53 #4623 [Verbose] > │ │
00:01:53 #4624 [Verbose] > │ │
00:01:53 #4625 [Verbose] > │ | US0_1 6 | US0_1 6 | struct (3L, 543L) │
00:01:53 #4626 [Verbose] > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:53 #4627 [Verbose] > │ │
00:01:53 #4628 [Verbose] > │ │
00:01:53 #4629 [Verbose] > │ │
00:01:53 #4630 [Verbose] > │ | US0_0 | US0_0 | struct (3L, 575L) │
00:01:53 #4631 [Verbose] > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:01:53 #4632 [Verbose] > │ 20; │
00:01:53 #4633 [Verbose] > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:53 #4634 [Verbose] > │ 37; 38; │
00:01:53 #4635 [Verbose] > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:53 #4636 [Verbose] > │ 55; 56; │
00:01:53 #4637 [Verbose] > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:53 #4638 [Verbose] > │ 73; 74; │
00:01:53 #4639 [Verbose] > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:53 #4640 [Verbose] > │ 91; 92; │
00:01:53 #4641 [Verbose] > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_1 59 | US0_1 59 | │
00:01:53 #4642 [Verbose] > │ struct (1L, 578L) │
00:01:53 #4643 [Verbose] > │ │
00:01:53 #4644 [Verbose] > │ Average Ranking │
00:01:53 #4645 [Verbose] > │ Test case 3. Average Time: 600L │
00:01:53 #4646 [Verbose] > │ Test case 4. Average Time: 602L │
00:01:53 #4647 [Verbose] > │ Test case 1. Average Time: 618L │
00:01:53 #4648 [Verbose] > │ Test case 2. Average Time: 646L │
00:01:53 #4649 [Verbose] > │ │
00:01:53 #4650 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:53 #4651 [Verbose] >
00:01:53 #4652 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:53 #4653 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:53 #4654 [Verbose] > │ ## returnLettersWithOddCountTests │
00:01:53 #4655 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:53 #4656 [Verbose] >
00:01:54 #4657 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:54 #4658 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:54 #4659 [Verbose] > │ Test: ReturnLettersWithOddCount │
00:01:54 #4660 [Verbose] > │ │
00:01:54 #4661 [Verbose] > │ Solution: 1 │
00:01:54 #4662 [Verbose] > │ Test case 1. A. Time: 645L │
00:01:54 #4663 [Verbose] > │ │
00:01:54 #4664 [Verbose] > │ Solution: 2 │
00:01:54 #4665 [Verbose] > │ Test case 1. A. Time: 663L │
00:01:54 #4666 [Verbose] > │ │
00:01:54 #4667 [Verbose] > │ Solution: 3 │
00:01:54 #4668 [Verbose] > │ Test case 1. A. Time: 680L │
00:01:54 #4669 [Verbose] > │ │
00:01:54 #4670 [Verbose] > │ Solution: 9 │
00:01:54 #4671 [Verbose] > │ Test case 1. A. Time: 730L │
00:01:54 #4672 [Verbose] > │ │
00:01:54 #4673 [Verbose] > │ Solution: 10 │
00:01:54 #4674 [Verbose] > │ Test case 1. A. Time: 815L │
00:01:54 #4675 [Verbose] > │ │
00:01:54 #4676 [Verbose] > │ Input | Expected | Result | Best │
00:01:54 #4677 [Verbose] > │ --- | --- | --- | --- │
00:01:54 #4678 [Verbose] > │ 1 | a | a | (1, 645) │
00:01:54 #4679 [Verbose] > │ 2 | ba | ba | (1, 663) │
00:01:54 #4680 [Verbose] > │ 3 | aaa | aaa | (1, 680) │
00:01:54 #4681 [Verbose] > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │
00:01:54 #4682 [Verbose] > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │
00:01:54 #4683 [Verbose] > │ │
00:01:54 #4684 [Verbose] > │ Averages │
00:01:54 #4685 [Verbose] > │ Test case 1. Average Time: 706L │
00:01:54 #4686 [Verbose] > │ │
00:01:54 #4687 [Verbose] > │ Ranking │
00:01:54 #4688 [Verbose] > │ Test case 1. Average Time: 706L │
00:01:54 #4689 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:54 #4690 [Verbose] >
00:01:54 #4691 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:54 #4692 [Verbose] > //// test
00:01:54 #4693 [Verbose] >
00:01:54 #4694 [Verbose] > let solutions = [[
00:01:54 #4695 [Verbose] > "A",
00:01:54 #4696 [Verbose] > fun n ->
00:01:54 #4697 [Verbose] > let mutable _builder = StringBuilder (new string('a', n))
00:01:54 #4698 [Verbose] > if n % 2 = 0 then
00:01:54 #4699 [Verbose] > _builder.[[0]] <- 'b'
00:01:54 #4700 [Verbose] >
00:01:54 #4701 [Verbose] > _builder.ToString ()
00:01:54 #4702 [Verbose] > ]]
00:01:54 #4703 [Verbose] > let testCases = seq {
00:01:54 #4704 [Verbose] > 1, "a"
00:01:54 #4705 [Verbose] > 2, "ba"
00:01:54 #4706 [Verbose] > 3, "aaa"
00:01:54 #4707 [Verbose] > 9, "aaaaaaaaa"
00:01:54 #4708 [Verbose] > 10, "baaaaaaaaa"
00:01:54 #4709 [Verbose] > }
00:01:54 #4710 [Verbose] > let rec returnLettersWithOddCountTests =
00:01:54 #4711 [Verbose] > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases
00:01:54 #4712 [Verbose] > returnLettersWithOddCountTests
00:01:54 #4713 [Verbose] > |> sortResultList
00:01:54 #4714 [Verbose] >
00:01:54 #4715 [Verbose] > ╭─[ 891.62ms - stdout ]────────────────────────────────────────────────────────╮
00:01:54 #4716 [Verbose] > │ │
00:01:54 #4717 [Verbose] > │ │
00:01:54 #4718 [Verbose] > │ Test: returnLettersWithOddCountTests │
00:01:54 #4719 [Verbose] > │ │
00:01:54 #4720 [Verbose] > │ Solution: 1 │
00:01:54 #4721 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:54 #4722 [Verbose] > │ │
00:01:54 #4723 [Verbose] > │ Solution: 2 │
00:01:54 #4724 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:54 #4725 [Verbose] > │ │
00:01:54 #4726 [Verbose] > │ Solution: 3 │
00:01:54 #4727 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:54 #4728 [Verbose] > │ │
00:01:54 #4729 [Verbose] > │ Solution: 9 │
00:01:54 #4730 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:54 #4731 [Verbose] > │ │
00:01:54 #4732 [Verbose] > │ Solution: 10 │
00:01:54 #4733 [Verbose] > │ Test case 1. A. Time: 2L │
00:01:54 #4734 [Verbose] > │ │
00:01:54 #4735 [Verbose] > │ Input | Expected | Result | Best │
00:01:54 #4736 [Verbose] > │ --- | --- | --- | --- │
00:01:54 #4737 [Verbose] > │ 1 | a | a | (1, 0) │
00:01:54 #4738 [Verbose] > │ 2 | ba | ba | (1, 0) │
00:01:54 #4739 [Verbose] > │ 3 | aaa | aaa | (1, 0) │
00:01:54 #4740 [Verbose] > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │
00:01:54 #4741 [Verbose] > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 2) │
00:01:54 #4742 [Verbose] > │ │
00:01:54 #4743 [Verbose] > │ Average Ranking │
00:01:54 #4744 [Verbose] > │ Test case 1. Average Time: 0L │
00:01:54 #4745 [Verbose] > │ │
00:01:54 #4746 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:54 #4747 [Verbose] >
00:01:54 #4748 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:54 #4749 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:54 #4750 [Verbose] > │ ## hasAnyPairCloseToEachotherTests │
00:01:54 #4751 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:54 #4752 [Verbose] >
00:01:54 #4753 [Verbose] > ── markdown ────────────────────────────────────────────────────────────────────
00:01:54 #4754 [Verbose] > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:54 #4755 [Verbose] > │ Test: HasAnyPairCloseToEachother │
00:01:54 #4756 [Verbose] > │ │
00:01:54 #4757 [Verbose] > │ Solution: 0 │
00:01:54 #4758 [Verbose] > │ Test case 1. A. Time: 137L │
00:01:54 #4759 [Verbose] > │ │
00:01:54 #4760 [Verbose] > │ Solution: 1,2 │
00:01:54 #4761 [Verbose] > │ Test case 1. A. Time: 186L │
00:01:54 #4762 [Verbose] > │ │
00:01:54 #4763 [Verbose] > │ Solution: 3,5 │
00:01:54 #4764 [Verbose] > │ Test case 1. A. Time: 206L │
00:01:54 #4765 [Verbose] > │ │
00:01:54 #4766 [Verbose] > │ Solution: 3,4,6 │
00:01:54 #4767 [Verbose] > │ Test case 1. A. Time: 149L │
00:01:54 #4768 [Verbose] > │ │
00:01:54 #4769 [Verbose] > │ Solution: 2,4,6 │
00:01:54 #4770 [Verbose] > │ Test case 1. A. Time: 150L │
00:01:54 #4771 [Verbose] > │ │
00:01:54 #4772 [Verbose] > │ Input | Expected | Result | Best │
00:01:54 #4773 [Verbose] > │ --- | --- | --- | --- │
00:01:54 #4774 [Verbose] > │ 0 | False | False | (1, 137) │
00:01:54 #4775 [Verbose] > │ 1,2 | True | True | (1, 186) │
00:01:54 #4776 [Verbose] > │ 3,5 | False | False | (1, 206) │
00:01:54 #4777 [Verbose] > │ 3,4,6 | True | True | (1, 149) │
00:01:54 #4778 [Verbose] > │ 2,4,6 | False | False | (1, 150) │
00:01:54 #4779 [Verbose] > │ │
00:01:54 #4780 [Verbose] > │ Averages │
00:01:54 #4781 [Verbose] > │ Test case 1. Average Time: 165L │
00:01:54 #4782 [Verbose] > │ │
00:01:54 #4783 [Verbose] > │ Ranking │
00:01:54 #4784 [Verbose] > │ Test case 1. Average Time: 165L │
00:01:54 #4785 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:54 #4786 [Verbose] >
00:01:54 #4787 [Verbose] > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:54 #4788 [Verbose] > //// test
00:01:54 #4789 [Verbose] >
00:01:54 #4790 [Verbose] > let solutions = [[
00:01:54 #4791 [Verbose] > "A",
00:01:54 #4792 [Verbose] > fun (a: int[[]]) ->
00:01:54 #4793 [Verbose] > let indices = System.Linq.Enumerable.Range(0, a.Length) |>
00:01:54 #4794 [Verbose] > System.Linq.Enumerable.ToArray
00:01:54 #4795 [Verbose] > System.Array.Sort (a, indices)
00:01:54 #4796 [Verbose] >
00:01:54 #4797 [Verbose] > indices
00:01:54 #4798 [Verbose] > |> Array.take (a.Length - 1)
00:01:54 #4799 [Verbose] > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1)
00:01:54 #4800 [Verbose] > ]]
00:01:54 #4801 [Verbose] > let testCases = seq {
00:01:54 #4802 [Verbose] > [[| 0 |]], false
00:01:54 #4803 [Verbose] > [[| 1; 2 |]], true
00:01:54 #4804 [Verbose] > [[| 3; 5 |]], false
00:01:54 #4805 [Verbose] > [[| 3; 4; 6 |]], true
00:01:54 #4806 [Verbose] > [[| 2; 4; 6 |]], false
00:01:54 #4807 [Verbose] > }
00:01:54 #4808 [Verbose] > let rec hasAnyPairCloseToEachotherTests =
00:01:54 #4809 [Verbose] > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases
00:01:54 #4810 [Verbose] > hasAnyPairCloseToEachotherTests
00:01:54 #4811 [Verbose] > |> sortResultList
00:01:55 #4812 [Verbose] >
00:01:55 #4813 [Verbose] > ╭─[ 869.90ms - stdout ]────────────────────────────────────────────────────────╮
00:01:55 #4814 [Verbose] > │ │
00:01:55 #4815 [Verbose] > │ │
00:01:55 #4816 [Verbose] > │ Test: hasAnyPairCloseToEachotherTests │
00:01:55 #4817 [Verbose] > │ │
00:01:55 #4818 [Verbose] > │ Solution: 0 │
00:01:55 #4819 [Verbose] > │ Test case 1. A. Time: 3L │
00:01:55 #4820 [Verbose] > │ │
00:01:55 #4821 [Verbose] > │ Solution: 1,2 │
00:01:55 #4822 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:55 #4823 [Verbose] > │ │
00:01:55 #4824 [Verbose] > │ Solution: 3,5 │
00:01:55 #4825 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:55 #4826 [Verbose] > │ │
00:01:55 #4827 [Verbose] > │ Solution: 3,4,6 │
00:01:55 #4828 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:55 #4829 [Verbose] > │ │
00:01:55 #4830 [Verbose] > │ Solution: 2,4,6 │
00:01:55 #4831 [Verbose] > │ Test case 1. A. Time: 0L │
00:01:55 #4832 [Verbose] > │ │
00:01:55 #4833 [Verbose] > │ Input | Expected | Result | Best │
00:01:55 #4834 [Verbose] > │ --- | --- | --- | --- │
00:01:55 #4835 [Verbose] > │ 0 | False | False | (1, 3) │
00:01:55 #4836 [Verbose] > │ 1,2 | True | True | (1, 0) │
00:01:55 #4837 [Verbose] > │ 3,5 | False | False | (1, 0) │
00:01:55 #4838 [Verbose] > │ 3,4,6 | True | True | (1, 0) │
00:01:55 #4839 [Verbose] > │ 2,4,6 | False | False | (1, 0) │
00:01:55 #4840 [Verbose] > │ │
00:01:55 #4841 [Verbose] > │ Average Ranking │
00:01:55 #4842 [Verbose] > │ Test case 1. Average Time: 0L │
00:01:55 #4843 [Verbose] > │ │
00:01:55 #4844 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:55 #4845 [Verbose] >
00:01:55 #4846 [Verbose] > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:55 #4847 [Verbose] > // // test
00:01:55 #4848 [Verbose] >
00:01:55 #4849 [Verbose] > ()
00:01:56 #4850 [Verbose] >
00:01:56 #4851 [Verbose] > ╭─[ 190.75ms - stdout ]────────────────────────────────────────────────────────╮
00:01:56 #4852 [Verbose] > │ let rec method0 () : unit = │
00:01:56 #4853 [Verbose] > │ () │
00:01:56 #4854 [Verbose] > │ method0() │
00:01:56 #4855 [Verbose] > │ │
00:01:56 #4856 [Verbose] > │ │
00:01:56 #4857 [Verbose] > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:58 #4858 [Verbose] > [NbConvertApp] Converting notebook Perf.dib.ipynb to html
00:01:58 #4859 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:01:58 #4860 [Verbose] > validate(nb)
00:01:59 #4861 [Verbose] > C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:01:59 #4862 [Verbose] > return _pygments_highlight(
00:02:00 #4863 [Verbose] > [NbConvertApp] Writing 556030 bytes to Perf.dib.html
00:02:02 #4864 [Debug] executeAsync / exitCode: 0 / output.Length: 344418
00:02:02 #4865 [Debug] main / executeCommand / exitCode: 0
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: Perf.dib
00:00:00 #2 [Debug] parseDibCode / output: Fs / file: Perf.dib
In [ ]:
{ . "$ScriptDir/../apps/dir-tree-html/build.ps1" } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # DirTreeHtml (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.1.0/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assert_eq log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assert_eq expected actual = __assert_eq true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/system.commandline/2.0.0-beta4.22272.1/li
b/net6.0/System.CommandLine.dll"
#r
@"../../../../../../../.nuget/packages/falco.markup/1.0.2/lib/netstandard2.0/Fal
co.Markup.dll"
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Networking.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
module String =
let inline contains (value : string) (input : string) =
input.Contains value
let inline endsWith (value : string) (input : string) =
input.EndsWith value
let inline padLeft totalWidth paddingChar (input : string) =
input.PadLeft (totalWidth, paddingChar)
let inline replace (oldValue : string) (newValue : string) (input :
string) =
input.Replace (oldValue, newValue)
let inline split separator (input : string) =
input.Split separator
let inline spli...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun (...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Networking =
open Common
/// ## testPortOpen
let inline testPortOpen port = async {
let! ct = Async.CancellationToken
use client = new System.Net.Sockets.TcpClient ()
try
do! client.ConnectAsync ("127.0.0.1", port, ct) |>
Async.awaitValueTaskUnit
return true
with ex ->
trace Verbose (fun () -> $"testPortOpen / ex: {ex |>
printException}") getLocals
return false
}
let inline testPortOpenTimeout timeout port = async {
let! result =
testPortOpen port
|> Async.runWithTimeoutAsync timeout
return
match result with
| None -> false
...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
open Common
/// ## isWindows
let isWindows =
fun () ->
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform
System.Runtime.InteropServices.OSPlatform.Windows
|> memoize
/// ## getExecutableSuffix
let inline getExecutableSuffix () =
if isWindows ()
then ".exe"
else ""
/// ## splitCommand
type private CommandParseStep =
| Start
| Path of quoted: bool
| Arguments
let splitCommand (command: string) =
let rec loop (path, args) chars step =
match chars, step with
| ('"' | '\'') :: tail, _ when path = "" -> loop (pat...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
open Common
/// ## Operators
module Operators =
let inline (</>) a b =
System.IO.Path.Combine (a, b)
open Operators
/// ## createTempDirectoryName
let inline createTempDirectoryName () =
let root = System.Reflection.Assembly.GetEntryAssembly().GetName().Name
System.IO.Path.GetTempPath ()
</> $"!{root}"
</> string (newGuidFromDateTime System.DateTime.Now)
/// ## createTempDirectory
let inline createTempDirectory () =
let tempFolder = createTempDirectoryName ()
let result = System.IO.Directory.CreateDirectory tempFolder
if not result.Exists then
let ge...
── fsharp ──────────────────────────────────────────────────────────────────────
open FileSystem.Operators
open Falco.Markup
── fsharp ──────────────────────────────────────────────────────────────────────
type FileSystemNode =
| File of string * string * int64
| Folder of string * string * FileSystemNode list
| Root of FileSystemNode list
let rec scanDirectory isRoot (basePath : string) (path : string) =
let relativePath = path.Replace(basePath, "").Replace("\\",
"/").Replace("//", "/").TrimStart '/'
let directories =
path
|> System.IO.Directory.GetDirectories
|> Array.toList
|> List.sort
|> List.map (scanDirectory false basePath)
let files =
path
|> System.IO.Directory.GetFiles
|> Array.toList
|> List.sort
|> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath,
System.IO.FileInfo(f).Length))
let children = directories @ files
if isRoot
then Root children
else Folder (path |> System.IO.Path.GetFileName, relativePath, children)
let rec generateHtml fsNode =
let sizeLabel size =
match float size with
| size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB"
| size when size > 1024.0 -> $"%.2f{size / 1024.0} KB"
| size -> $"%.2f{size} B"
match fsNode with
| File (fileName, relativePath, size) ->
Elem.div [[]] [[
Text.raw "📄 "
Elem.a [[
Attr.href $"""{relativePath}{if relativePath = "" then "" else
"/"}{fileName}"""
]] [[
Text.raw fileName
]]
Elem.span [[]] [[
Text.raw $" ({size |> sizeLabel})"
]]
]]
| Folder (folderName, relativePath, children) ->
let size =
let rec loop children =
children
|> List.sumBy (function
| File (_, _, size) -> size
| Folder (_, _, children)
| Root children -> loop children
)
loop children
Elem.details [[
Attr.open' "true"
]] [[
Elem.summary [[]] [[
Text.raw "📂 "
Elem.a [[
Attr.href relativePath
]] [[
Text.raw folderName
]]
Elem.span [[]] [[
Text.raw $" ({size |> sizeLabel})"
]]
]]
Elem.div [[]] [[
yield! children |> List.map generateHtml
]]
]]
| Root children ->
Elem.div [[]] [[
yield! children |> List.map generateHtml
]]
let generateHtmlForFileSystem root =
$"""<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {{
background-color: #222;
color: #ccc;
}}
a {{
color: #777;
font-size: 15px;
}}
span {{
font-size: 11px;
}}
div > div {{
padding-left: 10px;
}}
details > div {{
padding-left: 19px;
}}
</style>
</head>
<body>
{root |> generateHtml |> renderNode}
</body>
</html>
"""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let tempFolder = FileSystem.createTempDirectory ()
let rec loop d n = async {
if n >= 0 then
tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore
do!
n
|> string
|> String.replicate (n + 1)
|> FileSystem.writeAllTextAsync (tempFolder </> d </> $"file.txt")
do! loop $"{d}/{n}" (n - 1)
}
loop "_.root" 3
|> Async.RunSynchronously
let html =
scanDirectory true tempFolder tempFolder
|> generateHtmlForFileSystem
html
|> _assert_eq """<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #222;
color: #ccc;
}
a {
color: #777;
font-size: 15px;
}
span {
font-size: 11px;
}
div > div {
padding-left: 10px;
}
details > div {
padding-left: 19px;
}
</style>
</head>
<body>
<div><details open="true"><summary>📂 <a href="_.root">_.root</a><span>
(10.00 B)</span></summary><div><details open="true"><summary>📂 <a
href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details
open="true"><summary>📂 <a href="_.root/3/2">2</a><span> (3.00
B)</span></summary><div><details open="true"><summary>📂 <a
href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>📄 <a
href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00
B)</span></div></div></details><div>📄 <a
href="_.root/3/2/file.txt">file.txt</a><span> (2.00
B)</span></div></div></details><div>📄 <a
href="_.root/3/file.txt">file.txt</a><span> (3.00
B)</span></div></div></details><div>📄 <a
href="_.root/file.txt">file.txt</a><span> (4.00
B)</span></div></div></details></div>
</body>
</html>
"""
html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent
╭─[ 231.99ms - return value ]──────────────────────────────────────────────────╮
│ <!DOCTYPE html> │
│ <html lang="en"> │
│ <head> │
│ <meta charset="UTF-8"> │
│ <style> │
│ body { │
│ background-color: #222; │
│ color: #ccc; │
│ } │
│ a { │
│ color: #777; │
│ font-size: 15px; │
│ } │
│ span { │
│ font-size: 11px; │
│ } │
│ div > div { │
│ padding-left: 10px; │
│ } │
│ details > div { │
│ padding-left: 19px; │
│ } │
│ </style> │
│ </head> │
│ <body> │
│ <div><details open="true"><summary>📂 <a │
│ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
│ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
│ B)</span></summary><div><details open="true"><summary>📂 <a │
│ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
│ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
│ B)</span></summary><div><div>📄 <a href="_.root... │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 250.03ms - stdout ]────────────────────────────────────────────────────────╮
│ <!DOCTYPE html> │
│ <html lang="en"> │
│ <head> │
│ <meta charset="UTF-8"> │
│ <style> │
│ body { │
│ background-color: #222; │
│ color: #ccc; │
│ } │
│ a { │
│ color: #777; │
│ font-size: 15px; │
│ } │
│ span { │
│ font-size: 11px; │
│ } │
│ div > div { │
│ padding-left: 10px; │
│ } │
│ details > div { │
│ padding-left: 19px; │
│ } │
│ </style> │
│ </head> │
│ <body> │
│ <div><details open="true"><summary>📂 <a │
│ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
│ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
│ B)</span></summary><div><details open="true"><summary>📂 <a │
│ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
│ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
│ B)</span></summary><div><div>📄 <a │
│ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │
│ B)</span></div></div></details><div>📄 <a │
│ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │
│ B)</span></div></div></details><div>📄 <a │
│ href="_.root/3/file.txt">file.txt</a><span> (3.00 │
│ B)</span></div></div></details><div>📄 <a │
│ href="_.root/file.txt">file.txt</a><span> (4.00 │
│ B)</span></div></div></details></div> │
│ </body> │
│ </html> │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string
| [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Dir _ -> nameof Dir
| Html _ -> nameof Html
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 143.07ms - return value ]──────────────────────────────────────────────────╮
│ USAGE: dotnet-repl [--help] --dir <string> --html <string> │
│ │
│ OPTIONS: │
│ │
│ --dir <string> Dir │
│ --html <string> Html │
│ --help display this list of options. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let dir =
match argsMap.[[nameof Arguments.Dir]] with
| [[ Arguments.Dir dir ]] -> Some dir
| _ -> None
|> Option.get
let htmlPath =
match argsMap.[[nameof Arguments.Html]] with
| [[ Arguments.Html html ]] -> Some html
| _ -> None
|> Option.get
let fileSystem = scanDirectory true dir dir
let html = generateHtmlForFileSystem fileSystem
html |> FileSystem.writeAllTextAsync htmlPath
|> Async.runWithTimeout 30000
|> function
| Some () -> 0
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> Runtime.splitArgs
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 77.13ms - return value ]───────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0</pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
[NbConvertApp] Converting notebook DirTreeHtml.dib.ipynb to html
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
validate(nb)
C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbconvert\filters\highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
return _pygments_highlight(
[NbConvertApp] Writing 308685 bytes to DirTreeHtml.dib.html
00:00:00 #1 [Debug] writeDibCode / output: Fs / path: DirTreeHtml.dib
00:00:00 #2 [Debug] parseDibCode / output: Fs / file: DirTreeHtml.dib
00:00:00 #1 [Debug] persistCodeProject / packages: [Argu; Falco.Markup; FSharp.Control.AsyncSeq; ... ] / modules: [lib/fsharp/Common.fs; lib/fsharp/CommonFSharp.fs; lib/fsharp/Async.fs; ... ] / name: DirTreeHtml / code.Length: 4478
00:00:00 #2 [Debug] buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj
00:00:00 #3 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime linux-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml"
CancellationToken = None
OnLine = None }
00:00:00 #4 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 #5 [Verbose] > Determining projects to restore...
00:00:04 #6 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 2.01 sec).
00:00:04 #7 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:15 #8 [Verbose] > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll
00:00:17 #9 [Verbose] > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:17 #10 [Debug] executeAsync / exitCode: 0 / output.Length: 732
00:00:17 #11 [Debug] executeAsync / options: { Command =
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime win-x64"
WorkingDirectory =
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml"
CancellationToken = None
OnLine = None }
00:00:17 #12 [Verbose] > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:18 #13 [Verbose] > Determining projects to restore...
00:00:19 #14 [Verbose] > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 618 ms).
00:00:20 #15 [Verbose] > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:29 #16 [Verbose] > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll
00:00:44 #17 [Verbose] > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:45 #18 [Debug] executeAsync / exitCode: 0 / output.Length: 728
In [ ]:
{ . "$ScriptDir/../apps/ipfs/build.ps1" } | Invoke-Block
Lockfile is up to date, resolution step is skipped Already up to date Done in 10.5s
In [ ]:
{ . "$ScriptDir/outdated.ps1" } | Invoke-Block
Paket version 8.1.0-alpha001+27cb9f111f156e8b68d08dc293857425c0ade23d
Resolving dependency graph...
Outdated packages found:
Group: Main
* Expecto 10.1 -> 10.2.1
* Expecto.FsCheck 10.1.0-fscheck3 -> 10.2.1
* FsCheck 3.0.0-rc3 -> 2.16.6
* FSharp.Core 8.0.300-beta.24080.5 -> 8.0.300-beta.24154.4
* Microsoft.AspNetCore.Connections.Abstractions 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.Http.Connections.Client 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.Http.Connections.Common 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.SignalR.Client 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.SignalR.Client.Core 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.SignalR.Common 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.AspNetCore.SignalR.Protocols.Json 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.Extensions.DependencyInjection 8.0 -> 9.0.0-preview.2.24128.5
* Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 -> 9.0.0-preview.2.24128.5
* Microsoft.Extensions.Features 7.0 -> 9.0.0-preview.2.24128.4
* Microsoft.Extensions.Logging 8.0 -> 9.0.0-preview.2.24128.5
* Microsoft.Extensions.Logging.Abstractions 8.0.1 -> 9.0.0-preview.2.24128.5
* Microsoft.Extensions.Options 8.0.2 -> 9.0.0-preview.2.24128.5
* Microsoft.Extensions.Primitives 8.0 -> 9.0.0-preview.2.24128.5
* System.IO.Pipelines 8.0 -> 9.0.0-preview.2.24128.5
* System.Threading.Channels 8.0 -> 9.0.0-preview.2.24128.5
Total time taken: 53 seconds
CheckToml / toml: C:\home\git\polyglot\Cargo.toml
chat_contract_tests
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
ahash 0.8.11 0.7.8 0.7.8 Normal ---
allocator-api2 0.2.16 Removed Removed Normal ---
cfg-if 1.0.0 Removed Removed Normal ---
equivalent 1.0.1 Removed Removed Normal ---
hashbrown 0.14.3 0.12.3 0.12.3 Normal ---
indexmap 2.2.5 1.9.3 1.9.3 Normal ---
proc-macro2 1.0.79 Removed Removed Normal ---
quote 1.0.35 Removed Removed Normal ---
syn 2.0.52 Removed Removed Normal ---
unicode-ident 1.0.12 Removed Removed Normal ---
zerocopy 0.7.32 Removed Removed Normal ---
zerocopy-derive 0.7.32 Removed Removed Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
borsh-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
darling_core->syn 2.0.52 2.0.53 2.0.53 Normal ---
darling_macro->syn 2.0.52 2.0.53 2.0.53 Normal ---
near-sdk-macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
serde_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
strum_macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
syn_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
zerocopy-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\tests\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
actix-macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
actix_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
ahash->getrandom 0.2.12 Removed Removed Normal cfg(any(target_os = "linux", target_os = "android", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "solaris", target_os = "illumos", target_os = "fuchsia", target_os = "redox", target_os = "cloudabi", target_os = "haiku", target_os = "vxworks", target_os = "emscripten", target_os = "wasi"))
async-stream-impl->syn 2.0.52 2.0.53 2.0.53 Normal ---
async-trait->syn 2.0.52 2.0.53 2.0.53 Normal ---
borsh-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
clap->clap_derive 4.5.0 4.5.3 4.5.3 Normal ---
clap_derive->heck 0.4.1 0.5.0 0.5.0 Normal ---
clap_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
curve25519-dalek-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
darling_core->syn 2.0.52 2.0.53 2.0.53 Normal ---
darling_macro->syn 2.0.52 2.0.53 2.0.53 Normal ---
derive_arbitrary->syn 2.0.52 2.0.53 2.0.53 Normal ---
enum-map-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
futures-macro->syn 2.0.52 2.0.53 2.0.53 Normal ---
getrandom->cfg-if 1.0.0 Removed Removed Normal ---
getrandom->js-sys 0.3.69 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
getrandom->libc 0.2.153 Removed Removed Normal cfg(unix)
getrandom->wasi 0.11.0+wasi-snapshot-preview1 Removed Removed Normal cfg(target_os = "wasi")
getrandom->wasm-bindgen 0.2.92 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
hashbrown->ahash 0.7.8 0.8.11 0.8.11 Normal ---
hyper->h2 0.3.24 0.3.25 0.3.25 Normal ---
indexmap->autocfg 1.1.0 Removed Removed Build ---
indexmap->hashbrown 0.12.3 0.14.3 0.14.3 Normal ---
js-sys->wasm-bindgen 0.2.92 Removed Removed Normal ---
near-o11y->clap 4.5.2 4.5.3 4.5.3 Normal ---
near-parameters->serde_yaml 0.9.32 0.9.33 0.9.33 Normal ---
near-primitives->serde_yaml 0.9.32 0.9.33 0.9.33 Normal ---
near-rpc-error-core->syn 2.0.52 2.0.53 2.0.53 Normal ---
near-rpc-error-macro->syn 2.0.52 2.0.53 2.0.53 Normal ---
near-workspaces->async-trait 0.1.77 0.1.78 0.1.78 Normal ---
openssl-macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
opentelemetry->async-trait 0.1.77 0.1.78 0.1.78 Normal ---
opentelemetry-otlp->async-trait 0.1.77 0.1.78 0.1.78 Normal ---
pin-project-internal->syn 2.0.52 2.0.53 2.0.53 Normal ---
proc-macro2->unicode-ident 1.0.12 Removed Removed Normal ---
quote->proc-macro2 1.0.79 Removed Removed Normal ---
reqwest->h2 0.3.24 0.3.25 0.3.25 Normal cfg(not(target_arch = "wasm32"))
scroll_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
serde_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
serde_repr->syn 2.0.52 2.0.53 2.0.53 Normal ---
serde_with->indexmap 1.9.3 2.2.5 2.2.5 Normal ---
serde_with_macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
serde_yaml->unsafe-libyaml 0.2.10 0.2.11 0.2.11 Normal ---
string_cache->new_debug_unreachable 1.0.4 1.0.6 1.0.6 Normal ---
syn->proc-macro2 1.0.79 Removed Removed Normal ---
syn->quote 1.0.35 Removed Removed Normal ---
syn->unicode-ident 1.0.12 Removed Removed Normal ---
syn_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
thiserror-impl->syn 2.0.52 2.0.53 2.0.53 Normal ---
tokio-macros->syn 2.0.52 2.0.53 2.0.53 Normal ---
tonic->async-trait 0.1.77 0.1.78 0.1.78 Normal ---
tonic->h2 0.3.24 0.3.25 0.3.25 Normal ---
tracing-attributes->syn 2.0.52 2.0.53 2.0.53 Normal ---
wasm-bindgen->cfg-if 1.0.0 Removed Removed Normal ---
wasm-bindgen->wasm-bindgen-macro 0.2.92 Removed Removed Normal ---
wasm-bindgen-backend->bumpalo 3.15.4 Removed Removed Normal ---
wasm-bindgen-backend->log 0.4.21 Removed Removed Normal ---
wasm-bindgen-backend->once_cell 1.19.0 Removed Removed Normal ---
wasm-bindgen-backend->proc-macro2 1.0.79 Removed Removed Normal ---
wasm-bindgen-backend->quote 1.0.35 Removed Removed Normal ---
wasm-bindgen-backend->syn 2.0.52 2.0.53 2.0.53 Normal ---
wasm-bindgen-backend->syn 2.0.52 Removed Removed Normal ---
wasm-bindgen-backend->wasm-bindgen-shared 0.2.92 Removed Removed Normal ---
wasm-bindgen-macro->quote 1.0.35 Removed Removed Normal ---
wasm-bindgen-macro->wasm-bindgen-macro-support 0.2.92 Removed Removed Normal ---
wasm-bindgen-macro-support->proc-macro2 1.0.79 Removed Removed Normal ---
wasm-bindgen-macro-support->quote 1.0.35 Removed Removed Normal ---
wasm-bindgen-macro-support->syn 2.0.52 2.0.53 2.0.53 Normal ---
wasm-bindgen-macro-support->syn 2.0.52 Removed Removed Normal ---
wasm-bindgen-macro-support->wasm-bindgen-backend 0.2.92 Removed Removed Normal ---
wasm-bindgen-macro-support->wasm-bindgen-shared 0.2.92 Removed Removed Normal ---
zerocopy-derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\plot\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde_derive->syn 2.0.52 2.0.53 2.0.53 Normal ---
wasm-bindgen-backend->syn 2.0.52 2.0.53 2.0.53 Normal ---
wasm-bindgen-macro-support->syn 2.0.52 2.0.53 2.0.53 Normal ---
C:\home\git\polyglot
> polyglot@ outdated-pre C:\home\git\polyglot
> npm-check-updates --target greatest
Using pnpm
Checking C:\home\git\polyglot\package.json
npm-check-updates ~16.14 → ~17.0-1
Run ncu --target greatest -u to upgrade package.json
C:\home\git\polyglot\apps\ipfs
> ipfs@ outdated-pre C:\home\git\polyglot\apps\ipfs
> npm-check-updates --target greatest
Using pnpm
Checking C:\home\git\polyglot\apps\ipfs\package.json
npm-check-updates ~16.14 → ~17.0-1
Run ncu --target greatest -u to upgrade package.json
C:\home\git\polyglot\apps\spiral\temp\extension
> polyglot@ outdated-pre C:\home\git\polyglot\apps\spiral\temp\extension
> npm-check-updates --target greatest
Using pnpm
Checking C:\home\git\polyglot\apps\spiral\temp\extension\package.json
@playwright/test 1.42.1 → 1.43.0-beta-1709675102000
npm-check-updates ~16.14 → ~17.0-1
Run ncu --target greatest -u to upgrade package.json